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

Use run_id for ExternalDag and TriggerDagRun links #46546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

uranusjr
Copy link
Member

@uranusjr uranusjr commented Feb 7, 2025

Airflow views already can handle run_id instead of logical_date in the URL query, so we no longer needs to use the logical_date anyway. We also do not need to fetch the TaskInstance object from db at all since ti_key has all the information available to fetch the RTIF data we need.

Although the type hint on the corresponding RTIF function is changed, the runtime behaviour is actually unchanged (which means old versions of Airflow work just fine!) because TaskInstanceKey shares the same attribute name protocol as a reak TaskInstance.

@uranusjr uranusjr added AIP-83 Remove Execution Date Unique Constraint from DAG Run provider:standard labels Feb 7, 2025
@uranusjr uranusjr requested review from XD-DENG and ashb as code owners February 7, 2025 09:05
@uranusjr uranusjr force-pushed the external-task-extra-link-use-run-id branch from 52af4dd to e71fa32 Compare February 7, 2025 09:11
@uranusjr uranusjr changed the title Change TriggerDagRun link to use run_id Use run_id for ExternalDag and TriggerDagRun links Feb 7, 2025
Airflow views already can handle run_id instead of logical_date in the
URL query, so we no longer needs to use the logical_date anyway. We also
do not need to fetch the TaskInstance object from db at all since ti_key
has all the information available to fetch the RTIF data we need.

Although the type hint on the corresponding RTIF function is changed,
the runtime behaviour is actually unchanged (which means old versions of
Airflow work just fine!) because TaskInstanceKey shares the same
attribute name protocol as a reak TaskInstance.
@uranusjr uranusjr force-pushed the external-task-extra-link-use-run-id branch from e71fa32 to d72dde2 Compare February 7, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-83 Remove Execution Date Unique Constraint from DAG Run provider:standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant