Skip to content

Fix dag test trigger 404#64945

Open
Subham-KRLX wants to merge 1 commit intoapache:mainfrom
Subham-KRLX:fix-dag-test-trigger-404
Open

Fix dag test trigger 404#64945
Subham-KRLX wants to merge 1 commit intoapache:mainfrom
Subham-KRLX:fix-dag-test-trigger-404

Conversation

@Subham-KRLX
Copy link
Copy Markdown
Contributor

@Subham-KRLX Subham-KRLX commented Apr 9, 2026

This PR fixes a bug where TriggerDagRunOperator failed with a 404 Not Found error when executed via dag.test().

The issue was caused by an overly restrictive parsing context in the test() method that limited DAG synchronization to only the specific DAG being tested. This meant that any target DAGs (triggered by the test) were never synchronized to the metadata database, making them invisible to the in-process Execution API.

Changes:

Removed the _airflow_parsing_context_manager restriction from the bundle synchronization loop in dag.test().
This ensures all DAGs in the test environment's bundles are properly synchronized to the DB before execution begins.

closes: #64884

Was generative AI tooling used to co-author this PR?
Yes — Claude (For pr description)

@Subham-KRLX Subham-KRLX force-pushed the fix-dag-test-trigger-404 branch from 282f82e to 1181e43 Compare April 9, 2026 07:34
@Subham-KRLX Subham-KRLX marked this pull request as ready for review April 9, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use TriggerDagRunOperator from dag.test()

1 participant