Skip to content

fix(bundle): match modern CLI run URL in JobRunStatus.parseId - #2018

Merged
anton-107 merged 1 commit into
mainfrom
fix/parseid-modern-cli-run-url
Jul 16, 2026
Merged

fix(bundle): match modern CLI run URL in JobRunStatus.parseId#2018
anton-107 merged 1 commit into
mainfrom
fix/parseid-modern-cli-run-url

Conversation

@anton-107

Copy link
Copy Markdown
Contributor

Summary

Fixes a product bug where the Bundle Resource Explorer shows a permanent, false "Timeout while fetching run status" for a job that actually succeeded.

The databricks CLI changed the run URL it prints from the legacy #job/<id>/run/<id> fragment to the modern /jobs/<id>/runs/<id>?o=.. path. JobRunStatus.parseId only matched the singular /run/ form, so with a current CLI the extension never captures the run id — startPolling() never runs, and the 60s no-run-id timer flips the tree item to a timeout state even though the run completed fine.

Fix

  • Match both /run/ and /runs/ with /\/runs?\/(\d+)/.
  • Use \d+ instead of \d* so a stdout chunk that splits right after /run(s)/ can't yield an empty capture (parseInt("") === NaN).
  • Add JobRunStatus.test.ts pinning the CLI-output contract for both the modern and legacy URL forms (there was no unit coverage on this parser, which is how the regression shipped).

Evidence

Found via the vscode nightly e2e run (https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/29475140909). The CLI --debug log shows POST /api/2.2/jobs/run-now succeeding and the run reaching SUCCESS/TERMINATED, with the CLI printing Run available at https://.../jobs/<id>/runs/<id>?o=..., while the extension tree item stayed at "Timeout while fetching run status" for the full window. Verified in node that the new regex captures the id from the modern URL, the Run available at form, and the legacy fragment, and does not mis-capture the job id from /jobs/<id>.

Impact

Affects every user whose bundled CLI prints the modern run URL — candidate for a point release.

This pull request and its description were written by Isaac.

The databricks CLI changed the job-run URL it prints from the legacy
"#job/<id>/run/<id>" fragment to the modern "/jobs/<id>/runs/<id>?o=.."
path. JobRunStatus.parseId only matched the singular "/run/" form, so with
a current CLI the extension never captured the run id: startPolling() never
ran and the 60s no-run-id timer flipped the tree item to a permanent false
"Timeout while fetching run status" for jobs that actually succeeded.

Match both "/run/" and "/runs/" with /\/runs?\/(\d+)/, and use \d+ instead
of \d* so a stdout chunk splitting right after "/run(s)/" cannot yield an
empty capture (parseInt("") === NaN). Add unit tests pinning the CLI-output
contract for both the modern and legacy URL forms.

Co-authored-by: Isaac
@anton-107
anton-107 temporarily deployed to test-trigger-is July 16, 2026 11:08 — with GitHub Actions Inactive
@anton-107
anton-107 temporarily deployed to test-trigger-is July 16, 2026 11:09 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 2018
  • Commit SHA: 361d8f30fbd774f7887653a1dd9cd4eefb99ca4a

Checks will be approved automatically on success.

@rugpanov

Copy link
Copy Markdown
Contributor

🤖 Integration tests triggered for 361d8f30 — ⏳ running.
View run

@anton-107

Copy link
Copy Markdown
Contributor Author

✅ Validated in CI

The nightly PR pipeline (vscode-isolated-pr run 29494422973) confirms the fix against the real CLI:

  • deploy_and_run_job.e2e.tsPASSED on the Linux shard. The tree item reached Run status: Success, whereas before this change it hung on the false Timeout while fetching run status for the full window.
  • Unit tests (incl. the new JobRunStatus.test.ts) pass.

The two remaining Linux failures on this run are pre-existing and unrelated to this PR:

  • run_dbconnect.ucws — the notebook "Run All" flakiness (tracked separately in the run_dbconnect de-flake PR).
  • deploy_and_run_pipeline — a genuine backend pipeline update failure (Update … is FAILED); PipelineRunStatus.parseId polled correctly, so this is not a parsing issue and is out of scope here.

@anton-107
anton-107 merged commit d8f06d7 into main Jul 16, 2026
7 of 9 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 30, 2026
rugpanov added a commit that referenced this pull request Jul 30, 2026
Drop internal/CI-only entries (test(e2e), chore(deps)) and the inert
python-setup feat series (disabled-by-default feature flag, not yet
wired). Keep the two user-visible changes: the #2018 job-run URL fix and
the Databricks CLI v1.9.0 bump.
rugpanov added a commit that referenced this pull request Jul 30, 2026
## Release: v2.12.4

Patch release. Curated to the user-visible changes; internal/CI-only
commits
(`test(e2e)`, `chore(deps)`) and the inert `python-setup` feat series
(disabled-by-default feature flag, not yet wired) are excluded from the
changelog.

### packages/databricks-vscode

- Fix job run status not updating when the CLI returns a modern job-run
URL (#2018)
- Update Databricks CLI to v1.9.0 (#2035) — see the [CLI release
notes](https://github.com/databricks/cli/releases) for changes since
v1.7.0

### packages/databricks-vscode-types

_No user-facing changes._

---

Tracking: DECO-27846

---------

Co-authored-by: releasebot <noreply@github.com>
Co-authored-by: @rugpanov <gripanov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants