Skip to content

[VPEX][11] Default serverless target to v5#5962

Merged
rugpanov merged 1 commit into
mainfrom
dbconnect/12-serverless-v5
Jul 20, 2026
Merged

[VPEX][11] Default serverless target to v5#5962
rugpanov merged 1 commit into
mainfrom
dbconnect/12-serverless-v5

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

Stacked on #5961 (--cluster-name) → #5960#5959.

What

Per the [P0] CLI Changes spec, the serverless stand-in used when the source does not pin a version is now serverless-v5 (was v4).

Applies only to the fallback cases:

  • a serverless --job-id whose environment records no version, and
  • a bundle that records serverless without a version.

Explicitly passing --serverless-version <vN> is unaffected.

Changes

  • Introduce defaultServerlessVersion = "v5" in envkey.go, used at both fallback sites in target.go so the default lives in one place.
  • Update the two unit tests that assert the default.

No acceptance goldens change: all serverless acceptance tests pass --serverless-version v4 explicitly, so none exercise the default path.

Note

VS Code resolves the real serverless version itself and passes --serverless-version explicitly (spec §63), so this fallback is only hit when the version is genuinely unknown — but v5 is now the correct stand-in per spec.

This pull request and its description were written by Isaac.

@rugpanov rugpanov changed the title [VPEX] Default serverless target to v5 [VPEX][11] Default serverless target to v5 Jul 17, 2026
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 9d8fc59

Run: 29737874401

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 227 1126 4:39
💚​ aws windows 4 4 229 1124 6:45
💚​ aws-ucws linux 4 4 314 1043 7:59
💚​ aws-ucws windows 4 4 316 1041 9:54
💚​ azure linux 4 4 227 1125 4:37
💚​ azure windows 4 4 229 1123 6:47
💚​ azure-ucws linux 4 4 316 1040 8:37
💚​ azure-ucws windows 4 4 318 1038 8:48
💚​ gcp linux 4 4 226 1127 4:02
💚​ gcp windows 4 4 228 1125 6:40
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 10 slowest tests (at least 2 minutes):
duration env testname
8:00 aws-ucws windows TestAccept
6:26 azure-ucws windows TestAccept
6:21 aws windows TestAccept
6:20 azure windows TestAccept
6:18 gcp windows TestAccept
3:03 azure linux TestAccept
2:56 aws linux TestAccept
2:52 gcp linux TestAccept
2:52 azure-ucws linux TestAccept
2:48 aws-ucws linux TestAccept

@rugpanov
rugpanov force-pushed the dbconnect/12-serverless-v5 branch from 179ea18 to 846170a Compare July 17, 2026 13:27

@anton-107 anton-107 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed as part of the full stack (#5960#5965). Consolidating the default into defaultServerlessVersion and using it at both fallback sites is the right move. Approving.

Two things to fold in:

  • [medium] The v5 default has no end-to-end coverage — and nothing verifies serverless-v5 is actually published. No acceptance test exercises the default-serverless path (unpinned serverless job / bundle-serverless), and no test server serves serverless/serverless-v5/pyproject.toml (only v3/v4 exist under acceptance/localenv/*/test.toml). The two unit tests that "cover" the default (target_test.go:100, :153) assert against "serverless/serverless-"+defaultServerlessVersion — i.e. they compare the code to the same constant it uses, so they'd pass for any value. Net: if serverless-v5 isn't yet a published key in the (not-yet-public) constraints repo, a real user hitting the default gets E_ENV_UNSUPPORTED at fetch and no test in the repo would catch it. Since "default to v5" is the whole point of this PR, an acceptance case that serves serverless-v5 and drives the default path would be valuable.

  • [low] Stale v4 comments left behind. This PR moved the default to v5 but two code comments still say v4: cmd/environments/compute.go:78 ("falls back to v4 in ResolveTarget") and :116 ("the v4 fallback …"), plus the acceptance comment acceptance/localenv/job-serverless-check/test.toml:7 ("rather than defaulting to v4"). A reader reasoning about the unpinned-job path is told v4 when it's now v5.

Reviewed with AI assistance (build + unit tests + adversarial verification against the checked-out top of stack).

@rugpanov
rugpanov force-pushed the dbconnect/11-cluster-name branch 2 times, most recently from e5e16ab to 8e83519 Compare July 20, 2026 09:38
Base automatically changed from dbconnect/11-cluster-name to main July 20, 2026 11:05
Per the [P0] CLI Changes spec, the serverless stand-in used when the
source does not pin a version is now serverless-v5 (was v4). This applies
only to the fallback cases — a serverless job with no recorded version,
and a bundle that records 'serverless' without a version. Explicitly
passing --serverless-version is unaffected.

Introduce defaultServerlessVersion in envkey.go and use it at both
fallback sites so the default lives in one place. VS Code resolves the
real version itself and passes --serverless-version explicitly, so this
fallback applies only when the version is genuinely unknown.

Review (anton-107, #5962):
- Add serverless-default-check acceptance test: an unpinned serverless
  job resolves to serverless-v5 and fetches it end-to-end, so the v5
  default is actually exercised (and would break if v5 were unpublished).
- Assert concrete "serverless/serverless-v5" in the two default unit
  tests instead of "serverless-"+defaultServerlessVersion, which compared
  the constant to itself and passed for any value.
- Update stale v4 comments left by the default move (compute.go and
  job-serverless-check/test.toml) to v5.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the dbconnect/12-serverless-v5 branch from 846170a to 9d8fc59 Compare July 20, 2026 11:14
@rugpanov

Copy link
Copy Markdown
Contributor Author

Addressed both findings:

  • [medium] v5 default coverage + self-referential tests — added acceptance/localenv/serverless-default-check: an unpinned serverless job resolves envKey=serverless/serverless-v5 and fetches serverless-v5/pyproject.toml end-to-end, so the default is actually exercised (and would fail if v5 were unpublished or the default regressed). Also replaced the two "serverless/serverless-"+defaultServerlessVersion assertions with concrete "serverless/serverless-v5" so they no longer compare the constant to itself.
  • [low] stale v4 comments — updated to v5 in cmd/environments/compute.go (both the pin-fallback and environmentVersion doc) and acceptance/localenv/job-serverless-check/test.toml.

Also cascade-rebased onto main after PR 10 (#5961) merged.

@rugpanov
rugpanov enabled auto-merge July 20, 2026 11:24
@rugpanov
rugpanov added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 54b3b04 Jul 20, 2026
23 checks passed
@rugpanov
rugpanov deleted the dbconnect/12-serverless-v5 branch July 20, 2026 12:05
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 54b3b04

Run: 29740921832

Env ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 6 1 3 4 520 1055 41:00
❌​ aws windows 6 1 3 4 477 1068 57:41
💚​ aws-ucws linux 6 2 989 865 159:47
🔄​ aws-ucws windows 3 5 2 929 883 168:01
💚​ azure linux 4 4 520 1056 43:08
💚​ azure windows 4 4 477 1069 54:06
🔄​ azure-ucws linux 5 5 2 880 900 134:37
💚​ azure-ucws windows 6 2 826 918 140:24
🔄​ gcp linux 3 3 4 509 1061 43:50
🔄​ gcp windows 3 3 4 466 1074 61:43
24 interesting tests: 10 flaky, 6 FAIL, 5 RECOVERED, 2 SKIP, 1 KNOWN
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 🔄​f 💚​R 💚​R 🔄​f 💚​R 🔄​f 🔄​f
🔄​ TestAccept/bundle/deploy/snapshot-comparison ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/deploy/snapshot-comparison/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
💚​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/apps/inline_config ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/dashboards/change-name ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/dashboards/change-name/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/grants/registered_models 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s 🔄​f ✅​p 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/grants/registered_models/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p 🔄​f ✅​p
❌​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions ❌​F ❌​F ✅​p ✅​p 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions ❌​F ❌​F ✅​p ✅​p 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s
❌​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F ✅​p ✅​p
🔄​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​s 🙈​s ✅​p 🔄​f 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/postgres_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p 🔄​f
💚​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 50 slowest tests (at least 2 minutes):
duration env testname
13:02 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
12:49 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
12:48 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
10:44 azure-ucws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
9:27 aws linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
9:23 aws-ucws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
9:22 azure-ucws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
9:02 azure-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:35 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:22 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:15 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:05 azure-ucws linux TestAccept/bundle/resources/clusters/deploy/update-after-create/DATABRICKS_BUNDLE_ENGINE=direct
8:02 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:55 aws-ucws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:16 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
7:03 gcp linux TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
6:51 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:47 aws-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:31 aws-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:29 aws-ucws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
6:26 azure windows TestAccept/bundle/resources/clusters/deploy/data_security_mode/DATABRICKS_BUNDLE_ENGINE=direct
6:25 azure linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
6:23 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:21 azure-ucws windows TestAccept
6:15 azure windows TestAccept
6:15 azure-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:11 aws-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
6:09 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:54 azure-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:40 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
5:38 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:32 aws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:23 aws-ucws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
5:14 aws-ucws windows TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=yes/PY=yes/READPLAN=
5:10 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
5:08 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:07 aws-ucws linux TestAccept/bundle/templates/default-python/integration_classic/DATABRICKS_BUNDLE_ENGINE=terraform/UV_PYTHON=3.11
5:06 gcp windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
5:02 aws-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:52 azure-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:49 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:44 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:40 gcp linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
4:35 aws-ucws windows TestAccept/bundle/resources/postgres_roles/update/DATABRICKS_BUNDLE_ENGINE=terraform
4:34 gcp windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
4:34 aws-ucws linux TestAccept/bundle/resources/volumes/recreate/DATABRICKS_BUNDLE_ENGINE=terraform
4:33 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:30 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:28 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
4:28 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct

yansonggao-db pushed a commit to yansonggao-db/cli that referenced this pull request Jul 21, 2026
…icks#5965)

Stacked on databricks#5964databricks#5963databricks#5962databricks#5961databricks#5960databricks#5959.

## What

`--serverless-version` is now documented to take a **bare number** (e.g.
`5`) rather than `v5`.

- Input `5` is the documented form; `v5`/`V5` are still accepted
(tolerant).
- Both map to the same env key `serverless/serverless-vN`, so the
**environments-repo layout is unchanged** (still
`serverless/serverless-v5/…`).

## Changes

- Flag help: `e.g. v4` → `e.g. 5`; the `E_ENV_UNSUPPORTED` hint suggests
`--serverless-version 5`.
- `defaultServerlessVersion` stored in bare form (`"5"`); still resolves
to `serverless-v5` via `NormalizeServerless`.
- Acceptance scripts pass the bare form; env-key goldens unchanged
(`serverless-vN`).
- Unit tests cover bare + v-prefixed input and the default constant.

## Testing

`go build ./...`, lint (0 issues), deadcode clean, unit + acceptance
green.

This pull request and its description were written by Isaac.
tanishgupta-db pushed a commit to tanishgupta-db/cli that referenced this pull request Jul 21, 2026
Stacked on databricks#5962 (serverless-v5) → databricks#5961databricks#5960databricks#5959.

## What

Per the `[P0] CLI Changes` spec, a bad-flags usage error is now surfaced
as **`E_USAGE`** at the **preflight** phase, through the phase/JSON
contract — instead of a bare Cobra mutual-exclusion error printed before
`RunE` (which produces no command JSON object).

## Why

The VS Code extension branches on the JSON `error.code`. Previously,
passing two target flags triggered Cobra's `MarkFlagsMutuallyExclusive`
*before* `RunE`, so `--output json` emitted nothing structured. Now the
conflict is caught inside the pipeline and reported like any other phase
failure.

## Changes

- Add the `E_USAGE` error code.
- Validate target flags at the top of the pipeline's preflight →
`E_USAGE`, `diskMutated=false`.
- Drop `cmd.MarkFlagsMutuallyExclusive` and the redundant early-return
in `runPipeline` so the conflict flows into the pipeline.
- `flag-conflict` golden updated (now shows the phase table + preflight
error); new `flag-conflict-json` asserts `error{code:"E_USAGE",
failurePhase:"preflight"}`; pipeline unit test for the path.

## Testing

`go build ./...`, lint (0 issues), deadcode clean, unit + acceptance
green.

This pull request and its description were written by Isaac.
tanishgupta-db pushed a commit to tanishgupta-db/cli that referenced this pull request Jul 21, 2026
…ricks#5964)

Stacked on databricks#5963 (E_USAGE) → databricks#5962databricks#5961databricks#5960databricks#5959.

## What

Reconciles the error codes with the `[P0] CLI Changes` spec table (spec
item databricks#10). **No behavior change** — the code already emits the correct
set. The spec's table was stale:
- omitted `E_NOT_WRITABLE` (preflight) and `E_PYTHON_INSTALL`
(provision), and
- wrongly listed `E_UV_MISSING` as "reserved / not emitted" when the CLI
does emit it at preflight.

## Changes

- Annotate each `ErrorCode` constant with the phase that emits it, and
document the two spec codes the CLI deliberately never emits:
`E_PYTHON_POLICY` (no signal source yet) and `E_AUTH` (handled earlier
by `MustWorkspaceClient`). This makes the constant block the
authoritative reference the spec mirrors.
- Fix a `TargetInfo` doc comment that still said "four precedence
sources" — with `--cluster-name` there are now five flag sources (the
JSON `source` value is still one of cluster/serverless/job/bundle).

## Note

The spec doc's error-code table itself (in the VPEX ERD, a Google Doc)
has been updated separately to match — that's outside this repo.

## Testing

`go build ./...`, lint (0 issues), deadcode clean, unit + acceptance
green (comment-only code change).

This pull request and its description were written by Isaac.
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.

3 participants