Skip to content

Run ExecutionMode.AIRFLOW_ASYNC dag with deferrable False#12

Merged
pankajastro merged 15 commits into
mainfrom
run_sync_dag
May 8, 2026
Merged

Run ExecutionMode.AIRFLOW_ASYNC dag with deferrable False#12
pankajastro merged 15 commits into
mainfrom
run_sync_dag

Conversation

@pankajastro
Copy link
Copy Markdown
Contributor

@pankajastro pankajastro commented Apr 28, 2026

Comment thread dags/cosmos_sync_dag.py Outdated
Base automatically changed from run_async_test to main April 30, 2026 13:21
@pankajastro pankajastro marked this pull request as ready for review May 5, 2026 07:59
@pankajastro pankajastro requested a review from a team as a code owner May 5, 2026 07:59
@pankajastro pankajastro requested review from Copilot, pankajkoti and tatiana and removed request for a team May 5, 2026 07:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Cosmos benchmark path for running the altered jaffle shop BigQuery DAG in AIRFLOW_ASYNC mode while forcing the async operator to behave non-deferrably, so it can be compared against the existing async benchmark setup.

Changes:

  • Adds dags/cosmos_sync_dag.py, a new BigQuery Cosmos DAG that monkey-patches the async BigQuery operator to set deferrable=False.
  • Adds benchmark/experiment/airflow-test-cosmos-sync.yaml, a Kubernetes Job manifest to run airflow dags test cosmos_bq_sync.
  • Reuses the altered jaffle shop benchmark project and existing GCP connection/profile wiring for the new benchmark path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
dags/cosmos_sync_dag.py Adds the new benchmark DAG and the operator monkey-patch used to disable deferral.
benchmark/experiment/airflow-test-cosmos-sync.yaml Adds the benchmark Job manifest that executes the new DAG in Kubernetes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread dags/cosmos_sync_dag.py Outdated
Comment thread dags/cosmos_sync_dag.py
Comment thread benchmark/experiment/airflow-test-cosmos-sync.yaml Outdated
Comment thread benchmark/experiment/airflow-test-cosmos-sync.yaml Outdated
Comment thread benchmark/experiment/airflow-test-cosmos-sync.yaml Outdated
@tatiana tatiana changed the title Run async dag with deferrable False Run ExecutionMode.AIRFLOW_ASYNC dag with deferrable False May 6, 2026
Avoids the process-wide monkey-patch on DbtRunAirflowAsyncBigqueryOperator.__init__
that would leak into cosmos_async_dag during DagBag import and silently change
the async baseline being benchmarked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@pankajkoti pankajkoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with this if the deferrable=False works as intended from the current code changes, meaning whether self.deferrable is honoured at execute-time vs. baked in during __init__.

@pankajastro pankajastro merged commit dc8a434 into main May 8, 2026
@pankajastro pankajastro deleted the run_sync_dag branch May 8, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants