Skip to content

[VPEX][8] Rename local-env to environments setup-local and move to correct package#5959

Open
rugpanov wants to merge 2 commits into
mainfrom
dbconnect/09-rename-setup-local
Open

[VPEX][8] Rename local-env to environments setup-local and move to correct package#5959
rugpanov wants to merge 2 commits into
mainfrom
dbconnect/09-rename-setup-local

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

What

Renames the local-environment command from databricks local-env python sync to
databricks environments setup-local and moves it into the existing
environments command group, per the updated [P0] CLI Changes spec.

The environments group intentionally spans both server-side environment-resource
APIs and local provisioning, so a local-install verb belongs there rather than in a
standalone top-level group.

Why here (package placement)

cmd/workspace/environments/environments.go is generated (DO NOT EDIT), so the
command is attached the same way cmd/apps extends the generated apps group:

  • cmd/environments/ (hand-written, moved from cmd/localenv/) exposes a
    Commands() function returning the setup-local verb.
  • cmd/workspace/environments/overrides.go (new, non-generated) has an init()
    that appends to the generated group's cmdOverrides hook, attaching the command.
  • The standalone cli.AddCommand(localenv.New()) is dropped from cmd/cmd.go.

Changes

  • Command tree: local-env python syncenvironments setup-local. The python
    subgroup is removed — P0 is Python-only with no language selector (a language axis
    like setup-local python would be additive later; nothing is reserved now).
  • Constants: CommandGroup/CommandVerb/CommandName updated in
    libs/localenv/result.go; JSON command field is now "environments setup-local".
  • Managed markers: the pyproject.toml managed-block markers now derive from
    CommandName (they previously hard-coded the old name and are written into user
    files), so the command name lives in exactly one place.
  • Still hidden: the command remains Hidden until the environment constraints
    repository is public — unchanged behavior from before the rename.
  • Regenerated acceptance goldens + help output.

Out of scope (deliberate)

  • Flag renames (--cluster--cluster-id, --serverless--serverless-version,
    --job--job-id, --check--dry-run, --constraint-source
    --constraint-source-url) — the spec renames these too, but they are a separate
    follow-up to keep this PR to the command rename + package move.
  • The libs/localenv package name and acceptance/localenv/ directory name are left
    as-is (internal, not user-visible; renaming is cosmetic churn).

Interaction with the stack

#5835 ([VPEX][8/8], held in draft until the constraints repo is public) unhides and
documents this command under its old name. Whichever lands second must reconcile:
the changelog fragment and the Hidden flag should reflect environments setup-local.

Testing

  • go build ./..., lint (0 issues), deadcode clean
  • libs/localenv + cmd/environments unit tests pass
  • acceptance/localenv + acceptance/help regenerated and green
  • Verified databricks environments setup-local is runnable, appears under the
    environments group when unhidden, and stays out of help while Hidden

This pull request and its description were written by Isaac.

rugpanov added 2 commits July 17, 2026 11:59
The command is renamed from `local-env python sync` to
`environments setup-local` and relocated under the existing (generated)
`environments` command group, per the updated spec: that group spans both
server-side environment-resource APIs and local provisioning, so a
local-install verb belongs there.

- Move cmd/localenv → cmd/environments, exposing Commands() (mirrors how
  cmd/apps extends the generated apps group).
- Attach it to the generated group via a new, non-generated
  cmd/workspace/environments/overrides.go that appends to cmdOverrides;
  drop the standalone cli.AddCommand(localenv.New()) from cmd/cmd.go.
- P0 is Python-only with no language selector, so the `python` subgroup is
  removed and the verb is bare `setup-local` (a language axis would be
  additive). Command stays Hidden until the constraints repo is public.
- Update the command-name constants (CommandGroup/CommandVerb/CommandName)
  and derive the pyproject managed-block markers from CommandName so the
  name lives in one place.
- Flag names are unchanged in this PR (--cluster/--serverless/--job/--check/
  --constraint-source); the spec's flag renames are a separate follow-up.
- Regenerate acceptance goldens and help output.

Co-authored-by: Isaac
Audit follow-up for the local-env → environments setup-local rename:
- pipeline.go: the --debug log line was prefixed with the literal old
  name 'local-env:'; derive the prefix from CommandName so it tracks the
  command name (now 'environments setup-local:').
- sync.go: fix two stale doc comments (the runPipeline doc and the
  Hidden-flag rationale referencing the removed 'local-env group').
- Rename newSyncCommand → newSetupLocalCommand so the constructor matches
  the verb.
- overrides.go: reword comment to 'local-provisioning commands'.

No user-facing behavior change; goldens unaffected (the debug prefix is
not captured by acceptance output).

Co-authored-by: Isaac
@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 1a5d74e

Run: 29580294425

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 227 1120 4:51
💚​ aws windows 4 4 229 1118 8:57
💚​ aws-ucws linux 4 4 316 1036 6:07
💚​ aws-ucws windows 4 4 318 1034 7:44
💚​ azure linux 4 4 227 1119 4:45
💚​ azure windows 4 4 229 1117 9:06
💚​ azure-ucws linux 4 4 318 1033 6:47
💚​ azure-ucws windows 4 4 320 1031 8:02
🔄​ gcp linux 2 2 4 226 1121 6:20
💚​ gcp windows 4 4 228 1119 9:03
8 interesting tests: 4 SKIP, 2 RECOVERED, 2 flaky
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 🔄​f 💚​R
🔄​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 🔄​f 💚​R
Top 10 slowest tests (at least 2 minutes):
duration env testname
8:40 azure windows TestAccept
8:38 gcp windows TestAccept
8:30 aws windows TestAccept
6:24 azure-ucws windows TestAccept
6:19 aws-ucws windows TestAccept
2:57 azure linux TestAccept
2:57 gcp linux TestAccept
2:57 aws linux TestAccept
2:53 azure-ucws linux TestAccept
2:51 aws-ucws linux TestAccept

@rugpanov
rugpanov requested a review from anton-107 July 17, 2026 12:27
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