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

clear DBT_DEBUG after test_env_vars_secrets #9978

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Apr 18, 2024

resolves #N/A

Problem

Flaky test_check_for_spaces_in_model_names.py fails when whole integration test suite is run, blocking releasing here: https://github.com/dbt-labs/dbt-core/actions/runs/8739875391

Solution

pytest tests/functional/context_methods/test_env_vars.py tests/functional/manifest_validations/test_check_for_spaces_in_model_names.py are failing reliably when run together. test_env_vars sets the DBT_DEBUG env var, which causes check_for_spaces_in_model_names to change its behaviour.

Fix test_env_vars to properly cleanup its state after completion.

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
  • pytest tests/functional/context_methods/test_env_vars.py tests/functional/manifest_validations/test_check_for_spaces_in_model_names.py passes reliably now :)
  • 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

@MichelleArk MichelleArk requested a review from a team as a code owner April 18, 2024 15:40
@cla-bot cla-bot bot added the cla:yes label Apr 18, 2024
@MichelleArk MichelleArk added the Skip Changelog Skips GHA to check for changelog file label Apr 18, 2024
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.10%. Comparing base (f5f9591) to head (a76115c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9978      +/-   ##
==========================================
- Coverage   88.12%   88.10%   -0.02%     
==========================================
  Files         181      181              
  Lines       22581    22581              
==========================================
- Hits        19900    19896       -4     
- Misses       2681     2685       +4     
Flag Coverage Δ
integration 85.42% <ø> (-0.02%) ⬇️
unit 62.09% <ø> (ø)

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.

@MichelleArk MichelleArk merged commit 4c58754 into main Apr 18, 2024
66 checks passed
@MichelleArk MichelleArk deleted the arky/fix-test-env-vars-test branch April 18, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants