Skip to content

integration: add e2e tests for environments setup-local - #6155

Open
rugpanov wants to merge 2 commits into
mainfrom
dbconnect/setup-local-integration
Open

integration: add e2e tests for environments setup-local#6155
rugpanov wants to merge 2 commits into
mainfrom
dbconnect/setup-local-integration

Conversation

@rugpanov

@rugpanov rugpanov commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Changes

Adds integration/cmd/environments/setup_local_test.go — end-to-end integration tests for databricks environments setup-local that run in the cli-isolated e2e workflow (isolated AWS/Azure/GCP workspaces). Three CLOUD_ENV-gated tests, all against the real public databricks/environments repo:

  • serverless full provision--serverless-version 5 --output json: resolve → fetch → uv sync → validate, asserting a real .venv/uv.lock and the JSON contract (ok, compute.source/envKey, resolved.pythonVersion/dbconnectVersion/artifactSource, all phases ok).
  • --dry-run writes nothing — asserts the temp project dir stays empty.
  • unpublished version--serverless-version 9999E_ENV_UNSUPPORTED at the fetch phase 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 in libs/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 when CLOUD_ENV is unset, so unit-test CI is unaffected.

Tests

  • All three pass against a real dev workspace + the public repo (full provision ~6.6s; dry-run and error-path fast).
  • go vet + golangci-lint clean; skip verified with CLOUD_ENV unset.

This PR was written by Claude Code.

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
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

Could not determine reviewers from git history.
Round-robin suggestion: @Divyansh-db

Eligible reviewers: @Divyansh-db, @chrisst, @hectorcast-db, @mihaimitrea-db, @parthban-db, @rauchy, @renaudhartert-db, @simonfaltum, @tanmay-db, @tejaskochar-db

Suggestions based on git history. See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 887d5bf

Run: 30901176719

Env ❌​FAIL 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
❌​ aws linux 1 4 4 308 1070 6:33
❌​ aws windows 1 4 4 310 1068 7:17
❌​ azure linux 1 4 4 307 1070 6:15
❌​ azure windows 1 4 4 309 1068 7:24
❌​ gcp linux 1 1 5 308 1070 6:00
❌​ gcp windows 1 1 5 310 1068 9:29
9 interesting tests: 4 RECOVERED, 4 SKIP, 1 FAIL
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
❌​ TestSetupLocalServerlessProvision ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 6 slowest tests (at least 2 minutes):
duration env testname
8:08 gcp windows TestAccept
6:12 azure windows TestAccept
6:01 aws windows TestAccept
2:57 aws linux TestAccept
2:55 gcp linux TestAccept
2:53 azure linux TestAccept

@rclarey rclarey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I didn't run it

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