Improve perf through better overlapping of api calls - #6677
Merged
Merged
Conversation
vinchenzo-db
approved these changes
Sep 14, 2026
Collaborator
Integration test reportCommit: 7ee573a
Top 4 slowest tests (at least 2 minutes):
|
janniklasrose
pushed a commit
that referenced
this pull request
Sep 15, 2026
## Changes - Make `uploadArtifacts` create the launch directory once and upload its files concurrently. - Add `stageRunArtifacts` to overlap launch uploads with `snapshotViaDABsUpload`, while still waiting for both before `runs/submit`. - Stop polling MLflow IDs after a text-mode submit and pass the resolved snapshot artifact base through the uploader, removing the second SCIM `Me` lookup. ## Why AIR submission latency was dominated by sequential remote calls. These changes shorten the critical path without changing snapshot packaging or content-addressing behavior. | Change | Why it is safe | |---|---| | Remove post-submit MLflow polling | MLflow links are best-effort enrichment. The command still returns the Job run ID and URL, and `air get`, `air logs`, and `--watch` resolve run details when needed. | | Upload launch files concurrently | The files have independent names and contents. The launch directory is created before writes begin, overwrite behavior is preserved, and any write error fails staging. | | Overlap launch and snapshot staging | The two branches write to separate destinations and only converge when building the Jobs payload. `runs/submit` is called only after both complete successfully. | | Reuse the resolved workspace base | Both paths belong to the same authenticated user. Passing the already-resolved base removes an identical SCIM lookup, while configured `remote_volume` behavior remains unchanged. | ## Tests Live submission latency on df1: | Scenario | Before | After | Improvement | |---|---:|---:|---:| | No-code JSON | 1.36s median | 0.93s median | 31% faster | | Tiny `ts_smoke` snapshot | 2.52s median | 1.62s median | 36% faster | | Text mode | 3.30s observed | 0.73s median | 78% faster | Validation: - `go test ./experimental/air/cmd` — pass. - Focused race tests for concurrent uploads and staging — pass. - AIR run-submit acceptance tests — 3/3 pass. - Full lint — 0 issues. _This PR was written with Codex._
Collaborator
Integration test reportCommit: 86afe92
97 interesting tests: 87 FAIL, 7 KNOWN, 2 flaky, 1 SKIP
Top 50 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
uploadArtifactscreate the launch directory once and upload its files concurrently.stageRunArtifactsto overlap launch uploads withsnapshotViaDABsUpload, while still waiting for both beforeruns/submit.Melookup.Why
AIR submission latency was dominated by sequential remote calls. These changes shorten the critical path without changing snapshot packaging or content-addressing behavior.
air get,air logs, and--watchresolve run details when needed.runs/submitis called only after both complete successfully.remote_volumebehavior remains unchanged.Tests
Live submission latency on df1:
ts_smokesnapshotValidation:
go test ./experimental/air/cmd— pass.This PR was written with Codex.