databricks experimental open: emit ?w= URL query parameter#5369
Open
Divyansh-db wants to merge 4 commits into
Open
databricks experimental open: emit ?w= URL query parameter#5369Divyansh-db wants to merge 4 commits into
Divyansh-db wants to merge 4 commits into
Conversation
The Databricks UI is migrating from ?o=<workspace-id> to ?w=<workspace-id> as the SPOG URL query parameter, matching the recent workspace addressing header rename. Switch BuildResourceURL in libs/workspaceurls to write ?w= when appending the workspace identifier. This affects URLs printed by databricks experimental open. The legacy ?o= URL spelling remains a valid input wherever the CLI parses host URLs; only the emitted form changes. bundle/config/mutator/initialize_urls.go also adds a workspace identifier query parameter, but it does so before calling ResourceURL with an already-built baseURL, so this change does not affect bundle output.
# Conflicts: # cmd/experimental/workspace_open_test.go
Collaborator
|
Commit: 22d9bd7 |
andrewnester
approved these changes
May 29, 2026
|
|
||
| values := baseURL.Query() | ||
| values.Add("o", orgID) | ||
| values.Add("w", wsID) |
Contributor
There was a problem hiding this comment.
There's a similar change needed here: https://github.com/databricks/cli/blob/main/bundle/config/mutator/initialize_urls.go#L56
Contributor
hectorcast-db
left a comment
There was a problem hiding this comment.
Current code LGTM. I will review it again after the missing change is added.
bundle/config/mutator/initialize_urls.go is the bundle-side counterpart of libs/workspaceurls/workspaceBaseURL: it appends ?o=<workspace-id> to every resource URL printed by `databricks bundle summary`. Flip it to emit ?w= to match the new workspace addressing convention. The 12 bundle resource URL builders that consume the baseURL (alerts, apps, pipelines, jobs, dashboards, experiments, models, model serving, registered models, clusters, sql warehouses, vector search) all inherit the new spelling without code changes since they just append the resource path/fragment to the baseURL. Updates: - bundle/config/mutator/initialize_urls.go: emit ?w= instead of ?o=, rename local orgId → workspaceID, refresh the comment. - bundle/config/mutator/initialize_urls_test.go: ~10 expected-URL assertions flipped from ?o= to ?w=. - 18 acceptance/bundle/** golden files regenerated with ?w=. - 12 acceptance/bundle/** test.toml scrub patterns widened from \?o=... to \?[ow]=... so they match both the new (?w=) and legacy (?o=) URL parameter forms. `Run URL: ...?o=...` lines in run / deploy / spark task / integration_whl fixtures are intentionally left as ?o= — those URLs come from the platform API's RunPageUrl response field, not from CLI code, and the API response side has not migrated yet (asymmetric migration; the platform still echoes ?o= until the response-side rename ships).
The acceptance/pipelines tree exercises the pipelines-binary mode of the CLI; `databricks pipelines deploy` and friends print resource URLs via the same bundle/config/mutator/initialize_urls.go path that PR 3 just flipped to ?w=. Regenerate the 19 affected golden files to match. The open-after-deployment/output.txt golden is part of a macOS-only test (its test.toml sets GOOS.windows = false and GOOS.linux = false) so ./task test-update can't regenerate it locally; that one is updated by hand as a mass literal swap, which is the explicit exception called out in .agent/rules/auto-generated-files.md.
simonfaltum
approved these changes
May 30, 2026
Member
simonfaltum
left a comment
There was a problem hiding this comment.
Reviewed the URL emission changes and the related stack. The only remaining nit I found on this PR is that this is user-visible output and does not add a NEXT_CHANGELOG.md entry, but I do not think that should block approval. The ?w= parsing concern is handled in the companion PR #5373, so this stack should land with that parser support before/alongside this change.
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.
Summary
The Databricks UI is migrating from
?o=<workspace-id>to?w=<workspace-id>as the SPOG URL query parameter, matching the recent workspace addressing header rename. This PR switchesBuildResourceURLinlibs/workspaceurlsto write?w=when appending the workspace identifier.This affects URLs printed by
databricks experimental open. The legacy?o=URL spelling remains a valid input anywhere the CLI parses host URLs; only the emitted form changes.Scope
libs/workspaceurls/urls.go—workspaceBaseURLnow addsw=<id>, docstring onBuildResourceURLupdated.libs/workspaceurls/urls_test.go— expected URLs flipped.cmd/experimental/workspace_open_test.go— expected URLs flipped.acceptance/experimental/open/output.txt— regenerated via./task test-update.bundle/config/mutator/initialize_urls.goalso adds a workspace identifier query parameter, but it does so before callingResourceURLwith an already-built baseURL, so this change does not affect bundle output. The bundle path can flip in a separate change.Test plan
go test ./libs/workspaceurls/... ./cmd/experimental/...— greengo test ./acceptance -run 'TestAccept/experimental/open'— green (golden file regenerated)./task lint-q— 0 issues;./task fmt— no changes