Commit c71ec40
authored
databricks experimental open: emit ?w= URL query parameter (#5369)
## 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 switches `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 anywhere the CLI parses host
URLs; only the emitted form changes.
## Scope
- `libs/workspaceurls/urls.go` — `workspaceBaseURL` now adds `w=<id>`,
docstring on `BuildResourceURL` updated.
- `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.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. The bundle path can flip in a separate change.
## Test plan
- [x] `go test ./libs/workspaceurls/... ./cmd/experimental/...` — green
- [x] `go test ./acceptance -run 'TestAccept/experimental/open'` — green
(golden file regenerated)
- [x] `./task lint-q` — 0 issues; `./task fmt` — no changes1 parent ea9ff34 commit c71ec40
67 files changed
Lines changed: 312 additions & 189 deletions
File tree
- acceptance
- bundle
- bundle_tag
- id
- url_ref
- url
- deployment/bind
- database_instance
- pipelines
- recreate
- update
- sql_warehouse
- deploy/wal
- chain-3-jobs
- corrupted-wal-entry
- open
- resource_deps/create_error
- resources
- alerts/with_file
- dashboards/detect-change
- database_instances/single-instance
- jobs/check-metadata
- postgres_branches
- postgres_catalogs
- postgres_endpoints
- postgres_projects
- postgres_synced_tables
- schemas/recreate
- sql_warehouses
- synced_database_tables/basic
- vector_search_endpoints/basic
- vector_search_indexes/basic
- volumes
- change-comment
- change-name
- change-schema-name
- state/force_pull_commands
- summary/modified_status
- templates/default-python/integration_classic
- user_agent
- simple
- experimental/open
- pipelines
- deploy
- auto-approve
- create-pipeline
- fail-on-active-runs
- force-lock
- render-diagnostics-warning
- var-flag
- destroy
- auto-approve
- destroy-pipeline
- force-lock
- dry-run
- dry-run-pipeline
- no-wait
- restart
- e2e
- open/open-after-deployment
- run
- no-wait
- refresh-flags
- restart
- run-info
- stop
- bundle/config/mutator
- cmd
- apps
- experimental
- experimental/ssh/internal/client
- libs
- apps/runlocal
- auth
- workspaceurls
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
0 commit comments