Skip to content

Start decoupling ApiClient and DatabricksClient.#1245

Merged
renaudhartert-db merged 8 commits into
mainfrom
renaud-hartert_data/client
Jul 8, 2025
Merged

Start decoupling ApiClient and DatabricksClient.#1245
renaudhartert-db merged 8 commits into
mainfrom
renaud-hartert_data/client

Conversation

@renaudhartert-db

@renaudhartert-db renaudhartert-db commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

The SDK has two clients which serve very similar purposes: ApiClient and DatabricksClient. This PR is a first step to pay to merge these two client into a single consistent client. Specifically, it brings some of the functionality from DatabricksClient in ApiClient in preparation for a change of code generation logic.

This PR also slightly changes the way the ApiClient default parameter values are set by moving the logic in its constructor.

How is this tested?

Unit and integration tests.

Comment thread config/api_client.go Outdated
Comment thread common/environment/environments.go Outdated
Comment thread client/client.go
Comment thread config/api_client.go
@github-actions

github-actions Bot commented Jul 8, 2025

Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1245
  • Commit SHA: fe46587084adb1a472bd1891fe47e59ba8888f08

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db added this pull request to the merge queue Jul 8, 2025
Merged via the queue into main with commit 4f9f526 Jul 8, 2025
15 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud-hartert_data/client branch July 8, 2025 18:54
Comment thread httpclient/api_client.go
cfg.DebugTruncateBytes = orDefault(cfg.DebugTruncateBytes, 96)
cfg.RetryTimeout = time.Duration(orDefault(int(cfg.RetryTimeout), int(5*time.Minute)))
cfg.HTTPTimeout = time.Duration(orDefault(int(cfg.HTTPTimeout), int(30*time.Second)))
cfg.HTTPTimeout = time.Duration(orDefault(int(cfg.HTTPTimeout), int(60*time.Second)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was this change intentional? It is not mentioned in the description. Also there is another line above setting cfg.HTTPTimeout to 30s.

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.

3 participants