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

Fix plurals in FoundStats message #9465

Merged
merged 7 commits into from
Jan 30, 2024
Merged

Fix plurals in FoundStats message #9465

merged 7 commits into from
Jan 30, 2024

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Jan 26, 2024

resolves #9464

Problem

As part of moving the event system & log formatting logic into dbt-common, we introduced a "cosmetic regression" that prints the plural of analysis as analysiss in the FoundStats line.

Solution

Following the new logic in dbt_common.events.format.pluralize, pass the NodeType enum object into pluralize, rather than its (manually mapped) string name.

While this fixes the issue with analyses, it does mean that we'll be printing multi-word node types with an underscore instead of a space:

... data_tests, ... saved_queries, ... semantic_models, ... unit_tests

I think that's fine — it's more consistent with how these appear elsewhere — and it's definitely better than saved querys ;)

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/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

@jtcohen6 jtcohen6 requested a review from a team as a code owner January 26, 2024 12:40
@jtcohen6 jtcohen6 requested a review from aranke January 26, 2024 12:40
@cla-bot cla-bot bot added the cla:yes label Jan 26, 2024
Copy link
Contributor

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.

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1cbc6d3) 87.89% compared to head (5b0930b) 87.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9465      +/-   ##
==========================================
+ Coverage   87.89%   87.90%   +0.01%     
==========================================
  Files         164      164              
  Lines       21967    21966       -1     
==========================================
+ Hits        19307    19310       +3     
+ Misses       2660     2656       -4     
Flag Coverage Δ
integration 85.37% <100.00%> (+0.01%) ⬆️
unit 62.48% <100.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@aranke aranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests should pass now, thanks for adding this in!

@jtcohen6 jtcohen6 merged commit 7a410ab into main Jan 30, 2024
51 checks passed
@jtcohen6 jtcohen6 deleted the jerco/fix-9464 branch January 30, 2024 11:38
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.

[Bug] "FoundStats" message has incorrect node name plurals
3 participants