Repository navigation
air: send submit's config validation over the CLI's existing connection - #7210
Open
stevenchen-db wants to merge 2 commits into
Open
stevenchen-db wants to merge 2 commits into
stevenchen-db wants to merge 2 commits into
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: 0b62bdf
Top 6 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?
This branch has not been deployed
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 its pre-uploadconfig:validaterequest through an SDK client, so it reuses the workspace connection the CLI's other calls already opened. The request is built the same way as before and still gets exactly one attempt.Why
The validation call used its own clone of
http.DefaultTransport, so everyair runopened a second TCP and TLS connection to the workspace. That costs about one extra connection setup plus two TLS round trips, which is small in-region and large from a laptop.Measured on a test workspace, SCIM Me followed by the validation call, 15 fresh processes per build:
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 instead of stopping. The server validates the run again when it starts.
Tests
TestPreflightValidationReusesSDKConnection: an SDK call followed by validation opens one connection (fails with 2 on main).TestPreflightValidationBodyReadFailureOnCallerErrorBlocksis now...FailsOpen, for the behavior change above. All other validation tests pass unchanged (single attempt, fail-open on timeouts, transport errors and malformed responses, blocking on caller errors and visitor errors, cancellation, OAuth refresh deadline).go test ./cmd/air/andgo test ./acceptance -run TestAccept/airpass;./task fmt,./task checksand./task lintare clean.This pull request and its description were written by Isaac.