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