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

Remove erroneously added wildcard method name #9642

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

heysweet
Copy link
Contributor

@heysweet heysweet commented Feb 23, 2024

resolves #9641

Problem

https://github.com/dbt-labs/dbt-core/pull/6599/files#diff-9aa4de7075574ef36d838665148e5858294fae6fd66c0eed1fcf2033a34ee84eR50 erroneously added a new key to the MethodName enum which is completely unused -- all wildcard operations are performed within other methods, specifically:

  • fqn
  • tag
  • source
  • exposure
  • metric
  • file
  • package
  • test

Solution

Remove the unused key to avoid polluting the MethodName enum.

Before

The behavior before this PR is not what we want:

$ dbt test -s 'wildcard:something'

12:49:35  Running with dbt=1.8.0-b1
12:49:35  Registered adapter: postgres=1.8.0-b1
12:49:36  Found 1 model, 411 macros
12:49:36  Encountered an error:
Internal Error
  Method name "wildcard" is a valid node selection method name, but it is not handled

After

The behavior after this PR is what we want:

$ dbt test -s 'wildcard:something'

12:50:29  Running with dbt=1.8.0-b1
12:50:29  Registered adapter: postgres=1.8.0-b1
12:50:30  Found 1 model, 411 macros
12:50:30  Encountered an error:
Runtime Error
  'wildcard' is not a valid method name

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

@heysweet heysweet requested a review from a team as a code owner February 23, 2024 14:24
Copy link

cla-bot bot commented Feb 23, 2024

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @heysweet

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.02%. Comparing base (7072a53) to head (9245ee4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9642      +/-   ##
==========================================
- Coverage   88.07%   88.02%   -0.06%     
==========================================
  Files         178      178              
  Lines       22439    22438       -1     
==========================================
- Hits        19764    19750      -14     
- Misses       2675     2688      +13     
Flag Coverage Δ
integration 85.47% <ø> (-0.15%) ⬇️
unit 62.24% <ø> (-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.

@heysweet
Copy link
Contributor Author

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @heysweet

I just signed the CLA

@heysweet heysweet closed this Mar 1, 2024
@heysweet heysweet reopened this Mar 1, 2024
@heysweet heysweet requested a review from dbeatty10 March 1, 2024 17:35
@heysweet heysweet closed this Mar 11, 2024
@heysweet heysweet reopened this Mar 11, 2024
@cla-bot cla-bot bot added the cla:yes label Mar 11, 2024
Copy link
Contributor

@dbeatty10 dbeatty10 left a comment

Choose a reason for hiding this comment

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

Thanks for noticing and fixing this @heysweet !

One more approval needed -- we'll need to get approval from an engineer on the Core team before this is merged.

@gshank gshank merged commit 9af5ec6 into main Mar 26, 2024
63 checks passed
@gshank gshank deleted the asweet/remove-wildcard-method branch March 26, 2024 16:25
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.

[Tech Debt] Unused key in MethodName map wildcard
3 participants