Add GetDag endpoint to execution_api#56955
Conversation
|
Not sure we can treat this as bugfix and backport to v3-1. |
27d7704 to
ff8bad8
Compare
|
@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. |
|
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. |
360e013 to
5581f56
Compare
5581f56 to
d44eb85
Compare
84ca7ee to
4791527
Compare
|
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. |
4791527 to
6896ecb
Compare
23afb2a to
b4b37ba
Compare
|
can i have review please? |
b4b37ba to
43a407f
Compare
kaxil
left a comment
There was a problem hiding this comment.
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.
airflow-core/src/airflow/api_fastapi/execution_api/routes/dags.py
Outdated
Show resolved
Hide resolved
kaxil
left a comment
There was a problem hiding this comment.
All 7 previous comments addressed — looks good. One remaining nit from the test file.
airflow-core/src/airflow/api_fastapi/execution_api/routes/dags.py
Outdated
Show resolved
Hide resolved
6255d00 to
6c2a3cf
Compare
related: #56954
TriggerDagRunOperator failing when the operator args sets
fail_when_dag_is_pausedin 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.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.