Skip to content

[VPEX][12] Report incompatible target flags as E_USAGE#5963

Merged
rugpanov merged 3 commits into
mainfrom
dbconnect/13-usage-error
Jul 20, 2026
Merged

[VPEX][12] Report incompatible target flags as E_USAGE#5963
rugpanov merged 3 commits into
mainfrom
dbconnect/13-usage-error

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

Stacked on #5962 (serverless-v5) → #5961#5960#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.

@rugpanov rugpanov changed the title [VPEX] Report incompatible target flags as E_USAGE [VPEX][12] Report incompatible target flags as E_USAGE Jul 17, 2026
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: d5c4d6f

Run: 29757112896

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 227 1127 3:15
💚​ aws windows 4 4 229 1125 3:55
💚​ aws-ucws linux 4 4 314 1044 4:16
💚​ aws-ucws windows 4 4 316 1042 4:03
💚​ azure linux 4 4 227 1126 3:25
💚​ azure windows 4 4 229 1124 2:46
💚​ azure-ucws linux 4 4 316 1041 5:18
💚​ azure-ucws windows 4 4 318 1039 3:37
💚​ gcp linux 4 4 226 1128 2:42
💚​ gcp windows 4 4 228 1126 2:32
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 1 slowest tests (at least 2 minutes):
duration env testname
2:11 aws windows TestAccept

@rugpanov
rugpanov force-pushed the dbconnect/12-serverless-v5 branch from 179ea18 to 846170a Compare July 17, 2026 13:27
@rugpanov
rugpanov force-pushed the dbconnect/13-usage-error branch from f20628a to 6b4a2a4 Compare July 17, 2026 13:27
rugpanov added a commit that referenced this pull request Jul 17, 2026
…ssage

codex P2 on #5963: with --output json, error.message came from
PipelineError.Msg only ('invalid compute target flags'), while the
wrapped validation error is json:"-" — so JSON consumers lost which
flags conflicted. Fold the validation detail into Msg (and do not wrap
err, since PipelineError.Error() appends a non-nil Err and would
duplicate the detail in text output; E_USAGE is the stable contract, not
the raw error). Both text and JSON now carry the full actionable message.

Co-authored-by: Isaac

@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). The intent here is right — routing the mutual-exclusion conflict through the phase/JSON contract so --output json emits a structured error instead of a bare pre-RunE Cobra error. Removing the runPipeline early return is safe: ValidateTargetFlags still runs at pipeline preflight (pipeline.go:100), with ResolveTarget (target.go:73) as a defensive second check, so no call path goes unvalidated. Leaving this as a comment (not a block), but two gaps undercut the stated rationale and are worth addressing before this is relied on:

  • [high] The JSON error object drops the actionable detail. PipelineError.Err is json:"-" (libs/localenv/result.go:98), so the emitted object is just {"code":"E_USAGE","failurePhase":"preflight","message":"invalid compute target flags"} — it never says which flags conflict. The text path shows the full …: flags --cluster-id and --serverless-version are mutually exclusive; specify at most one (compare goldens flag-conflict/output.txt vs flag-conflict-json/output.txt). So the --output json consumer this PR is written to serve gets strictly less information than the terminal user. This is not E_USAGE-specific: the same loss makes E_RESOLVE's ambiguous-vs-unknown cluster-name cases marshal to byte-identical JSON, and drops the job-ambiguity detail too. If the JSON contract matters, folding the cause into Msg (or serializing Error()) is the fix.

  • [medium] E_USAGE is unreachable in JSON mode when auth isn't set up. setup_local.go:40 sets PreRunE = root.MustWorkspaceClient, which Cobra runs before RunE (and thus before the preflight where E_USAGE is emitted). A flag conflict needs zero workspace access, yet with no/invalid auth the user gets a plain non-JSON auth error, never the promised {"code":"E_USAGE"} object — precisely in the "haven't logged in yet" case.

  • [low] JSON contract untested for the lossy codes. The only --output json goldens cover E_USAGE and E_NO_TARGET — the two codes whose whole message lives in Msg (nothing to lose). No JSON golden exercises E_RESOLVE / E_FETCH / E_ENV_UNSUPPORTED, which are exactly the paths where the message-loss above bites, so a regression there would pass CI.

  • [low] Shell completion no longer signals mutual exclusivity. Dropping MarkFlagsMutuallyExclusive means completion no longer hides the sibling target flags after one is set (verified against a built binary). Acceptable given the command is hidden/experimental — flagging for awareness, not as a blocker.

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

rugpanov added a commit that referenced this pull request Jul 20, 2026
Follow-up to #5963 review (anton-107 [high]): PipelineError.Err is
json:"-", so the --json error object carried only Msg and dropped the
wrapped cause — a JSON consumer got strictly less than the text output.
This bit every code that wraps a cause (E_RESOLVE ambiguous-vs-unknown
cluster name, E_FETCH, E_ENV_UNSUPPORTED, the job-ambiguity detail), not
just E_USAGE.

Fix at the serialization layer: PipelineError.MarshalJSON now folds
Error() (Msg + cause) into the "message" field, so text and JSON always
agree. Revert the E_USAGE-specific message fold (no longer needed) back to
wrapping err, which keeps errors.Is/As chaining intact.

Add cluster-name-ambiguous-json to lock in the E_RESOLVE JSON detail —
previously only E_USAGE and E_NO_TARGET (whose whole message is in Msg)
had JSON goldens, so the loss was untested where it bit.

Co-authored-by: Isaac
@rugpanov

Copy link
Copy Markdown
Contributor Author

Addressed. Two substantive gaps, both fixed:

[high] JSON dropped the actionable detail — fixed at the serialization layer rather than per-code: PipelineError.MarshalJSON now folds Error() (Msg + wrapped cause) into the message field, so text and JSON always agree. This covers every wrapping code (E_RESOLVE ambiguous-vs-unknown, E_FETCH, E_ENV_UNSUPPORTED, job-ambiguity), not just E_USAGE. Reverted the E_USAGE-specific message fold back to wrapping err (keeps errors.Is/As intact).

[low] JSON contract untested for lossy codes — added cluster-name-ambiguous-json, which asserts the E_RESOLVE JSON message now carries resolving cluster name "dup": there are 2 active clusters named "dup"....

[medium] E_USAGE unreachable in JSON when auth unset (PreRunE MustWorkspaceClient runs before the pipeline) — real, but the fix is the same command-bootstrap rewrite as the deferred "serverless doesn't need auth" item; tracking it separately rather than reworking auth wiring in this PR.

[low] completion no longer signals mutual exclusivity — acknowledged; leaving as-is per your note (hidden/experimental command).

Fixes are on the branch (daaa47557).

@rugpanov
rugpanov force-pushed the dbconnect/12-serverless-v5 branch from 846170a to 9d8fc59 Compare July 20, 2026 11:14
Base automatically changed from dbconnect/12-serverless-v5 to main July 20, 2026 12:05
rugpanov added a commit that referenced this pull request Jul 20, 2026
…ssage

codex P2 on #5963: with --output json, error.message came from
PipelineError.Msg only ('invalid compute target flags'), while the
wrapped validation error is json:"-" — so JSON consumers lost which
flags conflicted. Fold the validation detail into Msg (and do not wrap
err, since PipelineError.Error() appends a non-nil Err and would
duplicate the detail in text output; E_USAGE is the stable contract, not
the raw error). Both text and JSON now carry the full actionable message.

Co-authored-by: Isaac
rugpanov added a commit that referenced this pull request Jul 20, 2026
Follow-up to #5963 review (anton-107 [high]): PipelineError.Err is
json:"-", so the --json error object carried only Msg and dropped the
wrapped cause — a JSON consumer got strictly less than the text output.
This bit every code that wraps a cause (E_RESOLVE ambiguous-vs-unknown
cluster name, E_FETCH, E_ENV_UNSUPPORTED, the job-ambiguity detail), not
just E_USAGE.

Fix at the serialization layer: PipelineError.MarshalJSON now folds
Error() (Msg + cause) into the "message" field, so text and JSON always
agree. Revert the E_USAGE-specific message fold (no longer needed) back to
wrapping err, which keeps errors.Is/As chaining intact.

Add cluster-name-ambiguous-json to lock in the E_RESOLVE JSON detail —
previously only E_USAGE and E_NO_TARGET (whose whole message is in Msg)
had JSON goldens, so the loss was untested where it bit.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the dbconnect/13-usage-error branch from daaa475 to ee1f606 Compare July 20, 2026 12:09

@rclarey rclarey 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.

LGTM

rugpanov added 3 commits July 20, 2026 17:48
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.

- Add the E_USAGE error code.
- Validate target flags at the top of the pipeline's preflight; a conflict
  fails preflight with E_USAGE (diskMutated=false).
- Drop cmd.MarkFlagsMutuallyExclusive and the redundant early return in
  runPipeline so the conflict flows into the pipeline and --output json
  emits the structured error{code:"E_USAGE", failurePhase:"preflight"}
  object the VS Code extension branches on.
- flag-conflict golden updated; new flag-conflict-json asserts the JSON
  error object; pipeline unit test for the E_USAGE path.

Co-authored-by: Isaac
…ssage

codex P2 on #5963: with --output json, error.message came from
PipelineError.Msg only ('invalid compute target flags'), while the
wrapped validation error is json:"-" — so JSON consumers lost which
flags conflicted. Fold the validation detail into Msg (and do not wrap
err, since PipelineError.Error() appends a non-nil Err and would
duplicate the detail in text output; E_USAGE is the stable contract, not
the raw error). Both text and JSON now carry the full actionable message.

Co-authored-by: Isaac
Follow-up to #5963 review (anton-107 [high]): PipelineError.Err is
json:"-", so the --json error object carried only Msg and dropped the
wrapped cause — a JSON consumer got strictly less than the text output.
This bit every code that wraps a cause (E_RESOLVE ambiguous-vs-unknown
cluster name, E_FETCH, E_ENV_UNSUPPORTED, the job-ambiguity detail), not
just E_USAGE.

Fix at the serialization layer: PipelineError.MarshalJSON now folds
Error() (Msg + cause) into the "message" field, so text and JSON always
agree. Revert the E_USAGE-specific message fold (no longer needed) back to
wrapping err, which keeps errors.Is/As chaining intact.

Add cluster-name-ambiguous-json to lock in the E_RESOLVE JSON detail —
previously only E_USAGE and E_NO_TARGET (whose whole message is in Msg)
had JSON goldens, so the loss was untested where it bit.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the dbconnect/13-usage-error branch from c0e7dea to d5c4d6f Compare July 20, 2026 15:51
@rugpanov
rugpanov added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 34d85ce Jul 20, 2026
23 checks passed
@rugpanov
rugpanov deleted the dbconnect/13-usage-error branch July 20, 2026 16:34
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 34d85ce

Run: 29760222905

Env ❌​FAIL 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 6 1 3 4 520 1056 38:27
❌​ aws windows 6 1 3 4 477 1069 50:41
🔄​ aws-ucws linux 3 5 2 985 867 92:29
🔄​ aws-ucws windows 6 5 2 924 885 107:52
🔄​ azure linux 3 3 4 518 1057 41:49
🔄​ azure windows 3 3 4 475 1070 48:41
💚​ azure-ucws linux 6 2 884 901 79:33
🔄​ azure-ucws windows 3 5 2 824 919 89:49
🔄​ gcp linux 3 3 4 509 1062 42:11
💚​ gcp windows 4 4 468 1075 46:20
25 interesting tests: 12 flaky, 6 FAIL, 4 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 🔄​f 💚​R 🔄​f 🔄​f 💚​R 🔄​f 🔄​f 💚​R
💚​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/apps/lifecycle-started-toggle ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/dashboards/change-name ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestAccept/bundle/resources/dashboards/change-name/DATABRICKS_BUNDLE_ENGINE=terraform ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​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_synced_tables/recreate 🙈​s 🙈​s 🔄​f 🔄​f 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s 🙈​s
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DATABRICKS_BUNDLE_ENGINE=direct 🔄​f 🔄​f
🔄​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 💚​R 🔄​f 🙈​S 🙈​S 💚​R 💚​R 🙈​S 🙈​S
🔄​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name/DATABRICKS_BUNDLE_ENGINE=direct ✅​p 🔄​f ✅​p ✅​p
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/bundle/templates/default-python/combinations/classic ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=no/PY=no/READPLAN= ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p 🔄​f ✅​p
🔄​ TestAccept/bundle/templates/default-python/combinations/serverless ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p
🔄​ TestAccept/bundle/templates/default-python/combinations/serverless/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=yes/READPLAN= 🙈​s 🙈​s ✅​p ✅​p 🙈​s 🙈​s ✅​p 🔄​f 🙈​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
12:22 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
12:07 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
9:42 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:23 azure-ucws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:08 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:08 aws-ucws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:52 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:51 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:28 azure-ucws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:25 aws-ucws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:22 aws linux TestSecretsPutSecretStringValue
7:18 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
7:17 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:05 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:55 aws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
6:52 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:43 gcp linux TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
6:42 aws-ucws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
6:25 aws-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:15 aws-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:08 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:52 azure-ucws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
5:40 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:40 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:35 aws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:27 azure linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:24 azure-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:11 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:07 azure-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:02 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
4:51 gcp windows TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:46 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:42 azure windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
4:28 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:24 azure windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:18 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
4:18 gcp windows TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
4:18 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:17 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:04 azure-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:04 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:03 azure windows TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:59 gcp windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
3:59 aws-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:58 aws-ucws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:52 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:51 azure-ucws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:45 gcp linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
3:45 aws-ucws linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
3:45 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform

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
## Why

PRs touching `libs/localenv/`, `cmd/environments/`, and
`acceptance/localenv/` currently fall through to the `*` rule in
`.github/OWNERS` and therefore require a global maintainer's approval,
even though these areas have dedicated owners. This adds
review-turnaround friction on DB Connect / local-environment work (e.g.
databricks#5963).

## What

Adds an OWNERS section granting per-path ownership of those three
directories to `@rugpanov`, `@rclarey`, `@anton-107`, and `@misha-db`,
so any of them can satisfy the `maintainer-approval` gate for changes in
those areas — matching the existing per-path pattern used for Labs and
Pipelines.

## Verification

- `node .github/scripts/owners.js validate` passes (all three paths
exist in the tree; each rule resolves to 4 owners; only the pre-existing
`team:ai-training` warning remains).
- `node --test .github/scripts/owners.test.js
.github/workflows/maintainer-approval.test.js` passes (64/64).

> Note: because this edits `.github/OWNERS` (a `*`-owned file), this PR
itself still requires one existing global maintainer's approval to
merge.

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.

4 participants