-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use XCom to correctly display the execution date from triggered DAG in TriggerDagOperator's extra link #19410
Conversation
dc24ad5
to
ec88ebc
Compare
@ljades @uranusjr Quick PR to remove the erroneous execution_date from the triggered url. @uranusjr: Two of the tests are failing and I have no idea why. I can't reproduce it locally (those tests pass when I run them) and they aren't producing an exception or any logging, it just times out at 68% completion. Any ideas on how I can move forward here? |
122447a
to
6fb4bd6
Compare
Don't worry about those, the CI runner timed out. |
This fix doesn't look right to me -- by not including the execution date it will link to the latest run instead. |
@ashb |
Hey @ashb, Basically a "real fix" is quite tricky and I wasn't getting much feedback in the ticket, so as a stop gap this PR will at least remove the filter so that you see all runs from current run back which seemed like a decent default for the time being. |
6ac6981
to
9beb1c7
Compare
From that issue:
Store the triggered execution date in XCom and pull it in the operator link, like
and use it like airflow/airflow/providers/google/cloud/operators/bigquery.py Lines 63 to 69 in 7622f5e
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Store date/runid (both please) in XCom and use to build the link.
Thanks for the feedback Ash! I'll play around with this and get back to this PR soon 👍 |
9beb1c7
to
752575c
Compare
Hey @ashb, do you have a minute to take another look at this PR? Appreciate it! |
The extra link provided by the operator was previously using the execution date of the triggering dag, not the triggered dag. Store the execution date of the triggered dag in xcom so that it can be read back later within the webserver when the link is being created.
752575c
to
6da11f4
Compare
Hey @ashb your requested changes should be in. Do you have time to have a quick review of this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. LGTM!
The extra link provided by the operator was previously using the execution date of the triggering dag, not the triggered dag. Store the execution date of the triggered dag in xcom so that it can be read back later within the webserver when the link is being created. (cherry picked from commit 820e836)
The extra link provided by the operator was previously using the execution date of the triggering dag, not the triggered dag. Store the execution date of the triggered dag in xcom so that it can be read back later within the webserver when the link is being created. (cherry picked from commit 820e836)
The extra link provided by the operator was previously using the execution date of the triggering dag, not the triggered dag. Store the execution date of the triggered dag in xcom so that it can be read back later within the webserver when the link is being created. (cherry picked from commit 820e836)
Mitigate #19264 such that the extra link from the triggered dag at least loads the current date and
displays all current dag runs runs. See that issue for further discussion on future DB changes.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, 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 UPDATING.md.