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

fix(dbt Cloud): Allow None on custom_branch_only field and update some endpoints to v3 #330

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

Vitor-Avila
Copy link
Contributor

When loading information about jobs from a dbt Cloud project, it's possible that the custom_branch_only field (from the TriggerSchema) returns None. This PR adds supports for such scenario.

It also updates some endpoints to use dbt Cloud v3 API.

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

giphy-4201342743

@@ -724,7 +724,7 @@ def get_accounts(self) -> List[AccountSchema]:
"""
List all accounts.
"""
url = self.baseurl / "api/v2/accounts/"
url = self.baseurl / "api/v3/accounts/"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could define somewhere:

V2_API = self.baseurl / "api/v2"
V3_API = self.baseurl / "api/v3"

Then here we could:

url = V3_API / "accounts/"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ohh, that's a good idea! I have to do a follow up on other dbt Cloud related issue and I can include this.

@Vitor-Avila Vitor-Avila merged commit 1f3cfb5 into main Dec 16, 2024
5 checks passed
@Vitor-Avila Vitor-Avila deleted the fix/dbt-cloud-api-schema branch December 16, 2024 16:12
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