Skip to content

Conversation

@pierrejeambrun
Copy link
Member

@pierrejeambrun pierrejeambrun commented Dec 5, 2024

Related to: #42367

Adds the external_dependencies query parameter.

Supports trigger, sensor, asset, asset_aliases.

Sensor is back because ExternalTaskSensor is creating a sensor dependency type.

For now all that is external to the dag, and not specific to the task_level. Meaning that they are attached to the dag (first task of the dag) and not to the specific tasks. (i.e task outlets for assets for instance)

@pierrejeambrun pierrejeambrun added the AIP-84 Modern Rest API label Dec 5, 2024
@pierrejeambrun pierrejeambrun self-assigned this Dec 5, 2024
@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Dec 5, 2024
@pierrejeambrun pierrejeambrun marked this pull request as draft December 5, 2024 18:53
@pierrejeambrun pierrejeambrun force-pushed the AIP-84-add-external-dependencies-to-structure branch from 46ee957 to 64f3cc9 Compare December 10, 2024 09:40
@pierrejeambrun pierrejeambrun marked this pull request as ready for review December 10, 2024 13:41
@pierrejeambrun pierrejeambrun changed the title AIP-84 Add external dependencies to GET Structure Data Endpoint Part 1 AIP-84 Add external dependencies to GET Structure Data Endpoint Dec 10, 2024
@pierrejeambrun pierrejeambrun force-pushed the AIP-84-add-external-dependencies-to-structure branch from d76d6b1 to 8789aaa Compare December 10, 2024 14:26
Copy link
Contributor

@shubhamraj-git shubhamraj-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@pierrejeambrun pierrejeambrun force-pushed the AIP-84-add-external-dependencies-to-structure branch from 5ea5c6f to 87b5121 Compare December 11, 2024 13:20
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing locally, I noticed two issues:

example_external_task_marker_parent: did not have any downstream deps

example_trigger_controller_dag`: the dependency comes back as upstream when it should be downstream

@pierrejeambrun
Copy link
Member Author

pierrejeambrun commented Dec 12, 2024

example_external_task_marker_parent: did not have any downstream deps

Indeed. That's a limitation we have at the moment in the backend in detect_task_dependencies. only TriggerDagRunOperator and ExternalTaskSensor are supported. ExternalTaskMarker is not. We might want to add it but this will impact the serialized dags and I'm not sure yet how free we are of updating that. (and how this dependencies are then used by the scheduler I assume). We will need to discuss that with other to confirm the feasibility of that approach.

I will open a dedicated issue to track that because its not straight forward.

edit: Dedicated issue here #44879

@pierrejeambrun
Copy link
Member Author

example_trigger_controller_dag`: the dependency comes back as upstream when it should be downstream

Good catch, fixed, also added a test for that.

@pierrejeambrun pierrejeambrun requested a review from ashb as a code owner December 12, 2024 15:32
Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@pierrejeambrun pierrejeambrun merged commit e0377eb into apache:main Dec 12, 2024
49 checks passed
@pierrejeambrun pierrejeambrun deleted the AIP-84-add-external-dependencies-to-structure branch December 12, 2024 23:28
ellisms pushed a commit to ellisms/airflow that referenced this pull request Dec 13, 2024
…he#44701)

* Working state

* Add tests for external task sensor

* Add test for TriggerDagRunOperator

* Fix following code review

* Update following code review
got686-yandex pushed a commit to got686-yandex/airflow that referenced this pull request Jan 30, 2025
…he#44701)

* Working state

* Add tests for external task sensor

* Add test for TriggerDagRunOperator

* Fix following code review

* Update following code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AIP-84 Modern Rest API area:UI Related to UI/UX. For Frontend Developers.

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

3 participants