Skip to content

Add experimental core framework to replace existing API call execution.#1318

Merged
renaudhartert-db merged 6 commits intomainfrom
renaud-hartert_data/sdk-mod-code
Nov 7, 2025
Merged

Add experimental core framework to replace existing API call execution.#1318
renaudhartert-db merged 6 commits intomainfrom
renaud-hartert_data/sdk-mod-code

Conversation

@renaudhartert-db
Copy link
Copy Markdown
Contributor

@renaudhartert-db renaudhartert-db commented Nov 4, 2025

What changes are proposed in this pull request?

This PR introduces a new experimental API framework that abstracts the transport layer from API calls through a composable, interface-based design. The core changes include:

  • New Call abstraction: Defines API calls as simple functions (func(context.Context) error) that are transport-agnostic.
  • Configurable execution framework: The Execute function orchestrates API calls with pluggable retry, rate limiting, and timeout behaviors.
  • Retry mechanism with exponential backoff: Implements a flexible Retrier interface with configurable BackoffPolicy supporting jitter and exponential growth.
  • Options pattern: Uses functional options (WithRetrier, WithTimeout, WithLimiter) for clean, composable configuration.
  • Context-aware operations: Full support for context cancellation and timeouts throughout the execution pipeline.

This change is foundational to rewriting the SDK from the ground up with a transport-agnostic approach. The current SDK was designed with multiple code paths and minimal code generation, making it tightly coupled to HTTP transport. This new framework enables:

  • Transport abstraction: API calls become logical operations independent of whether they use HTTP, gRPC, or other protocols.
  • Code generation focus: Moving transport considerations to the code generation level rather than scattered throughout the SDK.
  • Composition over complexity: Small, focused interfaces that can be composed together rather than monolithic implementations.
  • Consistency: Unified retry, rate limiting, and timeout behavior across all API calls.
  • Testability: Clean interfaces make it easy to mock and test different scenarios.

How is this tested?

The PR includes comprehensive unit tests covering.

NO_CHANGELOG=true

Copy link
Copy Markdown
Contributor

@parthban-db parthban-db left a comment

Choose a reason for hiding this comment

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

LGTM modulo small nits. I removed the auto-merge so that you can address these comments.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 5, 2025

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: 1318
  • Commit SHA: ac189d61d35b286301c785539450c5e7a3187b51

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit 7f5832e Nov 7, 2025
15 checks passed
@renaudhartert-db renaudhartert-db deleted the renaud-hartert_data/sdk-mod-code branch November 7, 2025 11:47
github-merge-queue bot pushed a commit that referenced this pull request Nov 13, 2025
## 🥞 Stacked PR
Use this
[link](https://github.com/databricks/databricks-sdk-go/pull/1329/files)
to review incremental changes.
-
[**stack/update-changelog**](#1329)
[[Files
changed](https://github.com/databricks/databricks-sdk-go/pull/1329/files)]

---------
## What changes are proposed in this pull request?

Update Changelog for changes in #1318. This changelog was not part of
the original PR.

## How is this tested?

N/A
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