Repository navigation
Run AIR preflight validation in parallel with artifact staging - #7368
Merged
Merged
Conversation
`databricks air run` used to wait for the server-side config:validate call before staging the launch artifacts. The backend check doesn't read the uploaded files, so run it concurrently with usage-policy resolution, the experiment directory check, mkdirs, and the uploads. Submission still waits for both, and a failure on either side cancels the other, so an invalid config is never submitted (it may now leave staged artifacts). The "validation unavailable" warning is printed after staging so it doesn't interleave with the staging spinner. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: c6b050c
Top 3 slowest tests (at least 2 minutes):
|
Start validation in a goroutine before staging and join it before submit, instead of extracting staging into a helper, so the diff doesn't move existing code. Co-authored-by: Isaac <no-reply@databricks.com>
Validation and staging now share a cancellable context: a validation failure cancels in-flight uploads and is reported instead of the cancellation, and a staging failure cancels in-flight validation. Co-authored-by: Isaac <no-reply@databricks.com>
Start validation right before the upload and run the usage policy lookup and experiment directory creation after it, so validation field errors keep precedence and a rejected config never creates the experiment directory, as before. Co-authored-by: Isaac <no-reply@databricks.com>
errgroup already returns the first error and cancels the other side, so the manual goroutine, channel, and deferred error override are not needed. Co-authored-by: Isaac <no-reply@databricks.com>
# Conflicts: # cmd/air/validateconfig_test.go
A failed config validation now cancels artifact staging, but plain-tar packaging ignored its context and archived the whole tree before the validation error surfaced. Fail tar writes once the context is done. Also bound the cancellation test so a regression fails instead of hanging, and update the submitWorkload doc comment for the new order. Co-authored-by: Isaac <no-reply@databricks.com>
maggiewang-db
approved these changes
Nov 7, 2026
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
databricks air runwaited for the server-sideconfig:validatecall before staging launch artifacts. Validation doesn't read the uploaded files, so it now runs concurrently withmkdirsand the uploads (errgroup), and submit waits for both..air/cli_launch/, and a badusage_policy_nameis reported after the upload.Tests
go test ./cmd/air(touched tests with-race),TestAccept/air, lint pass.This pull request and its description were written by Isaac.