[VPEX][8] Rename local-env to environments setup-local and move to correct package#5959
Open
rugpanov wants to merge 2 commits into
Open
[VPEX][8] Rename local-env to environments setup-local and move to correct package#5959rugpanov wants to merge 2 commits into
environments setup-local and move to correct package#5959rugpanov wants to merge 2 commits into
Conversation
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
Collaborator
Integration test reportCommit: 1a5d74e
8 interesting tests: 4 SKIP, 2 RECOVERED, 2 flaky
Top 10 slowest tests (at least 2 minutes):
|
anton-107
approved these changes
Jul 17, 2026
This was referenced Jul 17, 2026
environments setup-local and move to correct packageenvironments setup-local and move to correct package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Renames the local-environment command from
databricks local-env python synctodatabricks environments setup-localand moves it into the existingenvironmentscommand group, per the updated[P0] CLI Changesspec.The
environmentsgroup intentionally spans both server-side environment-resourceAPIs 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.gois generated (DO NOT EDIT), so thecommand is attached the same way
cmd/appsextends the generatedappsgroup:cmd/environments/(hand-written, moved fromcmd/localenv/) exposes aCommands()function returning thesetup-localverb.cmd/workspace/environments/overrides.go(new, non-generated) has aninit()that appends to the generated group's
cmdOverrideshook, attaching the command.cli.AddCommand(localenv.New())is dropped fromcmd/cmd.go.Changes
local-env python sync→environments setup-local. Thepythonsubgroup is removed — P0 is Python-only with no language selector (a language axis
like
setup-local pythonwould be additive later; nothing is reserved now).CommandGroup/CommandVerb/CommandNameupdated inlibs/localenv/result.go; JSONcommandfield is now"environments setup-local".pyproject.tomlmanaged-block markers now derive fromCommandName(they previously hard-coded the old name and are written into userfiles), so the command name lives in exactly one place.
Hiddenuntil the environment constraintsrepository is public — unchanged behavior from before the rename.
Out of scope (deliberate)
--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 separatefollow-up to keep this PR to the command rename + package move.
libs/localenvpackage name andacceptance/localenv/directory name are leftas-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 anddocuments this command under its old name. Whichever lands second must reconcile:
the changelog fragment and the
Hiddenflag should reflectenvironments setup-local.Testing
go build ./..., lint (0 issues),deadcodecleanlibs/localenv+cmd/environmentsunit tests passacceptance/localenv+acceptance/helpregenerated and greendatabricks environments setup-localis runnable, appears under theenvironmentsgroup when unhidden, and stays out of help whileHiddenThis pull request and its description were written by Isaac.