Repository navigation
acc: cover environments setup-local on cloud, drop the integration equivalents - #8117
Conversation
…uivalents cloud: TestAccept/localenv/published-serverless-dry-run TestAccept/localenv/published-serverless-provision Co-authored-by: Isaac <no-reply@databricks.com>
…OS venv path cloud: TestAccept/localenv/published-serverless-dry-run TestAccept/localenv/published-serverless-provision Co-authored-by: Isaac <no-reply@databricks.com>
cloud: TestAccept/localenv/published-serverless-dry-run TestAccept/localenv/published-serverless-provision Co-authored-by: Isaac <no-reply@databricks.com>
Regression test report ✅Commit: Selected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=0 unreleased=0 coverage=1 failing=0
|
✅ Integration test reportCommit: d5a6ed9
Top 6 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at d0459c4. Each finding was verified against the code.
Not ready yet: 1 blocking issue(s), tagged [blocking].
This PR moves the three environments setup-local --serverless-version integration tests into two Cloud = true acceptance tests and deletes integration/cmd/environments. The dry-run test runs both locally and on cloud. The provision test exits with SKIP_TEST whenever CLOUD_ENV is empty, so it never runs locally, and the testing rules don't allow that for a Cloud = true test. One small nit: neither golden shows the command that produced it.
andrewnester
left a comment
There was a problem hiding this comment.
Holding my approval until the open thread on acceptance/localenv/published-serverless-provision/script is settled.
There was a problem hiding this comment.
Automated review at d0459c4. Each finding was verified against the code.
No blocking issues found. 2 non-blocking comment(s) below.
This PR deletes integration/cmd/environments and moves its three setup-local --serverless-version tests to two Cloud = true acceptance tests: a real provision and a dry-run/unpublished-version check. The dry-run port is close to the original. The provision test, though, exits with SKIP_TEST on every local run, which goes against the testing rule that Cloud = true adds a cloud run and never removes the local one. The v9999 case also uses errcode where the rules ask for musterr.
Merge published-serverless-provision into published-serverless (renamed from published-serverless-dry-run): the dry runs run locally and on cloud; the real provision runs on cloud only and is diffed against provision.expected.txt. Trace the CLI calls. cloud: TestAccept/localenv/published-serverless Co-authored-by: Isaac <no-reply@databricks.com>
cloud: TestAccept/localenv/published-serverless Co-authored-by: Isaac <no-reply@databricks.com>
Changes
integration/cmd/environments(3 tests fordatabricks environments setup-local --serverless-version). All three are PORTED to the newacceptance/localenv/published-serverless(Cloud = true):--dry-runplans and fetches with nothing written, and an unpublished v9999--dry-runfails in the fetch phase withE_ENV_UNSUPPORTED(asserted withmusterr), with nothing written. Locally the test server serves the artifacts. On cloud the script unsets the constraint-source override, so the CLI fetches the real published repo (artifactSource: network).uv syncof serverless v5 (the deletedTestSetupLocalServerlessProvision). The JSON result (ok,dryRun: false, command, mode, compute, artifact source, Python and databricks-connect versions present, all six phasesok), the exact project files (.venv,pyproject.toml,uv.lock) and the venv interpreter at the OS layout are diffed against the committedprovision.expected.txt. A mismatch prints the diff and fails the test, sooutput.txtis identical locally and on cloud.UV_OFFLINE/UV_FIND_LINKS, because the vendored wheels don't include databricks-connect. It givesuv python installa private dir, like the deleted test did.Why
integration/is deprecated (integration/README.md,.agents/rules/testing.md). Earlier batches: #6113, #6140, #6223, #6316, #7251.Dashboard: integration/cmd/environments.TestSetupLocalServerlessProvision, error/1082 (
Received unexpected error: AlreadyPrinted, 16 failures across aws/azure/gcp in the week to 2026-11-26).Coverage proof
Method: each integration test's
-coverpkgprofile was recorded on AWS. The tests don't branch on the cloud and make no workspace calls with--serverless-version. Each profile was compared block by block with per-test acceptance coverage from a full local run plus AWS runs of the two new tests.Real-gap blocks are the same for all three, and only the in-process test harness reaches them:
cmd/root/tree.go:54.38,54.55andtree.go:57.38,57.55(Tree.SetOut/SetErr): onlyinternal/testclicalls them.cmd/root/auth.go:222.3,223.1(nil host-metadata resolver factory): onlymain.goregisters the factory, so this branch runs only in test binaries.Assertion map
diffagainst provision.expected.txt passescomputehasPythonVersion,hasDBConnectVersion<phase>: oklinesfiles: .venv pyproject.toml uv.lock,<file>: regular filefiles in project: 0musterrfiles in project: 0Tests
published-serverlesspasses locally and on AWS (testme-aws, empty uv cache). Earlier heads of this PR ran the same dry-run and provision checks in two directories, and those passed in the PR's cloud CI on aws, azure and gcp, linux and windows (real fetch, real interpreter download, realuv sync). Thecloud:line in the last commit reruns the merged test on every cloud.--dry-runwritepyproject.toml(libs/localenv/pipeline.go, Check branch) fails the test locally (files in project: 1). Changing one line ofprovision.expected.txtfails the cloud run.Gaps and risks
provision-conflict,provision-conflict-sync,workspace-member). A fake-uv local provision here would needGOOS.windows = false, which would drop the Windows cloud run.durationMs) would go unnoticed, as in the sibling localenv tests.integration/ran on every cloud run. Acceptance cloud PR runs pick only changed or named tests, while main and nightly runs run all of them. So a laterlibs/localenvchange runs the provision test on its PR only if it is named.This PR was created by the integration-deprecation loop.
🤖 AI agent (opus5.5, isaac_claude)
This pull request and its description were written by Isaac.