Include debug information in more dagbag warnings
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 484
Description
### 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 `RemovedInAirflow3Warning`s and `UserWarning`s 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
https://github.com/apache/airflow/issues/14613
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
Start by locating the DagBag warning emission sites for RemovedInAirflow3Warning, UserWarning, and AirflowProviderDeprecationWarning, then trace how DAG and file context is available there. The work is done when the affected warnings identify the relevant DAG and file well enough for users to find the source of the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100