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

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

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

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 4c1cb01

Run: 30555634424

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 322 1066 9:22
💚​ aws windows 4 4 324 1064 9:39
💚​ azure linux 4 4 322 1065 4:24
💚​ azure windows 4 4 324 1063 6:08
💚​ gcp linux 1 5 321 1067 5:00
💚​ gcp windows 1 5 323 1065 6:30
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows azure linux azure windows gcp linux gcp 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):
duration env testname
6:19 aws windows TestAccept
5:15 gcp windows TestAccept
5:02 azure windows TestAccept

Comment thread libs/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
Contributor Author

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
rugpanov force-pushed the dbconnect/rename-target-compute branch from 5c1269d to 4c1cb01 Compare July 30, 2026 15:13
@rugpanov
rugpanov added this pull request to the merge queue Jul 30, 2026
Merged via the queue into main with commit 8100d87 Jul 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 🙈​skip Time
❌​ aws linux 10 1 5 2 1154 885 137:50
❌​ aws windows 10 1 5 2 1093 904 165:13
💚​ azure linux 6 2 1059 921 108:19
💚​ azure windows 6 2 998 940 124:48
🔄​ gcp linux 3 2 3 1045 927 118:32
💚​ gcp windows 3 3 986 946 127:00
20 interesting tests: 10 FAIL, 5 RECOVERED, 2 flaky, 2 SKIP, 1 KNOWN
Test Name aws linux aws windows azure linux azure windows gcp linux gcp 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):
duration env testname
13:10 gcp windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
11:40 gcp linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
10:46 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
10:23 aws windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:52 azure linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:51 gcp windows TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
8:48 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
8:43 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
8:28 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:21 gcp linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
8:16 gcp linux TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DATABRICKS_BUNDLE_ENGINE=direct
7:44 azure windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:42 aws windows TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:38 aws linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:13 azure windows TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
7:12 gcp linux TestAccept/bundle/resources/clusters/resize-terminated-fallback/DATABRICKS_BUNDLE_ENGINE=direct
7:10 azure linux TestAccept/bundle/resources/apps/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
6:46 aws linux TestAccept/bundle/invariant/no_drift/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
6:44 gcp linux TestAccept/bundle/resources/clusters/deploy/simple/DATABRICKS_BUNDLE_ENGINE=direct
6:37 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
6:05 gcp linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
6:04 aws linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
5:49 aws windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:49 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=terraform
5:34 gcp windows TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
5:27 gcp windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
5:20 aws linux TestAccept/bundle/resources/clusters/lifecycle-started/DATABRICKS_BUNDLE_ENGINE=direct
5:07 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
5:05 gcp windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
5:03 gcp windows TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:54 aws windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
4:53 gcp linux TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:50 aws linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
4:47 gcp windows TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
4:47 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:39 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:36 azure windows TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:25 gcp windows TestAccept/bundle/invariant/destroy_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=1
4:14 azure linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
4:12 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:57 azure linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct
3:57 aws windows TestAccept/bundle/resources/registered_models/basic/DATABRICKS_BUNDLE_ENGINE=terraform
3:55 azure linux TestAccept/bundle/config-remote-sync/multiple_resources/DATABRICKS_BUNDLE_ENGINE=direct
3:55 aws linux TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:50 gcp linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=terraform
3:48 aws windows TestAccept/bundle/resources/apps/lifecycle-started-omitted/DATABRICKS_BUNDLE_ENGINE=direct
3:48 aws windows TestAccept/bundle/resources/apps/lifecycle-started-toggle/DATABRICKS_BUNDLE_ENGINE=direct
3:40 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:39 gcp linux TestAccept/bundle/invariant/delete_idempotent/DATABRICKS_BUNDLE_ENGINE=direct/INPUT_CONFIG=cluster.yml.tmpl/READPLAN=
3:33 gcp linux TestAccept/bundle/deploy/spark-jar-task/DATABRICKS_BUNDLE_ENGINE=direct

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