integration: add e2e tests for environments setup-local - #6155
Open
rugpanov wants to merge 2 commits into
Open
Conversation
The setup-local pipeline was covered hermetically (unit + acceptance via --dry-run/stubs) and by one env-gated real-provision test in libs/localenv, but nothing exercised the command end to end through the CLI entrypoint in the cli-isolated integration suite. Add integration/cmd/environments so the feature runs in the isolated AWS/Azure/GCP e2e workflow. Three CLOUD_ENV-gated tests, all against the real public databricks/environments repo (serverless needs no running compute — the version is used verbatim): - serverless full provision: resolve -> fetch -> uv sync -> validate, asserting a real .venv/uv.lock and the --output json contract (ok, compute, resolved). - --dry-run writes nothing. - unpublished version -> E_ENV_UNSUPPORTED at the fetch phase with a non-zero exit. They skip cleanly when CLOUD_ENV is unset, so unit-test CI is unaffected. Co-authored-by: Isaac
Contributor
Waiting for approvalCould not determine reviewers from git history. Eligible reviewers: Suggestions based on git history. See OWNERS for ownership rules. |
Collaborator
Integration test reportCommit: 887d5bf
9 interesting tests: 4 RECOVERED, 4 SKIP, 1 FAIL
Top 6 slowest tests (at least 2 minutes):
|
rclarey
approved these changes
Aug 4, 2026
rclarey
left a comment
Contributor
There was a problem hiding this comment.
LGTM, but I didn't run it
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
Adds
integration/cmd/environments/setup_local_test.go— end-to-end integration tests fordatabricks environments setup-localthat run in the cli-isolated e2e workflow (isolated AWS/Azure/GCP workspaces). ThreeCLOUD_ENV-gated tests, all against the real publicdatabricks/environmentsrepo:--serverless-version 5 --output json: resolve → fetch →uv sync→ validate, asserting a real.venv/uv.lockand the JSON contract (ok,compute.source/envKey,resolved.pythonVersion/dbconnectVersion/artifactSource, all phasesok).--dry-runwrites nothing — asserts the temp project dir stays empty.--serverless-version 9999→E_ENV_UNSUPPORTEDat thefetchphase with a non-zero exit.Why
The pipeline was covered hermetically (unit + acceptance via
--dry-run/stubs) and by one env-gated real-provision test inlibs/localenv, but nothing drove the command end to end through the CLI entrypoint in the integration suite. Serverless needs no running compute (the version is used verbatim), so these give real e2e coverage without a cluster dependency. They skip cleanly whenCLOUD_ENVis unset, so unit-test CI is unaffected.Tests
devworkspace + the public repo (full provision ~6.6s; dry-run and error-path fast).go vet+golangci-lintclean; skip verified withCLOUD_ENVunset.This PR was written by Claude Code.