Repository navigation
air: drop redundant /Me calls from air logs and air get - #7613
Merged
Merged
Conversation
`air logs`, `air get`, and `air run --watch` called CurrentUser.Me before every GetRun to tell a bad credential apart from a failed request. Run the probe only when GetRun fails with 401/403, the one case where the two are ambiguous, so successful calls save a round trip and error classification is unchanged. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
`air get` called CurrentWorkspaceID, a second /Me request, to build the run URL's ?o= hint. Use auth.ResolveWorkspaceID, as `air run` does, so the ID comes from the profile, environment, or host metadata and /Me is only called when none is set. A configured ID that is not numeric is now reported as an invalid argument. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 0e11cae
Top 3 slowest tests (at least 2 minutes):
|
ethanma-db
approved these changes
Nov 13, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 13, 2026
# Conflicts: # cmd/air/run_watch_test.go
Collaborator
❌ Integration test reportCommit: c4559ed
16 interesting tests: 9 flaky, 7 RECOVERED
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
air logs,air get, andair run --watchcalledCurrentUser.Mebefore everyGetRunto tell a bad credential apart from a failed request. The probe now runs only whenGetRunfails with 401/403, the one case where a bad credential and missing access to the run look the same. Error classification is unchanged.air getbuilt the run URL's?o=hint withCurrentWorkspaceID, a second/Merequest. It now usesauth.ResolveWorkspaceID, asair rundoes, so the ID comes from the profile, environment, or host metadata.One behavior change: a configured workspace ID that is not numeric (e.g.
DATABRICKS_WORKSPACE_ID=abcwith env-only auth) now failsair getwithINVALID_ARGSinstead of being ignored. That value is also sent as the routing header on every request.Why
air getdrops both/Mecalls andair logsdrops one. On df1,air logs <id> --node 5(GetRun plus the local node check) went from 196ms to 101ms median.Tests
UNAUTHENTICATED; a transient probe failure stays retryable; a 403 with valid credentials is not an auth failure; the successfulair logstest server fails on any/Me;air getuses a configured ID with no/Me, looks it up once when unset, and rejects a non-numeric one.go test ./cmd/air,TestAccept/air, lint pass.workspace_idin profile, bad token, nonexistent run, valid/invalid--node; text and JSON): identical output and exit codes, minus the/Mecalls. Also identicalair getwhile a run was pending and after it finished, identicalair logsfollowing it live, a watched run toTERMINATED SUCCESS, andair cancel.This pull request and its description were written by Isaac.