Skip to content

Include debug information in more dagbag warnings #33853

Closed

Description

@fjmacagno

Description

Add dag/file information to RemovedInAirflow3Warning, UserWarning, and AirflowProviderDeprecationWarning, so that a user can tell where to go to fix the issue.

Use case/motivation

Some of the RemovedInAirflow3Warnings and UserWarnings aren't actionable because i have no idea what dag they are referring to, such as:

  • RemovedInAirflow3Warning: The use of non-json-serializable params is deprecated and will be removed in a future release
  • AirflowProviderDeprecationWarning: This module is deprecated. Please use airflow.providers.cncf.kubernetes.operators.pod instead. (this one i could take an educated guess and search for pod imports, but many users wouldn't)

Some, like

  • UserWarning: The parameter waiter_countdown has been deprecated to standardize naming conventions. Please use waiter_max_attempts instead. In the future this will default to None and defer to the waiter's default value.
  • RemovedInAirflow3Warning: none_failed_or_skipped Trigger Rule is deprecated. Please use none_failed_min_one_success.

are ok because i can at least search our codebase for those keywords, but they would still be more fixable with debug info.

But even of those, its hard to find at times: for instance, when getting RemovedInAirflow3Warning: airflow.operators.python.task is deprecated. Please use the following instead there is no string i can search for without using regexes or using an IDE to find uses of the function.

Unfortunately i do know this would likely be a case-by-case fix.

Related issues

#14613

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:feature
    needs-triage
    on Aug 28, 2023
  2. added and removed
    needs-triage
    on Sep 1, 2023
  3. potiuk commented on Sep 1, 2023

    @potiuk
    Member

    Yep. Marked as "good first issue"

  4. tsafacjo commented on Nov 1, 2023

    @tsafacjo

    can I take this issue ?

  5. potiuk commented on Nov 1, 2023

    @potiuk
    Member

    Feel free.

  6. potiuk commented on Mar 2, 2026

    @potiuk
    Member

    @tsafacjo We are unassigning you from this issue as part of our updated assignment policy.

    This is not meant to discourage your contribution — quite the opposite! You are still very welcome to work on this issue and submit a PR for it. Simply comment that you are working on it and open a PR when ready.

    We found that formal assignments were not working well, as they often prevented others from contributing when the assignee was not actively working on the issue.

  7. MichaelChenGithub commented on Apr 8, 2026

    @MichaelChenGithub

    Hi @potiuk , I'd like to work on this!

  8. mohsinsurani commented on Jun 7, 2026

    @mohsinsurani

    HI, I'm going to take a look at this one and trace where the warning handler intercepts these inside dagbag.py to append the file context. I'll spin up Breeze and open a PR once the unit tests pass.

  9. shahar1 commented on Nov 6, 2026

    @shahar1
    Contributor

    Solved by #73853

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions