Repository navigation
air: send submit's config validation over the CLI's existing connection - #7210
Merged
Merged
Conversation
The submit-path config:validate request used its own clone of http.DefaultTransport, so every `air run` opened a second TCP and TLS connection to the workspace. Send it through an SDK client instead, so it reuses the connection the CLI's other calls already opened. The request is still built the same way and gets one attempt. The SDK reports a failed response-body read without the HTTP status, so a caller-error response whose body stalls now counts as validation being unavailable and the submission continues; the server validates the run again when it starts. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 24b00f0
Top 3 slowest tests (at least 2 minutes):
|
maggiewang-db
approved these changes
Oct 29, 2026
maggiewang-db
left a comment
Contributor
There was a problem hiding this comment.
Can you do an E2E test and make sure databricks air run works?
# Conflicts: # cmd/air/validateconfig_test.go
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
air runsends itsconfig:validaterequest through an SDK client, so it reuses the workspace connection the CLI's other calls already opened instead of opening a second TCP and TLS connection. The request is built the same way as before and still gets exactly one attempt. It now also appears in--debuglogs.One behavior change: the SDK reports a failed response-body read without the HTTP status. A caller-error response (e.g. 401) whose body stalls mid-read now counts as validation being unavailable, so the submission continues. The server validates the run again when it starts.
Why
Since #7368, validation runs alongside the artifact upload and submit waits for both. The extra handshake only delays submit once it makes validation finish after the upload, which happens for clients far from their workspace. Measured on e2-dogfood with emulated extra round trip, time until submit can start (median):
Tests
TestPreflightValidationReusesSDKConnection: an SDK call followed by validation opens one connection (2 on main).TestPreflightValidationBodyReadFailureOnCallerErrorBlocksis now...FailsOpen, for the behavior change above.go test ./cmd/air/andgo test ./acceptance -run TestAccept/airpass; lint is clean.This pull request and its description were written by Isaac.