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

Updated tests that were modifying the dbt profile #540

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

rcypher-databricks
Copy link
Collaborator

Description

There is a bug in the dbt testing infrastructure:
"[CT-3478] [Bug] Editing profiles as part of tests is not thread-safe #9254"
dbt-labs/dbt-core#9254

This causes issues for tests that use the profiles_config_update fixture.
Added class level fixture dbt_profile_data to conftest.py.
This creates the profile used by all the tests, in it additional targets are added to be used by the tests that were formerly using profiles_config_update.
Updated the tests to remove the profiles_config_update fixture and to specify the appropriate target when running.

Checklist

  • 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
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-databricks next" section.

There is a bug in the dbt testing infrastructure: "[CT-3478] [Bug] Editing profiles as part of tests is not thread-safe #9254" dbt-labs/dbt-core#9254
This causes issues for tests that use the profiles_config_update fixture.
Added class level fixture dbt_profile_data to conftest.py.  This creates the profile used by all the tests, in it additional targets are added to be used by the tests that were formerly using profiles_config_update.
Updated the tests to remove the profiles_config_update fixture and to specify the appropriate target when running.

Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>
@benc-db
Copy link
Collaborator

benc-db commented Dec 19, 2023

Approved, but please open on databricks fork so that we can run the integration/functional tests.

@benc-db
Copy link
Collaborator

benc-db commented Jan 8, 2024

I'm going to pull and push this to our main fork to run the tests

@benc-db benc-db merged commit 2b3f194 into databricks:main Jan 8, 2024
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants