Skip to content
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 getting the dag/task ids from base executor #27550

Merged

Conversation

jordanjeremy
Copy link
Contributor

Was skipping the 3rd position in the command during validation. This caused the dag_id to be missed and the return from the get_parsing_context() (from airflow/utils/dag_parsing_context.py) had the wrong information. The dag_id contained the task_id and the task_id contained the run_id.

Changed starting index when getting the dag and task ids to avoid skipping and added test for base executor.

Issue found when attempting to implement using dag_parsing_context() introduced as part of #25161 to optimize dynamic dag parsing.

Was skipping the 3rd position in the command during validation.
This caused the dag_id to be missed and the return from the
get_parsing_context() (from airflow/utils/dag_parsing_context.py)
had the wrong information.  The dag_id contained the task_id and
the task_id contained the run_id.

Changed starting index when getting the dag and task ids to avoid
skipping and added test for base executor.
@boring-cyborg boring-cyborg bot added the area:Scheduler Scheduler or dag parsing Issues label Nov 7, 2022
@potiuk
Copy link
Member

potiuk commented Nov 7, 2022

Ah Indeed. That was used in CeleryExecutor. Bummer

@potiuk
Copy link
Member

potiuk commented Nov 7, 2022

Off-by-one :(

@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Nov 7, 2022
@ephraimbuddy ephraimbuddy added this to the Airflow 2.4.3 milestone Nov 7, 2022
@uranusjr uranusjr merged commit f304df7 into apache:main Nov 7, 2022
ephraimbuddy pushed a commit that referenced this pull request Nov 9, 2022
ephraimbuddy pushed a commit that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Scheduler Scheduler or dag parsing Issues type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants