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

Use entire tenant domain name in dbt Cloud connection #28890

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

josh-fell
Copy link
Contributor

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

Closes: #27146

Currently users can connect to both single-tenant and multi-tenant instances of dbt Cloud. However, for the enterprise tier, there is a new region offered as well as private instance support. The existing tenant value does not cover the ability to modify the entire domain name which could be required for users on the enterprise plan.

This enhancement allows users to specify the tenant domain they wish to connect to while keeping the "cloud.getdbt.com" domain as the default. Additionally, backward compat is implemented for those who are only specifying the third-level domain for single-tenant instances and wish to upgrade the provider version.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

Closes: apache#27146

Currently users can connect to both single-tenant and multi-tenant instances of dbt Cloud. However, for the enterprise tier, there is a new region offered as well as private instance support. The existing `tenant` value does not cover the ability to modify the entire domain name which could be required for users on the enterprise plan.

This enhancement allows users to specify the tenant domain they wish to connect to while keeping the "cloud.getdbt.com" domain as the default. Additionally, backward compat is implemented for those who are only specifying the third-level domain for single-tenant instances and wish to upgrade the provider version.
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Nice and simple!

@potiuk potiuk merged commit 141338b into apache:main Jan 12, 2023
@josh-fell josh-fell deleted the dbt-cloud-tenant branch January 12, 2023 19:36
josh-fell added a commit to josh-fell/astronomer-providers that referenced this pull request Jan 23, 2023
Related: apache/airflow#27146 apache/airflow#28890

In OSS Airflow, the dbt Cloud connection has replaced `schema` for `host` to provide the "tenant" name. This fix was included in the latest version of the dbt Cloud provider (2.3.1) and should also be reflected in this provider.
phanikumv pushed a commit to astronomer/astronomer-providers that referenced this pull request Jan 24, 2023
Related: apache/airflow#27146 apache/airflow#28890

In OSS Airflow, the dbt Cloud connection has replaced `schema` for `host` to provide the "tenant" name. This fix was included in the latest version of the dbt Cloud provider (2.3.1) and should also be reflected in this provider.
josh-fell added a commit to josh-fell/airflow that referenced this pull request 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 added a commit that referenced this pull request Feb 2, 2023
* Correct tenant eval within async logic of DbtCloudHook

Related: #28890 #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.

* Remove Connection.schema use

* Update provider.yaml and changelog
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.

dbt Cloud Provider Not Compatible with emea.dbt.com
2 participants