Add liteswap traffic-routing support to Config - #1846
Open
Sankalp-Mittal wants to merge 1 commit into
Open
Sankalp-Mittal wants to merge 1 commit into
Sankalp-Mittal wants to merge 1 commit into
Conversation
Add an opt-in Config.LiteswapTarget field (env DATABRICKS_LITESWAP_TARGET, profile field liteswap_target) that routes API requests to a liteswap test instance of a service in shared pre-production. When set, the SDK adds the 'x-databricks-traffic-id: testenv://liteswap/<target>' routing header on top of normal authentication via a request visitor in HTTPClientConfigFromConfig, covering every generated service method and raw client call with no per-service code. Empty (the default) is a no-op. Intended for dev/test only. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: Sankalp Mittal <sankalp.mittal@databricks.com>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Sankalp-Mittal
marked this pull request as draft
September 16, 2026 14:19
Sankalp-Mittal
marked this pull request as ready for review
September 17, 2026 09:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in
Config.LiteswapTargetthat routes API requests to a liteswap test instance of a service in shared pre-production, by adding a routing header on top of normal authentication.Why
Lets a developer point any SDK-based tool (and the CLI, once it bumps the SDK) at a pre-prod liteswap deployment via a single env var or profile field, with no per-service code. Empty by default, so production traffic is unaffected.
What changed
Config.LiteswapTarget(envDATABRICKS_LITESWAP_TARGET, profile fieldliteswap_target) — when set, every request gets the headerx-databricks-traffic-id: testenv://liteswap/<target>.To use it, either set the environment variable
DATABRICKS_LITESWAP_TARGET=<target>before running your program, or addliteswap_target = <target>to the profile in your.databrickscfg. From then on every request made with that config routes to the named liteswap unit. Leave it unset to route to production as normal.This pull request and its description were written by Isaac.