Skip to content

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

Open
rugpanov wants to merge 1 commit into
mainfrom
dbconnect/rename-target-compute
Open

[VPEX] localenv: rename compute-target vocabulary targetcompute#6100
rugpanov wants to merge 1 commit into
mainfrom
dbconnect/rename-target-compute

Conversation

@rugpanov

@rugpanov rugpanov 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 *TargetInfo json:"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.

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/localenv/ - needs approval

Files: acceptance/localenv/constraints-only/output.txt, acceptance/localenv/serverless-json/output.txt
Eligible: @rclarey, @anton-107, @misha-db

/cmd/environments/ - needs approval

Files: cmd/environments/compute.go, cmd/environments/sync.go
Eligible: @rclarey, @anton-107, @misha-db

/libs/localenv/ - needs approval

6 files changed
Eligible: @rclarey, @anton-107, @misha-db

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db) can approve all areas.
See OWNERS for ownership rules.

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
rugpanov force-pushed the dbconnect/rename-target-compute branch from 074c0ce to 42f9da2 Compare July 29, 2026 17:11
@rugpanov rugpanov changed the title [VPEX] localenv: rename setup-local result key targetcompute [VPEX] localenv: rename compute-target vocabulary targetcompute Jul 29, 2026
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 42f9da2

Run: 30474234806

Env ❌​FAIL 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 3 1 3 4 319 1065 5:08
❌​ aws windows 3 1 3 4 321 1063 8:52
❌​ azure linux 3 1 3 4 319 1064 5:11
❌​ azure windows 3 1 3 4 321 1062 6:19
💚​ gcp linux 1 5 321 1066 7:46
💚​ gcp windows 1 5 323 1064 7:18
11 interesting tests: 4 SKIP, 3 FAIL, 3 RECOVERED, 1 KNOWN
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 💚​R 💚​R
❌​ TestAccept/bundle/deploy/mlops-stacks ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
❌​ TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=terraform ❌​F ❌​F ❌​F ❌​F ✅​p ✅​p
🙈​ 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 1 slowest tests (at least 2 minutes):
duration env testname
5:35 gcp windows TestAccept

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