Skip to content

localenv: hardcode the public constraint source and drop the repo flag - #6136

Merged
rugpanov merged 1 commit into
mainfrom
dbconnect/hardcode-constraint-source
Aug 3, 2026
Merged

localenv: hardcode the public constraint source and drop the repo flag#6136
rugpanov merged 1 commit into
mainfrom
dbconnect/hardcode-constraint-source

Conversation

@rugpanov

@rugpanov rugpanov commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Changes

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 https://raw.githubusercontent.com/databricks/environments/main/python (anchored at the python/ subtree where the artifacts live).
  • Remove the hidden --constraint-source-url flag and the DATABRICKS_LOCALENV_CONSTRAINT_REPO (owner/name) env var.
  • Replace RepoConstraintBaseURL with ConstraintBaseURL(ctx), which returns the hardcoded default and still honors a single full-URL override env var — renamed to DATABRICKS_LOCALENV_CONSTRAINT_SOURCE_URL_TEST_OVERRIDE so it reads as test-only / power-user, not a supported knob.
  • Update the acceptance test.toml files 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 the localenv/help acceptance suites pass (no golden changes — the override value is unchanged and the removed flag was already hidden).
  • TestConstraintBaseURL now covers the hardcoded default + override; verified the published serverless-v5 artifact resolves (HTTP 200) at the hardcoded URL.
  • golangci-lint and deadcode clean; full go build ./... green.

This PR was written by Claude Code.

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
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 37c5287

Run: 30795223032

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 1 1 4 313 1067 6:51
🔄​ aws windows 1 3 4 315 1065 7:13
🟨​ azure linux 1 1 4 313 1066 7:37
💚​ azure windows 4 4 315 1064 6:54
🔄​ gcp linux 1 1 5 312 1067 6:01
💚​ gcp windows 1 5 315 1065 5:01
9 interesting tests: 4 SKIP, 3 RECOVERED, 1 flaky, 1 KNOWN
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
🔄​ TestSyncEnsureRemotePathIsUsableIfRepoExists ✅​p ✅​p ✅​p ✅​p 🔄​f ✅​p
🟨​ TestFetchRepositoryInfoAPI_FromRepo 🟨​K 🔄​f 🟨​K 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
5:23 azure windows TestAccept
5:05 aws windows TestAccept
3:58 gcp windows TestAccept

@rugpanov
rugpanov added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit b98313f Aug 3, 2026
25 checks passed
@rugpanov
rugpanov deleted the dbconnect/hardcode-constraint-source branch August 3, 2026 16:39
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