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 MarkFlagsMutuallyExclusivebeforeRunE, 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.

@rugpanovrugpanov changed the title [VPEX] Report incompatible target flags as E_USAGE[VPEX][12] Report incompatible target flags as E_USAGEJul 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🙈​skipTime
💚​aws linux4422711273:15
💚​aws windows4422911253:55
💚​aws-ucws linux4431410444:16
💚​aws-ucws windows4431610424:03
💚​azure linux4422711263:25
💚​azure windows4422911242:46
💚​azure-ucws linux4431610415:18
💚​azure-ucws windows4431810393:37
💚​gcp linux4422611282:42
💚​gcp windows4422811262:32
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp 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):
durationenvtestname
2:11aws windowsTestAccept

@rugpanov
rugpanovforce-pushed the dbconnect/12-serverless-v5 branch from 179ea18 to 846170aCompareJuly 17, 2026 13:27
@rugpanov
rugpanovforce-pushed the dbconnect/13-usage-error branch from f20628a to 6b4a2a4CompareJuly 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-107anton-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 beforeRunE (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
ContributorAuthor

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
rugpanovforce-pushed the dbconnect/12-serverless-v5 branch from 846170a to 9d8fc59CompareJuly 20, 2026 11:14
Base automatically changed from dbconnect/12-serverless-v5 to mainJuly 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
rugpanovforce-pushed the dbconnect/13-usage-error branch from daaa475 to ee1f606CompareJuly 20, 2026 12:09

@rclareyrclarey 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

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
rugpanovforce-pushed the dbconnect/13-usage-error branch from c0e7dea to d5c4d6fCompareJuly 20, 2026 15:51
@rugpanov
rugpanov added this pull request to the merge queueJul 20, 2026
Merged via the queue into main with commit 34d85ceJul 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🙈​skipTime
❌​aws linux6134520105638:27
❌​aws windows6134477106950:41
🔄​aws-ucws linux35298586792:29
🔄​aws-ucws windows652924885107:52
🔄​azure linux334518105741:49
🔄​azure windows334475107048:41
💚​azure-ucws linux6288490179:33
🔄​azure-ucws windows35282491989:49
🔄​gcp linux334509106242:11
💚​gcp windows44468107546:20
25 interesting tests: 12 flaky, 6 FAIL, 4 RECOVERED, 2 SKIP, 1 KNOWN
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp 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):
durationenvtestname
12:22gcp windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
12:07gcp linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
9:42azure windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:23azure-ucws windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:08aws windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:08aws-ucws linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:52azure linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:51aws linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:28azure-ucws linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:25aws-ucws windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:22aws linuxTestSecretsPutSecretStringValue
7:18gcp windowsTestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
7:17azure linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:05gcp linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:55aws linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
6:52gcp windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:43gcp linuxTestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
6:42aws-ucws linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
6:25aws-ucws windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:15aws-ucws linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:08gcp windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:52azure-ucws linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
5:40aws linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:40aws windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:35aws windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:27azure linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:24azure-ucws windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:11gcp linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:07azure-ucws linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:02azure windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
4:51gcp windowsTestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:46gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:42azure windowsTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
4:28gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:24azure windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:18gcp linuxTestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
4:18gcp windowsTestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
4:18gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:17gcp linuxTestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:04azure-ucws linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:04gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:03azure windowsTestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:59gcp windowsTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
3:59aws-ucws windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:58aws-ucws linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:52azure-ucws windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:51azure-ucws windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:45gcp linuxTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
3:45aws-ucws linuxTestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
3:45aws windowsTestAccept/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 freeto 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

@rugpanov@eng-dev-ecosystem-bot@anton-107@rclarey