From cb08628c4a81d5ce249546911a1228309035cfdd Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Wed, 17 Jun 2026 13:26:46 +0000 Subject: [PATCH] Print modern pipeline update URL from bundle run The CLI emitted a legacy hash-fragment URL (#joblist/pipelines//updates/) for pipeline updates. This switches to the modern path form (/pipelines//updates/) for consistency with the rest of the CLI's workspace URLs and with the job run URL change in #5142, where the legacy fragment form was found not to resolve for non-admin users permitted to view the run. Add a PipelineUpdatePath builder mirroring JobRunPath and emit the modern path form from NewPipelineUpdateUrlEvent. See https://github.com/databricks/cli/issues/5142. --- NEXT_CHANGELOG.md | 1 + acceptance/bundle/run/refresh-flags/output.txt | 8 ++++---- .../pipelines/dry-run/dry-run-pipeline/output.txt | 4 ++-- acceptance/pipelines/dry-run/no-wait/output.txt | 2 +- acceptance/pipelines/dry-run/restart/output.txt | 2 +- acceptance/pipelines/e2e/output.txt | 4 ++-- acceptance/pipelines/run/no-wait/output.txt | 2 +- acceptance/pipelines/run/refresh-flags/output.txt | 8 ++++---- acceptance/pipelines/run/restart/output.txt | 2 +- acceptance/pipelines/run/run-info/output.txt | 2 +- acceptance/pipelines/stop/output.txt | 2 +- bundle/run/progress/pipeline_events.go | 8 ++++++-- libs/workspaceurls/urls.go | 15 +++++++++++++++ libs/workspaceurls/urls_test.go | 4 ++++ 14 files changed, 44 insertions(+), 20 deletions(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 4964d71f064..d062cc2a82a 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -8,6 +8,7 @@ ### Bundles * `bundle run` now prints the modern job run URL (`/jobs//runs/`) so that non-admin users permitted to view the run are taken to the run instead of the workspace homepage. +* `bundle run` now prints the modern pipeline update URL (`/pipelines//updates/`) instead of the legacy `#joblist` hash-fragment URL, mirroring the job run URL change so the printed URL uses the modern path form. ### Dependency updates diff --git a/acceptance/bundle/run/refresh-flags/output.txt b/acceptance/bundle/run/refresh-flags/output.txt index 34d23f77407..63aa4fd7467 100644 --- a/acceptance/bundle/run/refresh-flags/output.txt +++ b/acceptance/bundle/run/refresh-flags/output.txt @@ -7,7 +7,7 @@ Deployment complete! === Running pipeline with --refresh flag and specific tables >>> [CLI] bundle run my_pipeline --refresh table1,table2 -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -25,7 +25,7 @@ Update ID: [UUID] === Running pipeline with --full-refresh-all flag >>> [CLI] bundle run my_pipeline --full-refresh-all -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -40,7 +40,7 @@ Update ID: [UUID] === Running pipeline with --full-refresh flag and specific tables >>> [CLI] bundle run my_pipeline --full-refresh table1,table2 -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -58,7 +58,7 @@ Update ID: [UUID] === Running pipeline with --full-refresh flag and --refresh flag >>> [CLI] bundle run my_pipeline --full-refresh table1,table2 --refresh table3,table4 -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/dry-run/dry-run-pipeline/output.txt b/acceptance/pipelines/dry-run/dry-run-pipeline/output.txt index 159397f0f9a..bb5f66876f1 100644 --- a/acceptance/pipelines/dry-run/dry-run-pipeline/output.txt +++ b/acceptance/pipelines/dry-run/dry-run-pipeline/output.txt @@ -12,7 +12,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] { @@ -29,7 +29,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] { diff --git a/acceptance/pipelines/dry-run/no-wait/output.txt b/acceptance/pipelines/dry-run/no-wait/output.txt index 853ee8f7b00..5b5cb85f02f 100644 --- a/acceptance/pipelines/dry-run/no-wait/output.txt +++ b/acceptance/pipelines/dry-run/no-wait/output.txt @@ -12,6 +12,6 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/dry-run/restart/output.txt b/acceptance/pipelines/dry-run/restart/output.txt index f6764e55d6d..de80efb40df 100644 --- a/acceptance/pipelines/dry-run/restart/output.txt +++ b/acceptance/pipelines/dry-run/restart/output.txt @@ -12,7 +12,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/e2e/output.txt b/acceptance/pipelines/e2e/output.txt index 8e029977b23..f7d50090af8 100644 --- a/acceptance/pipelines/e2e/output.txt +++ b/acceptance/pipelines/e2e/output.txt @@ -29,7 +29,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -80,7 +80,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/run/no-wait/output.txt b/acceptance/pipelines/run/no-wait/output.txt index 2ceb291d0dd..3e69f84e3e0 100644 --- a/acceptance/pipelines/run/no-wait/output.txt +++ b/acceptance/pipelines/run/no-wait/output.txt @@ -12,7 +12,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/run/refresh-flags/output.txt b/acceptance/pipelines/run/refresh-flags/output.txt index b7296296577..4f4cac6d7be 100644 --- a/acceptance/pipelines/run/refresh-flags/output.txt +++ b/acceptance/pipelines/run/refresh-flags/output.txt @@ -12,7 +12,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -39,7 +39,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -63,7 +63,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] @@ -90,7 +90,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/run/restart/output.txt b/acceptance/pipelines/run/restart/output.txt index 1ba6202cc03..bd718b6652d 100644 --- a/acceptance/pipelines/run/restart/output.txt +++ b/acceptance/pipelines/run/restart/output.txt @@ -12,7 +12,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/acceptance/pipelines/run/run-info/output.txt b/acceptance/pipelines/run/run-info/output.txt index ddbbe6a9d6e..dc721be89cc 100644 --- a/acceptance/pipelines/run/run-info/output.txt +++ b/acceptance/pipelines/run/run-info/output.txt @@ -12,7 +12,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/test-update-123 +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/test-update-123 [TIMESTAMP] update_progress "Update test-update-123 is COMPLETED." [TIMESTAMP] update_progress "Update test-update-123 is RUNNING." diff --git a/acceptance/pipelines/stop/output.txt b/acceptance/pipelines/stop/output.txt index 9c8cd6f57a6..8d95f110ceb 100644 --- a/acceptance/pipelines/stop/output.txt +++ b/acceptance/pipelines/stop/output.txt @@ -11,7 +11,7 @@ Recommendation: This command runs the last deployed version of the code If you've made local changes, run 'databricks pipelines deploy' first to ensure they are included. -Update URL: [DATABRICKS_URL]/#joblist/pipelines/[UUID]/updates/[UUID] +Update URL: [DATABRICKS_URL]/pipelines/[UUID]/updates/[UUID] Update ID: [UUID] diff --git a/bundle/run/progress/pipeline_events.go b/bundle/run/progress/pipeline_events.go index 22b56fac5fc..1ffa675c60b 100644 --- a/bundle/run/progress/pipeline_events.go +++ b/bundle/run/progress/pipeline_events.go @@ -1,6 +1,10 @@ package progress -import "fmt" +import ( + "fmt" + + "github.com/databricks/cli/libs/workspaceurls" +) type PipelineUpdateUrlEvent struct { Type string `json:"type"` @@ -14,7 +18,7 @@ func NewPipelineUpdateUrlEvent(host, updateId, pipelineId string) *PipelineUpdat Type: "pipeline_update_url", UpdateId: updateId, PipelineId: pipelineId, - Url: fmt.Sprintf("%s/#joblist/pipelines/%s/updates/%s", host, pipelineId, updateId), + Url: fmt.Sprintf("%s/%s", host, workspaceurls.PipelineUpdatePath(pipelineId, updateId)), } } diff --git a/libs/workspaceurls/urls.go b/libs/workspaceurls/urls.go index f599139e340..d9ec31a7dee 100644 --- a/libs/workspaceurls/urls.go +++ b/libs/workspaceurls/urls.go @@ -81,6 +81,21 @@ func JobRunPath(jobID, runID string) string { return fmt.Sprintf("jobs/%s/runs/%s", jobID, runID) } +// PipelineUpdatePath returns the modern workspace path for a pipeline update, of +// the form +// +// pipelines//updates/ +// +// Callers join this onto a workspace base URL. The CLI historically emitted a +// legacy hash-fragment URL (#joblist/pipelines//updates/); this switches +// to the modern path form for consistency with the rest of the package and with +// the job run URL fix, where the legacy fragment form was found not to resolve +// for non-admin users permitted to view the run. +// See https://github.com/databricks/cli/issues/5142. +func PipelineUpdatePath(pipelineID, updateID string) string { + return fmt.Sprintf("pipelines/%s/updates/%s", pipelineID, updateID) +} + // ResourceURL constructs a workspace URL for a named resource type and ID. func ResourceURL(baseURL url.URL, resourceType, id string) string { resourceType = resolveAlias(resourceType) diff --git a/libs/workspaceurls/urls_test.go b/libs/workspaceurls/urls_test.go index 683b9c470e7..8ffe9497238 100644 --- a/libs/workspaceurls/urls_test.go +++ b/libs/workspaceurls/urls_test.go @@ -35,6 +35,10 @@ func TestJobRunPath(t *testing.T) { assert.Equal(t, "jobs/123/runs/456", JobRunPath("123", "456")) } +func TestPipelineUpdatePath(t *testing.T) { + assert.Equal(t, "pipelines/abc-def/updates/upd-1", PipelineUpdatePath("abc-def", "upd-1")) +} + func TestResourceTypes(t *testing.T) { types := ResourceTypes() assert.NotEmpty(t, types)