Skip to content

Add GetDag endpoint to execution_api#56955

Merged
gopidesupavan merged 12 commits intoapache:mainfrom
gopidesupavan:dag-state-api-for-task-sdk
Mar 18, 2026
Merged

Add GetDag endpoint to execution_api#56955
gopidesupavan merged 12 commits intoapache:mainfrom
gopidesupavan:dag-state-api-for-task-sdk

Conversation

@gopidesupavan
Copy link
Member

related: #56954

TriggerDagRunOperator failing when the operator args sets fail_when_dag_is_paused in AF3 we are blocking the db access, but in the current TriggerDagRunOperator it still trying to use the DagModel, causing the db error. see the issue above where user explained.

here its accessing DagModel.
https://github.com/apache/airflow/blob/main/providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py#L219

Adding the GetDagState endpoint to get whether dag is paused or in active.

Fix is required for the TriggerDagRunOperator in standard provider, after this merge will add a fix.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:task-sdk labels Oct 21, 2025
@gopidesupavan
Copy link
Member Author

Not sure we can treat this as bugfix and backport to v3-1.

@ashb
Copy link
Member

ashb commented Oct 24, 2025

@gopidesupavan @kaxil Rather than a seaprate check, how about adding this as a parameter to the existing TriggerRun message and API endpoint -- and then if the dag is paused the API could return an error (412 Precondition Failed for giggles?) which could then be returned to the task code

@gopidesupavan
Copy link
Member Author

@gopidesupavan @kaxil Rather than a seaprate check, how about adding this as a parameter to the existing TriggerRun message and API endpoint -- and then if the dag is paused the API could return an error (412 Precondition Failed for giggles?) which could then be returned to the task code

Yeah thats also an option good thought, but for now there is no-way if anyone wants to see dag status. not sure is it worth adding this endpoint or not. am happy to make a change if this is not required.

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Dec 9, 2025
@github-actions github-actions bot closed this Dec 14, 2025
@gopidesupavan gopidesupavan reopened this Dec 26, 2025
@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch from 360e013 to 5581f56 Compare December 26, 2025 21:28
@github-actions github-actions bot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Dec 27, 2025
@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch from 5581f56 to d44eb85 Compare December 29, 2025 13:09
@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch from 84ca7ee to 4791527 Compare January 8, 2026 21:12
@pierrejeambrun pierrejeambrun added area:API Airflow's REST/HTTP API and removed area:API Airflow's REST/HTTP API labels Jan 14, 2026
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Mar 9, 2026
@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch from 4791527 to 6896ecb Compare March 13, 2026 14:09
@gopidesupavan gopidesupavan removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Mar 13, 2026
@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch 2 times, most recently from 23afb2a to b4b37ba Compare March 14, 2026 17:36
@gopidesupavan
Copy link
Member Author

can i have review please?

@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch from b4b37ba to 43a407f Compare March 17, 2026 20:04
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

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

Nice work on the full stack implementation — endpoint, Cadwyn versioning, client, supervisor, comms, and task runner are all properly wired up. A few things to clean up before merge.

@gopidesupavan gopidesupavan self-assigned this Mar 17, 2026
Copy link
Member

@kaxil kaxil left a comment

Choose a reason for hiding this comment

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

All 7 previous comments addressed — looks good. One remaining nit from the test file.

@gopidesupavan gopidesupavan changed the title Add GetDagState endpoint to execution_api Add GetDag endpoint to execution_api Mar 18, 2026
@gopidesupavan gopidesupavan force-pushed the dag-state-api-for-task-sdk branch from 6255d00 to 6c2a3cf Compare March 18, 2026 16:24
@gopidesupavan gopidesupavan merged commit 7fa4007 into apache:main Mar 18, 2026
129 of 132 checks passed
@gopidesupavan gopidesupavan deleted the dag-state-api-for-task-sdk branch March 18, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants