Skip to content

Remove dependency already registered for this task warning#31502

Merged
ephraimbuddy merged 1 commit into
apache:mainfrom
astronomer:remove-dependency-added-warning
May 24, 2023
Merged

Remove dependency already registered for this task warning#31502
ephraimbuddy merged 1 commit into
apache:mainfrom
astronomer:remove-dependency-added-warning

Conversation

@ephraimbuddy

Copy link
Copy Markdown
Contributor

The frequent warning about dependency being already registered for a dag is not needed since task.downstream_task_ids is a set and task.upstream_task_ids is also a set. The warning usually occurs if your tasks are set up similar to this:

task1 = mytask()
for i in range(5):
    task2 = anothertask()
    task1 >> task2

in which case it warns 5 times about task1 dependency is already set.
This PR removes the warning

The frequent warning about dependency being already registered for a dag
is not needed since task.downstream_task_ids is a set and task.upstream_task_ids is also a set.
The warning usually occurs if your tasks are set up similar to this:
```
task1 = mytask()
for i in range(5):
    task2 = anothertask()
    task1 >> task2
```
in which case it warns 5 times about task1 dependency is already set.
This PR removes the warning
@ephraimbuddy ephraimbuddy force-pushed the remove-dependency-added-warning branch 2 times, most recently from b7c14b1 to ed2f5d8 Compare May 24, 2023 13:30
@potiuk potiuk added this to the Airflow 2.6.2 milestone May 24, 2023
@ephraimbuddy ephraimbuddy merged commit abcfc6f into apache:main May 24, 2023
@ephraimbuddy ephraimbuddy deleted the remove-dependency-added-warning branch May 24, 2023 21:21
@eladkal eladkal added the type:bug-fix Changelog: Bug Fixes label Jun 8, 2023
eladkal pushed a commit that referenced this pull request Jun 8, 2023
eladkal pushed a commit that referenced this pull request Jun 9, 2023
jrybicki-jsc added a commit to eflows4hpc/dls-dags that referenced this pull request Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants