Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General Deprecation Warning Improvements #11465

Closed

Conversation

QMalcolm
Copy link
Contributor

@QMalcolm QMalcolm commented Apr 3, 2025

Resolves #11429

Problem

  • Instances of deprecation warnings could only be show once on invocation
    • This made fixing deprecation warnings slow / annoying
  • It was unknown how many violations of a given deprecation type were in any run
    • Meant fixing deprecation warnings takes an unknown amount of time
      • i.e. you just keep running dbt run fixing one warning, and running again until its clean 🙃

Solution

  • Keep track of how many times a deprecation type is encountered
  • Still only show the first instance of a deprecation type unless --show-all-deprecations is specified
  • Show summaries for deprecation warnings with defined summary types at the end of any command (via postflight)

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@QMalcolm QMalcolm requested a review from a team as a code owner April 3, 2025 22:53
@cla-bot cla-bot bot added the cla:yes label Apr 3, 2025
Copy link
Contributor

github-actions bot commented Apr 3, 2025

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@QMalcolm
Copy link
Contributor Author

QMalcolm commented Apr 3, 2025

Closing in favor of #11466

@QMalcolm QMalcolm closed this Apr 3, 2025
Copy link

codecov bot commented Apr 3, 2025

Codecov Report

Attention: Patch coverage is 47.91667% with 25 lines in your changes missing coverage. Please review.

Project coverage is 87.36%. Comparing base (4aa5169) to head (d7c2e83).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11465      +/-   ##
==========================================
- Coverage   88.90%   87.36%   -1.54%     
==========================================
  Files         191      194       +3     
  Lines       24397    24550     +153     
==========================================
- Hits        21690    21448     -242     
- Misses       2707     3102     +395     
Flag Coverage Δ
integration 83.92% <43.75%> (-2.04%) ⬇️
unit 62.70% <41.66%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.70% <41.66%> (-0.13%) ⬇️
Integration Tests 83.92% <43.75%> (-2.04%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve deprecation warns to track and handle multiple invocations
1 participant