Skip to content

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 real 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
@uranusjr uranusjr merged commit 4111a4c into apache:main Feb 10, 2025
62 checks passed
@uranusjr uranusjr deleted the external-task-extra-link-use-run-id branch February 10, 2025 15:12
ambika-garg pushed a commit to ambika-garg/airflow that referenced this pull request Feb 17, 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.
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.

2 participants