Repository navigation
air: request only userName from SCIM Me when resolving the launch directory - #7153
Merged
Merged
Conversation
`air run` resolves the user with SCIM Me before it can build the command path that config validation needs, so the two calls ran back to back. - Ask SCIM Me for only `userName`; the full response also resolves groups and entitlements. - When the workspace's own OAuth token names a user, start validation on that user's path while SCIM Me is in flight. SCIM's answer still decides the launch directory: if it differs from the token, validation reruns on SCIM's path before anything is created, uploaded, or submitted. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Leaves userWorkspaceDir and its tests unchanged: the token's guess is checked against its answer, so an override is handled like any other mismatch. Co-authored-by: Isaac <no-reply@databricks.com>
…ides Only databricks-cli and oauth-m2m serve Token from the cache request headers use; azure-cli and similar providers would fetch a fresh token just to read it. A configured directory override is used as the guess, so override users still validate once. Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
Integration test reportCommit: ecdd14c
Top 3 slowest tests (at least 2 minutes):
|
The overlap saved ~30ms on top of the trimmed call but carried most of the change's complexity, so keep just `attributes=userName`. Co-authored-by: Isaac <no-reply@databricks.com>
ben-hansen-db
approved these changes
Oct 21, 2026
caroline-db
approved these changes
Oct 21, 2026
Collaborator
Integration test reportCommit: 59e8aa3
62 interesting tests: 58 FAIL, 4 flaky
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 runnow asks SCIM Me for onlyuserName(attributes=userName) when it resolves the launch directory.Why
The launch directory needs only the user name, but the full SCIM Me response also resolves groups and entitlements. On a test workspace the trimmed call took 50ms at the median versus 94ms for the full one (40 calls each), and
air run --dry-rundropped from 150ms to 101ms at the median (25 runs per build, alternating).Tests
attributes=userNameand the launch directory is unchanged.go test ./cmd/air/andgo test ./acceptance -run TestAccept/airpass;./task fmt,./task checks, and./task lintare clean.air run --dry-runagainst a real workspace sendsGET /api/2.0/preview/scim/v2/Me?attributes=userNameand resolves the same launch directory as before.This pull request and its description were written by Isaac.