-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix Airflow V2 incompatibility in ExternalTaskSensor #51479
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
Fix Airflow V2 incompatibility in ExternalTaskSensor #51479
Conversation
The parameter in WorkflowTrigger is "execution_dates", and not "execution_date"
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.
Pull Request Overview
This PR corrects the parameter name passed to WorkflowTrigger in ExternalTaskSensor.execute, ensuring the key matches the expected “execution_dates” signature.
- Changed the dict key from
"execution_date"to"execution_dates"when not running Airflow v3.0+ - Aligns sensor payload with the trigger’s parameter name
providers/standard/src/airflow/providers/standard/sensors/external_task.py
Show resolved
Hide resolved
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.
@fuatcakici Welcome to Apache Airflow! This is a great catch :)
I hope that you will excuse me, but I took over the PR to add some tests so we'd be able to track such errors for the next times.
While adding the tests, I've found another related bug which I fixed on the way - I tagged the relevant commiters for their review.
Thanks for your contribution!
providers/standard/src/airflow/providers/standard/sensors/external_task.py
Show resolved
Hide resolved
|
@shahar1 of course, by all means! I had also noticed the other bug by the way, as in the In any case, thanks for being so proactive! |
|
@shahar1 We should update the PR title now to match the bug fix |
Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
Co-authored-by: Shahar Epstein <60007259+shahar1@users.noreply.github.com>
The parameter in WorkflowTrigger is "execution_dates", and not "execution_date"
^ 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.