Skip to content

test(e2e): cover uv setup-local on a serverless target - #2126

Merged
rugpanov merged 1 commit into
mainfrom
test/setup-local-e2e
Aug 18, 2026
Merged

test(e2e): cover uv setup-local on a serverless target#2126
rugpanov merged 1 commit into
mainfrom
test/setup-local-e2e

Conversation

@rugpanov

Copy link
Copy Markdown
Contributor

Why

The uv-native Setup python environment flow — which shells out to databricks environments setup-local — has no end-to-end coverage. The bundled CLI now ships the environments setup-local subcommand, so the full flow is testable against a real serverless target.

This adds e2e coverage for the main user journey:

  • Initialization — opt into the feature, attach serverless, run setup-local, and verify the .venv is provisioned.
  • Validation / DBConnect — a Python file runs against serverless via Databricks Connect from the uv-provisioned env (verifies databricks-connect imports and executes without errors).
  • Idempotency — a re-run leaves the environment ready and does not flip the row to the out-of-sync (drift) state.

What

  • Adds packages/databricks-vscode/src/test/e2e/setup_local.ucws.e2e.ts (serverless/UC shard). The spec:
    • opts into the uv feature at Workspace scope (so it never reroutes other specs' setup command),
    • attaches serverless and picks the recommended environment version,
    • runs the router Setup python environment command (routes to the uv flow),
    • asserts the .venv interpreter on disk and the persistent "Python environment ready" config-view row,
    • runs hello.py with Databricks Connect and checks the output file,
    • re-runs setup (by command id — the re-run command is palette-hidden) and asserts it stays ready with no drift.
  • Assertions gate on filesystem/tree ground truth rather than transient toasts, with serverless cold-start budgets, mirroring the existing serverless DBConnect spec. No manual databricks-connect install fallback, so a broken provision fails the test rather than being masked.

Verification

  • eslint and prettier -c pass on the new spec.
  • Auto-discovered by scripts/list_integration_tests.ts and tagged ucws, so it runs on the serverless-capable workspace in the integration workflow.

This pull request and its description were written by Isaac.

@rugpanov
rugpanov deployed to test-trigger-is August 17, 2026 14:58 — with GitHub Actions Active
@rugpanov
rugpanov force-pushed the test/setup-local-e2e branch from 38c5db8 to 04bcdfc Compare August 17, 2026 15:16
@rugpanov
rugpanov deployed to test-trigger-is August 17, 2026 15:16 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is August 17, 2026 15:18 — with GitHub Actions Active
@rugpanov
rugpanov marked this pull request as ready for review August 17, 2026 15:21
@rugpanov

rugpanov commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 2 of 37 test jobs failed for 04bcdfc4 (35 passed).
View run

@misha-db misha-db 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.

@rugpanov make sure integ test is passing before merging (it was failing due to github issue)

@rugpanov
rugpanov force-pushed the test/setup-local-e2e branch from 04bcdfc to af65e52 Compare August 18, 2026 09:10
@rugpanov
rugpanov deployed to test-trigger-is August 18, 2026 09:10 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is August 18, 2026 09:11 — with GitHub Actions Active
@rugpanov

rugpanov commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ✅ all 37 test jobs passed for af65e528.
View run

@rugpanov
rugpanov force-pushed the test/setup-local-e2e branch from af65e52 to 371729b Compare August 18, 2026 15:11
@rugpanov
rugpanov deployed to test-trigger-is August 18, 2026 15:11 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is August 18, 2026 15:13 — with GitHub Actions Active
@rugpanov

rugpanov commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ 2 of 37 test jobs failed for 371729be (35 passed).
View run

*Why*:
* The uv-native "Setup python environment" flow (which shells out to
  `databricks environments setup-local`) has no end-to-end coverage; the
  bundled CLI now ships the subcommand, so the full flow is testable.
* Guards the main user journey against a real serverless target:
  initialization, that databricks-connect imports and runs, and that a
  re-run is idempotent (stays ready, no drift).

*What:*
* Add `setup_local.ucws.e2e.ts` (serverless/UC shard): opt into the uv
  feature at Workspace scope, attach serverless + pick the recommended
  version, run setup-local, verify the `.venv` interpreter and the
  "Python environment ready" config-view row, run a file with Databricks
  Connect against the provisioned env, and re-run to assert idempotency.
* Assertions gate on filesystem/tree ground truth (not transient toasts)
  with serverless-cold-start budgets, following the serverless DBConnect
  spec's approach; the re-run is invoked by command id since it is
  palette-hidden.

*Verification:*
* `eslint` and `prettier -c` pass on the new spec.
* The spec is auto-discovered by `list_integration_tests.ts` and tagged
  `ucws` (routed to the serverless-capable workspace); it runs in the
  eng-dev-ecosystem integration workflow.

Co-authored-by: Isaac
@rugpanov
rugpanov force-pushed the test/setup-local-e2e branch from 371729b to 0f02904 Compare August 18, 2026 16:39
@rugpanov
rugpanov deployed to test-trigger-is August 18, 2026 16:39 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is August 18, 2026 16:39 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 2126
  • Commit SHA: 0f029045fa21e04da237158963bd084b4d840a95

Checks will be approved automatically on success.

@rugpanov

rugpanov commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ✅ all 37 test jobs passed for 0f029045.
View run

@rugpanov
rugpanov merged commit 448157d into main Aug 18, 2026
8 of 9 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 20, 2026
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.

2 participants