localenv: hardcode the public constraint source and drop the repo flag - #6136
Merged
Conversation
The environment constraint artifacts now live in the public databricks/environments repo, so the CLI no longer needs a configurable source. Hardcode the default base URL (raw.githubusercontent.com/databricks/environments/main/python, anchored at the python/ subtree where the artifacts live) and remove the plumbing that let callers point elsewhere: - Drop the hidden --constraint-source-url flag and the DATABRICKS_LOCALENV_CONSTRAINT_REPO (owner/name) env var. - Replace RepoConstraintBaseURL with ConstraintBaseURL, which returns the hardcoded default and honors a single full-URL override env var, renamed to DATABRICKS_LOCALENV_CONSTRAINT_SOURCE_URL_TEST_OVERRIDE to make clear it is only for tests (the acceptance suite points it at a local server) and power-user debugging, not a supported knob. The FetchConstraints empty-baseURL guard stays as a library-boundary check (ConstraintBaseURL never returns empty). Acceptance test.toml files are updated to the renamed override var; the command stays hidden until the separate unveil change lands. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: 37c5287
9 interesting tests: 4 SKIP, 3 RECOVERED, 1 flaky, 1 KNOWN
Top 3 slowest tests (at least 2 minutes):
|
rclarey
approved these changes
Aug 3, 2026
rugpanov
added a commit
that referenced
this pull request
Aug 4, 2026
The environment constraint artifacts are now published in the public databricks/environments repo and the command's source is hardcoded to it (#6136), so the command is ready for users. Remove Hidden:true so `databricks environments setup-local` appears in `environments --help` and completion, and add a changelog fragment announcing it. No acceptance golden changes: the top-level help lists command groups (environments is always shown), and the command's own --help golden was already captured while it was hidden. Co-authored-by: Isaac
rugpanov
added a commit
that referenced
this pull request
Aug 4, 2026
The environment constraint artifacts are now published in the public databricks/environments repo and the command's source is hardcoded to it (#6136), so the command is ready for users. Remove Hidden:true so `databricks environments setup-local` appears in `environments --help` and completion, and add a changelog fragment announcing it. Adds an acceptance test (localenv/group-help) that asserts setup-local is listed under the generated environments group — the visibility this change unveils. It greps a single line rather than snapshotting the whole group help, which also lists generated API subcommands that churn on SDK regen. No existing golden changes: the top-level help lists command groups (environments is always shown), and the command's own --help golden was already captured while it was hidden. Co-authored-by: Isaac
Collaborator
Integration test reportCommit: b98313f
434 interesting tests: 384 MISS, 45 FAIL, 4 RECOVERED, 1 SKIP
Top 50 slowest tests (at least 2 minutes):
|
rugpanov
added a commit
that referenced
this pull request
Aug 10, 2026
The environment constraint artifacts are now published in the public databricks/environments repo and the command's source is hardcoded to it (#6136), so the command is ready for users. Remove Hidden:true so `databricks environments setup-local` appears in `environments --help` and completion, and add a changelog fragment announcing it. Adds an acceptance test (localenv/group-help) that asserts setup-local is listed under the generated environments group — the visibility this change unveils. It greps a single line rather than snapshotting the whole group help, which also lists generated API subcommands that churn on SDK regen. No existing golden changes: the top-level help lists command groups (environments is always shown), and the command's own --help golden was already captured while it was hidden. Co-authored-by: Isaac
rugpanov
added a commit
that referenced
this pull request
Aug 10, 2026
The environment constraint artifacts are now published in the public databricks/environments repo and the command's source is hardcoded to it (#6136), so the command is ready for users. Remove Hidden:true so `databricks environments setup-local` appears in `environments --help` and completion, and add a changelog fragment announcing it. Adds an acceptance test (localenv/group-help) that asserts setup-local is listed under the generated environments group — the visibility this change unveils. It greps a single line rather than snapshotting the whole group help, which also lists generated API subcommands that churn on SDK regen. No existing golden changes: the top-level help lists command groups (environments is always shown), and the command's own --help golden was already captured while it was hidden. Co-authored-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._
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.
Changes
The environment constraint artifacts now live in the public
databricks/environmentsrepo, so the CLI no longer needs a configurable source:https://raw.githubusercontent.com/databricks/environments/main/python(anchored at thepython/subtree where the artifacts live).--constraint-source-urlflag and theDATABRICKS_LOCALENV_CONSTRAINT_REPO(owner/name) env var.RepoConstraintBaseURLwithConstraintBaseURL(ctx), which returns the hardcoded default and still honors a single full-URL override env var — renamed toDATABRICKS_LOCALENV_CONSTRAINT_SOURCE_URL_TEST_OVERRIDEso it reads as test-only / power-user, not a supported knob.test.tomlfiles to the renamed override var.The command stays
Hidden: true; unhiding it (help, changelog, completion) is the separate unveil change (#5835).Why
The repo publishing its constraint artifacts was the precondition for a non-empty default. Now that it is public, the empty-default + owner/name-repo plumbing (needed only while the artifacts lived in a private/personal repo) is dead weight, and a real default is safe to ship.
Tests
go test ./libs/localenv/... ./cmd/environments/...and thelocalenv/helpacceptance suites pass (no golden changes — the override value is unchanged and the removed flag was already hidden).TestConstraintBaseURLnow covers the hardcoded default + override; verified the publishedserverless-v5artifact resolves (HTTP 200) at the hardcoded URL.golangci-lintanddeadcodeclean; fullgo build ./...green.This PR was written by Claude Code.