Skip to content

Better "dependency already registered" warning message #14613

Closed

Description

@fjmacagno

Description
I have started getting a bunch of warnings like:

[2021-03-05 00:28:49,472] {baseoperator.py:1151} WARNING - Dependency <Task(PythonOperator): hold_for_review>, notify_on_slack already registered

I am sure this is my fault, but it would be nice if this warning included the dag, or at least the file, so i would have more of an idea where it is happening.

Use case / motivation
Would make debugging easier.

Are you willing to submit a PR?

No

Activity

  1. mik-laj commented on Mar 6, 2021

    @mik-laj
    Member

    what version of Airflow do you use?

  2. fjmacagno commented on Mar 6, 2021

    @fjmacagno
    ContributorAuthor

    2.0.1

  3. assigned and unassigned on Mar 7, 2021
  4. Goodkat commented on Mar 14, 2021

    @Goodkat
    Contributor

    As I understand, we just need to extend the add_only_new function with one more input parameter dag and add then the third argument to the warning message there: self.log.warning('Dependency %s, %s already registered', self, item).
    All changes are in the baseoperator.py file.

  5. added a commit that references this issue on Mar 17, 2021
  6. Goodkat commented on Mar 24, 2021

    @Goodkat
    Contributor

    Can someone assign this to me, since I am already working on it as per the PR #14860?
    Thank you.

  7. XD-DENG commented on Mar 24, 2021

    @XD-DENG
    Member

    Hi @Goodkat , here you go :)

  8. Goodkat commented on Apr 19, 2021

    @Goodkat
    Contributor

    The warning message was extended with dag_id to be more informative.
    The respective changes were implemented and merged according to the PR #14860.
    Please consider whether this issue can be closed now.
    Thank you.

  9. fjmacagno commented on Apr 19, 2021

    @fjmacagno
    ContributorAuthor

    Solution looks good, ill test it once it is released.

  10. fjmacagno commented on Feb 17, 2022

    @fjmacagno
    ContributorAuthor

    BTW Changes look great, it just took forever to get us migrated to a newer version of Airflow. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions