Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces an automated workflow for Data Commons imports using Apache Airflow and Cloud Composer. It includes a catalog builder script, a dynamic DAG factory, and a core automation DAG that orchestrates Cloud Batch jobs and Spanner ingestion. The review identifies several critical anti-patterns, including unsafe path manipulation, global environment variable modification, synchronous operator execution within tasks, and blocking sleep loops. Actionable feedback was provided to improve path handling, enforce strict duplicate ID management, and implement robust retry mechanisms for network requests.
vish-cs
force-pushed
the
dag
branch
5 times, most recently
from
September 17, 2026 14:16
9fbf948 to
287db28
Compare
rohitkumarbhagat
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the Apache Airflow (Cloud Composer) orchestration pipeline for Data Commons data imports, replacing the legacy Cloud Workflows implementation.
Key Changes
import_dags_factory.py&build_manifest_catalog.py): Scans repositorymanifest.jsonfiles at build time and dynamically registers an independent Airflow DAG for each import specification (plus a genericimport_automation_workflowfallback DAG). All DAGs are created in a disabled (is_paused_upon_creation=True) state withskipProdIngestion=Trueby default.import_automation_workflow.py):run_import_job): Triggers thedc-import-executorCloud Batch job (with inline validation and differ disabled).run_validation_job): Invokes the Cloud Run v2 Job (import-validator-job) with a 2-hour timeout to run BigQuery differ and validation checks.golden_verification.py): Triggers Spanner staging ingestion, runs automated golden diff verification via Cloud Build (ingestion-golden-verification.cloudbuild.yaml), and pauses for human approval (HumanApprovalSensor) if diffs are detected.ingest_prod): Promotes validated imports to production Spanner when enabled.cloudbuild.workflow.yaml&e2e_dag_test.py): Automates catalog compilation, GCS DAG synchronization to Cloud Composer, and live End-to-End DAG execution verification via the Airflow REST API.TAG=agy
CONV=fd554db8-40c1-4b71-b86a-83b4aa199d65