Skip to content

[VPEX] localenv: rename compute-target vocabulary targetcompute - #6100

Merged
rugpanov merged 2 commits into
mainfrom
dbconnect/rename-target-compute
Jul 30, 2026
Merged

[VPEX] localenv: rename compute-target vocabulary targetcompute#6100
rugpanov merged 2 commits into
mainfrom
dbconnect/rename-target-compute

Conversation

@rugpanov

@rugpanovrugpanov commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

What

Rename the compute-selection vocabulary from target to compute across the
setup-local layer, so the --output json result key, the Go model, and the
resolver names all match the invocation-side field the VS Code extension already
adopted (SetupLocalInvocation.targetcompute, databricks-vscode#2039).

- "target": { "source": "serverless", "envKey": "serverless/serverless-v5", ... }+ "compute": { "source": "serverless", "envKey": "serverless/serverless-v5", ... }

Why carry it beyond the wire key

The extension parses the CLI result with a bare structural cast, so the JSON key
must match the model field. Renaming only the tag would leave Result.Compute *TargetInfojson:"compute" — three-way naming drift for one concept. The
extension makes the same full move (PythonSetupTargetInfo
PythonSetupComputeInfo), so this aligns the whole vocabulary.

Renamed

  • Result.Target field + json tag → Compute / "compute"
  • TargetInfo type → ComputeInfo
  • ResolveTargetResolveCompute
  • TargetFlags / ValidateTargetFlagsComputeFlags / ValidateComputeFlags
  • libs/localenv/target.go (+ _test) → compute.go (+ _test)

Deliberately NOT renamed

  • BundleTarget — "target" is first-class bundle vocabulary (databricks.yml
    targets:, --target), correctly named at that boundary.
  • ErrNoTarget / E_NO_TARGET — the Go const mirrors the stable wire
    error-code string; renaming would desync it from the error-code contract.
  • ComputeClient — already "compute".

schemaVersion stays 1

Not bumped: the command is still Hidden with no shipped JSON consumer, so
there's no old payload in the wild to distinguish and no compatibility window to
maintain. It will bump once the command is unveiled and the contract has real
consumers. (Confirmed with the ticket owner; drops the ticket's step-3
"tolerate both keys" work for the CLI side.)

Test

Build, unit (libs/localenv, cmd/environments), acceptance
(serverless-json/constraints-only/json-error regenerated), lint (0),
deadcode — all pass.

Part of DECO-27794 (CLI side). The extension-side model rename
(PythonSetupResult.targetcompute, PythonSetupTargetInfo
PythonSetupComputeInfo, errorMessages/fixtures/tests) is tracked separately in
databricks-vscode.

This pull request and its description were written by Isaac.

The setup-local --output json result named the resolved compute object "target".
Rename it to "compute" so the wire format, the Go model, and the resolver
vocabulary all match the invocation-side field name the VS Code extension already
adopted (SetupLocalInvocation.target → compute, databricks-vscode#2039). The
extension parses the payload with a bare structural cast, so the JSON key must
match the model field.
The rename is carried through the whole compute-selection layer, not just the
wire key, so the field/type/function names no longer drift from the "compute"
concept (the extension makes the same move: PythonSetupTargetInfo →
PythonSetupComputeInfo):
- Result.Target field + json tag → Compute / "compute"
- TargetInfo type → ComputeInfo
- ResolveTarget function → ResolveCompute
- TargetFlags / ValidateTargetFlags → ComputeFlags / ValidateComputeFlags
- libs/localenv/target.go(+_test) → compute.go(+_test)
Deliberately NOT renamed:
- BundleTarget — "target" is first-class bundle vocabulary (databricks.yml
targets:, --target), so it is correctly named at that boundary.
- ErrNoTarget / E_NO_TARGET — the Go const mirrors the stable wire error-code
string; renaming would desync it from the error-code contract.
- ComputeClient — already "compute".
SchemaVersion stays 1: the command is still hidden with no shipped JSON consumer,
so there is no old payload in the wild to distinguish and no compatibility window
is needed. It will bump once the command is unveiled and the contract has real
consumers.
Part of DECO-27794 (CLI side). The extension-side model rename is tracked
separately in databricks-vscode.
Co-authored-by: Isaac
@rugpanov
rugpanovforce-pushed the dbconnect/rename-target-compute branch from 074c0ce to 42f9da2CompareJuly 29, 2026 17:11
@rugpanovrugpanov changed the title [VPEX] localenv: rename setup-local result key targetcompute[VPEX] localenv: rename compute-target vocabulary targetcomputeJul 29, 2026
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 4c1cb01

Run: 30555634424

Env💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
💚​aws linux4432210669:22
💚​aws windows4432410649:39
💚​azure linux4432210654:24
💚​azure windows4432410636:08
💚​gcp linux1532110675:00
💚​gcp windows1532310656:30
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Nameaws linuxaws windowsazure linuxazure windowsgcp linuxgcp windows
💚​TestAccept💚​R💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/invariant/no_drift🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestFetchRepositoryInfoAPI_FromRepo💚​R💚​R💚​R💚​R🙈​S🙈​S
💚​TestFetchRepositoryInfoAPI_FromRepo/root💚​R💚​R💚​R💚​R
💚​TestFetchRepositoryInfoAPI_FromRepo/subdir💚​R💚​R💚​R💚​R
Top 3 slowest tests (at least 2 minutes):
durationenvtestname
6:19aws windowsTestAccept
5:15gcp windowsTestAccept
5:02azure windowsTestAccept

Comment threadlibs/localenv/result.go Outdated
Comment on lines +23 to +26
// Bump it on any breaking change to the JSON shape once the command is
// unveiled and the payload has real consumers. The command is still hidden
// with no shipped JSON consumer, so the "target" → "compute" key rename does
// not bump this: there is no old payload in the wild to distinguish.

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.

nit: don't think we need this comment update

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Agreed — that was commit-message justification leaking into a permanent comment. Reverted the SchemaVersion comment to the original two lines.

Rename the four remaining `Target` identifiers the vocabulary rename missed:
addTargetFlags → addComputeFlags, and the three
Test*Target*Flags/Target* test functions → their Compute* equivalents.
Pure identifier renames: no behavior, JSON contract, or public API change.
The deliberate carve-outs (BundleTarget, ErrNoTarget/E_NO_TARGET,
noTargetMessage, and the natural-language "compute target" prose) are left
intact.
Co-authored-by: Isaac
@rugpanov
rugpanovforce-pushed the dbconnect/rename-target-compute branch from 5c1269d to 4c1cb01CompareJuly 30, 2026 15:13
@rugpanov
rugpanov added this pull request to the merge queueJul 30, 2026
Merged via the queue into main with commit 8100d87Jul 30, 2026
25 checks passed
@rugpanov
rugpanov deleted the dbconnect/rename-target-compute branch July 30, 2026 16:07
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 8100d87

Run: 30560082327

Env❌​FAIL🟨​KNOWN🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skipTime
❌​aws linux101521154885137:50
❌​aws windows101521093904165:13
💚​azure linux621059921108:19
💚​azure windows62998940124:48
🔄​gcp linux3231045927118:32
💚​gcp windows33986946127:00
20 interesting tests: 10 FAIL, 5 RECOVERED, 2 flaky, 2 SKIP, 1 KNOWN
Test Nameaws linuxaws windowsazure linuxazure windowsgcp linuxgcp windows
🟨​TestAccept🟨​K🟨​K💚​R💚​R🔄​f💚​R
💚​TestAccept/bundle/invariant/no_drift💚​R💚​R💚​R💚​R💚​R💚​R
🔄​TestAccept/bundle/resources/alerts/basic✅​p✅​p✅​p✅​p🔄​f✅​p
🔄​TestAccept/bundle/resources/alerts/basic/DATABRICKS_BUNDLE_ENGINE=direct✅​p✅​p✅​p✅​p🔄​f✅​p
❌​TestAccept/bundle/resources/postgres_branches/update_protected❌​F❌​F🙈​s🙈​s🙈​s🙈​s
❌​TestAccept/bundle/resources/postgres_branches/update_protected/DATABRICKS_BUNDLE_ENGINE=direct❌​F❌​F
❌​TestAccept/bundle/resources/postgres_databases/update❌​F❌​F🙈​s🙈​s🙈​s🙈​s
❌​TestAccept/bundle/resources/postgres_databases/update/DATABRICKS_BUNDLE_ENGINE=direct❌​F❌​F
❌​TestAccept/bundle/resources/postgres_endpoints/update_autoscaling❌​F❌​F🙈​s🙈​s🙈​s🙈​s
❌​TestAccept/bundle/resources/postgres_endpoints/update_autoscaling/DATABRICKS_BUNDLE_ENGINE=direct❌​F❌​F
❌​TestAccept/bundle/resources/postgres_projects/update_display_name❌​F❌​F🙈​s🙈​s🙈​s🙈​s
❌​TestAccept/bundle/resources/postgres_projects/update_display_name/DATABRICKS_BUNDLE_ENGINE=direct❌​F❌​F
❌​TestAccept/bundle/resources/postgres_roles/update❌​F❌​F🙈​s🙈​s🙈​s🙈​s
❌​TestAccept/bundle/resources/postgres_roles/update/DATABRICKS_BUNDLE_ENGINE=direct❌​F❌​F
💚​TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name💚​R💚​R💚​R💚​R💚​R💚​R
🙈​TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
🙈​TestAccept/ssh/connection🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
💚​TestFetchRepositoryInfoAPI_FromRepo💚​R💚​R💚​R💚​R🙈​S🙈​S
💚​TestFetchRepositoryInfoAPI_FromRepo/root💚​R💚​R💚​R💚​R
💚​TestFetchRepositoryInfoAPI_FromRepo/subdir💚​R💚​R💚​R💚​R
Top 50 slowest tests (at least 2 minutes):
durationenvtestname
13:10gcp windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
11:40gcp linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
10:46gcp linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
10:23aws windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:52azure linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:51gcp windowsTestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
8:48aws windowsTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
8:43gcp linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
8:28gcp windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:21gcp linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:16gcp linuxTestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
7:44azure windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:42aws windowsTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:38aws linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:13azure windowsTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:12gcp linuxTestAccept/bundle/resources/clusters/resize-terminated-fallback/DATABRICKS_BUNDLE_ENGINE=direct
7:10azure linuxTestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:46aws linuxTestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
6:44gcp linuxTestAccept/bundle/resources/clusters/deploy/simple/DATABRICKS_BUNDLE_ENGINE=direct
6:37aws linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
6:05gcp linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
6:04aws linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
5:49aws windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:49azure linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
5:34gcp windowsTestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
5:27gcp windowsTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
5:20aws linuxTestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:07gcp linuxTestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
5:05gcp windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:03gcp windowsTestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:54aws windowsTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
4:53gcp linuxTestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:50aws linuxTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
4:47gcp windowsTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
4:47gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:39gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:36azure windowsTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:25gcp windowsTestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
4:14azure linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:12gcp linuxTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:57azure linuxTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
3:57aws windowsTestAccept/bundle/resources/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=terraform
3:55azure linuxTestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
3:55aws linuxTestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:50gcp linuxTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
3:48aws windowsTestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
3:48aws windowsTestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:40gcp windowsTestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:39gcp linuxTestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
3:33gcp linuxTestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct

rugpanov added a commit to databricks/databricks-vscode that referenced this pull request Aug 3, 2026
*Why*
The `compute` field doc comment referenced an internal-only JIRA ticket
(DECO-27794), which must not appear in this public repo.
*What*
Remove the DECO-27794 mention from the comment; keep the public
databricks/cli#6100 cross-reference that explains the `target` -> `compute`
rename.
*Verification*
Comment-only change (no behavior). `git grep -niE 'DECO-[0-9]+'` over the
PR's changed files now returns nothing.
Co-authored-by: Isaac
rugpanov added a commit to databricks/databricks-vscode that referenced this pull request Aug 3, 2026
…de) (#2066)
## What
Extension-side half of the `setup-local --output json` `target` →
`compute`
rename. Follows the CLI half in databricks/cli#6100.
```diff
- "target": { "source": "serverless", "envKey": "serverless/serverless-v5", ... }
+ "compute": { "source": "serverless", "envKey": "serverless/serverless-v5", ... }
```
- `PythonSetupTargetInfo` → `PythonSetupComputeInfo`;
`PythonSetupResult.target?` → `compute?` (inner fields unchanged — only
the outer key renames, mirroring #6100's `result.go`).
- Golden fixtures (`setupLocalResults.ts`): 3× `target:` → `compute:`,
kept verbatim from the CLI acceptance goldens.
- Consumers updated: orchestrator (`isLocalEnvironmentReady` /
`saveState`), `errorMessages.ts` (`r.compute?.envKey`), and their tests.
- Dropped the placeholder TODO on the field.
## Why the extension field name must match the wire key
The extension parses the CLI result with a bare structural cast (no
field mapping), so the TypeScript field name must equal the JSON key the
CLI emits. The fixtures are compile-coupled to the contract type, so
this is proven at build time.
## Deliberately NOT renamed
- **`E_NO_TARGET` / `ERROR_NO_TARGET`** — mirror the stable wire
error-code string, which #6100 keeps.
## Blocked on
⛔ **databricks/cli#6100** (CLI side) must merge first, so the CLI's
`--output json` emits `compute` and the acceptance goldens flip. Until
then the fixtures here would diverge from the upstream goldens they
mirror. schemaVersion stays 1 (command still hidden, no shipped
consumer).
## Test
`yarn build`, `yarn test:lint`, `yarn test:unit` (415 passing) — all
green.
This pull request and its description were written by Isaac.
yolocs pushed a commit to yolocs/dbcli that referenced this pull request Aug 11, 2026
…#5835)
## Changes
Unveils the `databricks environments setup-local` command: removes
`Hidden: true` from `cmd/environments/sync.go` so it appears in
`environments --help` and shell completion, and adds a changelog
fragment announcing it.
## Why
The command was kept hidden while the feature landed across the VPEX
stack and while its constraint-artifact repo was private.
`databricks/environments` is now public and the command's source is
hardcoded to it (databricks#6136), so the command works end-to-end for users and
is ready to expose.
## Tests
- `go build` + `golangci-lint` clean on `cmd/environments`.
- `./task check-changelog` passes.
- `localenv` + `help` acceptance suites pass with no golden changes
(`-update` produces no diff): the top-level help lists command *groups*
— `environments` is a generated API group and is always shown — and the
command's own `--help` golden (`acceptance/localenv/help`) was already
captured while hidden.
- Manually verified `databricks environments --help` now lists
`setup-local`, and end-to-end provisioning against the public repo works
(serverless dry-run + real provision, merge into an existing / `bundle
init` project).
> Note: this branch was rebuilt on current `main`. The original 5
commits predated the `target`→`compute` rename (databricks#6100), the
`cmd/localenv`→`cmd/environments` rename, and the hardcoded-source
change (databricks#6136); four of them only added acceptance tests that already
exist on `main`, and the fifth edited a since-renamed file. The unveil
now collapses to this single focused commit.
_This PR was written by Claude Code._
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.

3 participants

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