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

Access DEBUG flag through get_flags() #11069

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

Threynaud
Copy link
Contributor

@Threynaud Threynaud commented Nov 28, 2024

Resolves #11068

Problem

ManifestLoader.check_for_spaces_in_resource_names() causes an AttributeError in certain cases, for instance when used with SQLFluff dbt templater.
AttributeError: 'DbtConfigArgs' object has no attribute 'DEBUG'

Solution

Access the DEBUG flag through the get_flags()method as done everywhere else in the codebase.

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.

@Threynaud Threynaud requested a review from a team as a code owner November 28, 2024 15:22
Copy link

cla-bot bot commented Nov 28, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Thomas Reynaud.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

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.

@github-actions github-actions bot added the community This PR is from a community member label Nov 28, 2024
Copy link

cla-bot bot commented Nov 28, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Thomas Reynaud.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

Copy link

cla-bot bot commented Nov 28, 2024

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Thomas Reynaud.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email [email protected]
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@Threynaud Threynaud changed the title Access DEBUG flag though get_flags() Access DEBUG flag through get_flags() Nov 28, 2024
@MichelleArk MichelleArk self-requested a review November 28, 2024 22:19
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

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

Good catch! Thank you for fixing this ❤️

Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.08%. Comparing base (1b7d9b5) to head (78ba6ff).
Report is 1 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (1b7d9b5) and HEAD (78ba6ff). Click for more details.

HEAD has 52 uploads less than BASE
Flag BASE (1b7d9b5) HEAD (78ba6ff)
unit 9 0
integration 46 3
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11069      +/-   ##
==========================================
- Coverage   89.18%   82.08%   -7.10%     
==========================================
  Files         183      183              
  Lines       23783    23783              
==========================================
- Hits        21211    19523    -1688     
- Misses       2572     4260    +1688     
Flag Coverage Δ
integration 82.08% <50.00%> (-4.49%) ⬇️
unit ?

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

Components Coverage Δ
Unit Tests 82.08% <50.00%> (-7.10%) ⬇️
Integration Tests 82.08% <50.00%> (-4.49%) ⬇️

@QMalcolm
Copy link
Contributor

QMalcolm commented Dec 4, 2024

For documentation purposes, I've gone and manually added the cla:yes label. @Threynaud has signed the CLA as is publically documented. The cla check was failing because commit 35550de has a different email address than the other commits (but still is attributed to @Threynaud)

@MichelleArk MichelleArk merged commit fdfe03d into dbt-labs:main Dec 4, 2024
55 of 59 checks passed
@Threynaud Threynaud deleted the fix/access-debug-flag branch December 9, 2024 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.9.latest cla:yes community This PR is from a community member
Projects
None yet
3 participants