Skip to content

Conversation

@josh-fell
Copy link
Contributor

@josh-fell josh-fell commented Jan 25, 2023

Related: #28890 #29014

In version 2.3.1 of this provider, an fix was made to allow users to specify the entire tenant domain on their dbt Cloud instance rather than just the third-level (e.g. "my-tenant.domain.com" vs. "my-tenant.getdbt.com") via Connection.host. This was particular useful for other dbt Cloud regions other than the US. Backwards compat was still available via Connection.schema, but was noted as deprecated. Given other changes are being made to the provider, Connection.schema use to specify the dbt Cloud tenant domain should be dropped.

Also, there was a recent enhancement of DbtCloudRunJobOperator to include deferrable/async functionality. Unfortunately the tenant evaluation in the DbtCloudHook was outdated and didn't include the most recent change to properly handle domain specification. This PR consolidates the tenant eval logic to a common method to be used by both sync and async methods in the hook.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Old logic that is no longer valid.

Copy link
Contributor Author

@josh-fell josh-fell Jan 25, 2023

Choose a reason for hiding this comment

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

Refactoring the branching here since the else would never be executed anyway.

@josh-fell josh-fell force-pushed the dbt-cloud-fix-tenant-async branch 2 times, most recently from 69b599c to 05ea8e3 Compare February 1, 2023 16:55
Copy link
Contributor

Choose a reason for hiding this comment

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

We can make a major release with the updated behavior rather than carry the deprecation further

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Do you think this warrants a newsfragment or does the major version increment imply something "newsworthy"?

Copy link
Contributor

Choose a reason for hiding this comment

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

You will need to update version in provider.yaml to 3.0.0 and also update provider changelog with details of the breaking change (check Amazon provider change log for example)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh right 🤦. I updated these now along with the PR title and description to make it clear what the significant change is in this PR.

@josh-fell josh-fell force-pushed the dbt-cloud-fix-tenant-async branch 2 times, most recently from 663fdb7 to c1cb663 Compare February 2, 2023 02:28
@josh-fell josh-fell changed the title Correct tenant eval within async logic of DbtCloudHook Drop Connection.schema use in DbtCloudHook Feb 2, 2023
Related: apache#28890 apache#29014

There was a recent enhancement of DbtCloudRunJobOperator to include deferrable/async functionality. Unfortunately the `tenant` evaluation in the DbtCloudHook was outdated and didn't include the most recent change to properly handle domain specification.

This PR consolidates the tenant eval logic to a common method to be used by both sync and async methods in the hook.
@josh-fell josh-fell force-pushed the dbt-cloud-fix-tenant-async branch from c1cb663 to 7f1647a Compare February 2, 2023 13:56
@josh-fell josh-fell merged commit 91c0ce7 into apache:main Feb 2, 2023
@josh-fell josh-fell deleted the dbt-cloud-fix-tenant-async branch February 2, 2023 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants