config: also extract ?w= from Host URL#1704
Merged
Divyansh-db merged 1 commit intoMay 28, 2026
Merged
Conversation
Builds on #1699, which promotes ?o=/?workspace_id= and ?a=/?account_id= from the Host URL into Config.WorkspaceID/Config.AccountID during fixHostIfNeeded. ?w= is the unified workspace addressing query parameter that supersedes ?o=/?workspace_id=. Unlike the older forms, ?w= accepts a broader range of workspace identifier formats — both classic numeric workspace IDs and other identifier formats the server understands — so the numeric-only validation applied to ?o=/?workspace_id= is intentionally not applied to ?w=. Priority order in workspaceIDFromQuery becomes: 1. ?w= (any non-empty value) 2. ?o= (numeric only) 3. ?workspace_id= (numeric only) Existing Config.WorkspaceID is still never overwritten. Tests added to the existing table-driven TestConfig_fixHostIfNeeded_extractsWorkspaceIDFromQuery: - ?w= with a numeric value is promoted - ?w= with a non-numeric (UUID-shaped) value is promoted as-is - ?w= takes precedence over ?o= when both are present - existing Config.WorkspaceID is preserved over ?w= NO_CHANGELOG=true Co-authored-by: Isaac Signed-off-by: Divyansh Vijayvergia <divyansh.vijayvergia@databricks.com>
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
hectorcast-db
approved these changes
May 28, 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
Follow-up to #1699, which started promoting
?o=/?workspace_id=and?a=/?account_id=fromConfig.HostintoConfig.WorkspaceID/Config.AccountIDduringfixHostIfNeeded.?w=is the unified workspace addressing query parameter that supersedes?o=/?workspace_id=. It accepts a broader range of workspace identifier formats — both classic numeric workspace IDs and other identifier formats the server understands — so the numeric-only validation applied to?o=/?workspace_id=is intentionally not applied to?w=.Priority order in
workspaceIDFromQuerybecomes:?w=— any non-empty value?o=— numeric only?workspace_id=— numeric onlyExisting
Config.WorkspaceIDis still never overwritten.Tests
Four cases added to the existing
TestConfig_fixHostIfNeeded_extractsWorkspaceIDFromQuerytable-driven test:?w=12345is promoted toConfig.WorkspaceID.?w=7a99b43c-b46c-432b-b0a7-814217701909(UUID-shaped) is promoted as-is.?w=takes precedence over?o=when both appear.Config.WorkspaceIDis preserved when?w=is present.make fmt test lintclean.NO_CHANGELOG=true