Sign in to create and edit playbooks. Sign In Register

Backfill Historical GitHub Events

BPE-2 Order: #2 Datalake Formation Has Dependencies

Updated 1 month, 2 weeks ago

Guidance

Purpose

Pull historical GitHub issues, PRs, commits, and workflow runs into the raw bucket so Constraint and Flow Analysis can compute cycle time. Webhooks only catch events after they are registered.

Inputs

  • Lake Scope Contract (repos, secrets.github_api_token).
  • CDK Application (GithubBackfillFn already declared).
  • Starter workflow .github/workflows/populate-lake.yml — template https://github.com/FeatureFactory-io/ops-lake-starter/blob/main/.github/workflows/populate-lake.yml. Do not laptop-invoke against shared env.
  • Skills Serverless Data Ingestion and Populate the Lake.

Steps

  1. Keep starter infra/lambdas/github_backfill.py and populate-lake.yml. Open skill Populate the Lake.
  2. Issues and pulls: state=all and per_page=100. GitHub's default is open only — that was the empty cycle-time dashboard. Wrap each item {backfill: true, kind, repo, payload} with kind in issues | pulls | commits | workflow_runs.
  3. Paginate Link: rel=next for list endpoints. Commits API pagination is not the same as issue/PR Link headers — follow page= until empty. Timeout 10 minutes / 1024 MB.
  4. Repo secret OPSLAKE_GITHUB_PAT (repo, read:org) — never GITHUB_*. Populate-lake syncs it into Secrets Manager.
  5. GitHub → Actions → Populate the Lake → Run workflow. Watch CloudWatch for written=N. Never laptop invoke against shared env.
  6. After raw objects land, the same workflow runs scripts/sync_raw_to_curated.py then crawlers then Athena proof. Athena LIMIT 10 is activity Present the Catalog via Athena; here you only need written=N and raw keys under s3://{raw}/github/.

Done when

  • Glue github_issues will contain closed rows after Parquet + crawl (payload.state='closed'), not only open.
  • CloudWatch shows written=N for issues, pulls, commits, workflow_runs.

Feeds

Store Compressed and Partitioned in S3, then Glue/Athena. Cycle-time EDA depends on this history.

Honesty

GithubProjectsPollFn is a heartbeat until GraphQL pagination ships. Do not join github_project_items as if Master Roadmap items are populated.

Details
Order:
#2
Phase:
Predecessor:
BPE-1 Stand Up Serverless Ingestion from Scoped Sources
Successor:
BPE-3 Store Compressed and Partitioned in S3
Created:
Sep 15, 2026
Last Updated:
Sep 17, 2026
Workflow
Build the Operational Data Lake Pipeline

Pull operational history from the systems people actually work in into the lake, including closed work, so duration and wait …

View Workflow
Assigned Agent
Data Platform Engineer

Agent: Data Platform Engineer Role Owns Datalake Formation: Scope Contract → Python CDK (DeployStack + …

Required Skills
Rules
Input Artifacts 2
Output Artifacts 1