Repository navigation
Add DATABRICKS_LITESWAP_TARGET to route requests to a liteswap unit - #6946
Merged
Merged
Conversation
When DATABRICKS_LITESWAP_TARGET is set, every request from workspace, account, and bundle clients carries x-databricks-traffic-id: testenv://liteswap/<target>, using the SDK's Config.Headers hook. Dev/test only. Co-authored-by: Isaac <no-reply@databricks.com>
shreyas-goenka
approved these changes
Oct 6, 2026
Sankalp-Mittal
enabled auto-merge
October 6, 2026 12:22
Collaborator
Integration test reportCommit: eca2cb2
Top 6 slowest tests (at least 2 minutes):
|
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.
Changes
New dev/test-only env var
DATABRICKS_LITESWAP_TARGET. When it is set, every request from workspace, account, and bundle clients carriesx-databricks-traffic-id: testenv://liteswap/<target>, which routes it to that LiteSwap pre-prod unit.libs/liteswap:Apply(ctx, cfg)setscfg.Headers(SDK hook from Add Config.Headers for custom request headers databricks-sdk-go#1846, available since Bump databricks-sdk-go from v0.182.0 to v0.185.0 #6928) when the env var is set.MustAccountClient,MustWorkspaceClient, andbundle/config/workspace.go. Clients built fromw.Configfor raw calls (DMS, filer, AIR, pipelines, telemetry, ...) pick the header up from these.Why
Developers testing a service on a LiteSwap unit need CLI traffic routed there. The header format matches the existing hidden SSH
--liteswapflag.Out of scope for now:
databricks api(builds its own config) and the SSH flag, which could later move to this mechanism. No changelog entry, since this is dev/test only.Tests
New acceptance test
acceptance/cmd/liteswap-targetrecords request headers for a workspace command, an account command, andbundle validate, and checks the header is absent when the env var is unset.This pull request and its description were written by Isaac.