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

Point check back to dbt-core version instead of the adapter version #62

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Feb 1, 2024

Addresses failed CI in dbt-labs/dbt-bigquery#1082

Problem

The existing integration tests in dbt-core validated against the dbt-core version, but the new integration tests tested against adapter version.

Solution

Point the test back to dbt-core for now since that's our testing dependency anyway.

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

@mikealfare mikealfare self-assigned this Feb 1, 2024
@mikealfare mikealfare changed the title Point check back to dbt-core version instead of dbt-adapters version Point check back to dbt-core version instead of the adapter version Feb 1, 2024
@mikealfare mikealfare added the bug Something isn't working label Feb 1, 2024
@colin-rogers-dbt
Copy link
Contributor

I believe dbt_version is set here: https://github.com/dbt-labs/dbt-bigquery/blob/e86609a1e15a766eb764a535f277100ca10ee67b/dbt/adapters/bigquery/connections.py#L42

So it should be the adapter version not dbt-adapters or dbt-core

@colin-rogers-dbt
Copy link
Contributor

see similar test patch: 8f259f5

Maybe we should add the adapter version as a global fixture?

@mikealfare
Copy link
Contributor Author

I believe dbt_version is set here: https://github.com/dbt-labs/dbt-bigquery/blob/e86609a1e15a766eb764a535f277100ca10ee67b/dbt/adapters/bigquery/connections.py#L42

So it should be the adapter version not dbt-adapters or dbt-core

If you look at 1.7, this used to be the version of dbt-core. This was updated to the adapter version during the migration, but I don't think we updated the tests to refer to the adapter version. They still pull in the core version.

@colin-rogers-dbt
Copy link
Contributor

colin-rogers-dbt commented Feb 1, 2024

offline investigation shows that I'm incorrect and that the dbt_version set here is set by artifacts: https://github.com/dbt-labs/dbt-core/blob/ad723a6db897d9779f817da522758c05dce65730/core/dbt/artifacts/schemas/base.py#L62

we need to settle on a more consistent approach to this field but for now I don't think adapters need to validate core's artifacts are generated correctly

@mikealfare
Copy link
Contributor Author

offline investigation shows that I'm incorrect and that the dbt_version set here is set by artifacts: https://github.com/dbt-labs/dbt-core/blob/ad723a6db897d9779f817da522758c05dce65730/core/dbt/artifacts/schemas/base.py#L62

we need to settle on a more consistent approach to this field but for now I don't think adapters need to validate core's artifacts are generated correctly

Are you suggesting we just remove the assertion (line 339) entirely? I'm also alright with this approach for exactly the argument you made.

@colin-rogers-dbt colin-rogers-dbt merged commit 609fe46 into main Feb 1, 2024
5 checks passed
@colin-rogers-dbt colin-rogers-dbt deleted the fix-dbt-version-checks branch February 1, 2024 21:42
@martynydbt martynydbt added High Severity bug with significant impact that should be resolved in a reasonable timeframe and removed High Severity bug with significant impact that should be resolved in a reasonable timeframe labels Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants