Print modern job run URL from bundle run#5629
Merged
Merged
Conversation
Collaborator
Integration test reportCommit: 745c7db
21 interesting tests: 14 SKIP, 7 KNOWN
Top 25 slowest tests (at least 2 minutes):
|
janniklasrose
approved these changes
Jun 17, 2026
The Jobs API returns RunPageUrl in the legacy hash-fragment form (https://<host>/?o=<id>#job/<jobID>/run/<runID>), which relies on a client-side redirect that only resolves for workspace admins. Non-admin users permitted to view the run (e.g. CAN_VIEW) are dropped on the workspace homepage instead. Convert the URL to the modern path form (https://<host>/jobs/<jobID>/runs/<runID>?o=<id>) before printing it so any permitted user reaches the run. Fixes #5142.
Move the legacy->modern run URL remapping out of libs/workspaceurls and into bundle/run/job.go, where the dependency on the Jobs API URL format belongs. The library now exposes a pure JobRunPath(jobID, runID) builder matching the rest of the package, while runPageURL parses the legacy fragment and reconstructs the modern path, preserving the ?o= selector.
88f9d67 to
745c7db
Compare
andrewnester
approved these changes
Jun 17, 2026
Collaborator
Integration test reportCommit: 5ed94c6
598 interesting tests: 543 MISS, 42 FAIL, 4 KNOWN, 4 flaky, 3 PANIC, 2 SKIP
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
databricks bundle run <job>now converts the job run URL returned by the Jobs API from the legacy hash-fragment form (/?o=<id>#job/<jobID>/run/<runID>) to the modern path form (/jobs/<jobID>/runs/<runID>?o=<id>) before printing it.The logic is split by responsibility:
workspaceurls.JobRunPath(jobID, runID)is a pure builder that returns the modernjobs/<jobID>/runs/<runID>path, matching the rest of the package (parameters in, URL out).runPageURLinbundle/run/job.goowns the remapping of the server-returned URL: it parses the legacy fragment, rebuilds the path viaJobRunPath, and preserves the?o=workspace selector. On an unexpected URL shape it falls back to the original (the URL is cosmetic and must not breakbundle run).Why
The legacy fragment URL relies on a client-side redirect that only resolves for workspace admins. Non-admin users permitted to view the run (e.g.
CAN_VIEW) are sent to the workspace homepage instead. The modern path form resolves for any permitted user. Fixes #5142.Tests
TestJobRunPathunit test for the pure builder inlibs/workspaceurls.TestRunPageURLinbundle/runcovers the end-to-end conversion: happy path, missingo, host-with-port, and the unchanged-on-unexpected-format cases (already-modern, incomplete fragment, empty job id), asserting the?o=selector is preserved.bundle runacceptance fixtures; the cloud-gatedintegration_whl/*andresources/clusters/runfixtures got the same deterministic URL transform since they can't run locally.