Skip to content

fix(python-setup): fix red main — align two lagging tests with the array showError signature - #2165

Merged
rugpanov merged 1 commit into
mainfrom
fix/setup-test-typecheck
Sep 2, 2026
Merged

fix(python-setup): fix red main — align two lagging tests with the array showError signature#2165
rugpanov merged 1 commit into
mainfrom
fix/setup-test-typecheck

Conversation

@rugpanov

@rugpanov rugpanov commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Why

main is red. Both VSCode Extensions CI and Publish nightly release fail at the packaging typecheck (tsc --build --force) at tip commit 3ebc920 (#2163) with:

PythonSetupEnvironmentSetup.test.ts(598,48): error TS2322:
  Type 'PythonSetupErrorAction[] | undefined' is not assignable to type 'PythonSetupErrorAction | undefined'.
PythonSetupEnvironmentSetup.test.ts(629,33): error TS2322: (same)

#2163 changed showError's third parameter from a single PythonSetupErrorAction to PythonSetupErrorAction[]. Every sibling test in the file was migrated to the plural actions / actions?.[0] form, but two tests were missed and still typed the parameter as a single PythonSetupErrorAction. It's a test-only, compile-time type mismatch — no product code is involved.

What

In the two lagging tests, adopt the exact array shape the rest of the file already uses:

  • "prompts re-login (no report)…"shownErrors field action?: PythonSetupErrorActionactions?: PythonSetupErrorAction[]; callback param actionactions.
  • "reports a spawn/parse defect…"shown field likewise; callback param actionactions; assertion shown[0].action?.labelshown[0].actions?.[0].label.

No product behaviour changes.

Verification

  • yarn build (tsc --build --force) compiles clean — exit 0, no TS errors.
  • All 53 PythonSetupEnvironmentSetup unit tests pass in the VS Code test host, including both previously-failing tests.

This pull request and its description were written by Isaac.

…ignature

*Why*
main is red: VSCode Extensions CI and the nightly release both fail at the
packaging typecheck (`tsc --build --force`) with TS2322 in
PythonSetupEnvironmentSetup.test.ts. #2163 changed showError's third
parameter to `PythonSetupErrorAction[]`, and every sibling test was migrated
to the plural `actions` form, but two tests still typed it as a single
`PythonSetupErrorAction`.

*What*
Adopt the array shape the rest of the file already uses in the two lagging
tests: the `shownErrors`/`shown` local field types, the `showError` callback
parameter names, and the one assertion now reads `actions?.[0].label`. No
product code changes; behaviour is unchanged.

*Verification*
`yarn build` compiles clean (exit 0, no TS errors); the 53
PythonSetupEnvironmentSetup unit tests pass in the VS Code test host,
including both previously-failing tests.

Co-authored-by: Isaac <no-reply@databricks.com>
@rugpanov
rugpanov deployed to test-trigger-is September 2, 2026 08:02 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 2, 2026

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: 2165
  • Commit SHA: 6c7d7a452aa2695cc527a49b489cced29533b306

Checks will be approved automatically on success.

@rugpanov
rugpanov deployed to test-trigger-is September 2, 2026 08:02 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is September 2, 2026 08:03 — with GitHub Actions Active
@rugpanov

rugpanov commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ✅ all 41 test jobs passed for 6c7d7a45.
View run

@rugpanov
rugpanov marked this pull request as ready for review September 2, 2026 08:20
@rugpanov
rugpanov merged commit 24f6731 into main Sep 2, 2026
8 of 9 checks passed
@rugpanov
rugpanov deleted the fix/setup-test-typecheck branch September 2, 2026 09:00
@github-actions github-actions Bot mentioned this pull request Sep 3, 2026
rugpanov added a commit that referenced this pull request Sep 3, 2026
Release **v2.16.0** of the Databricks VS Code extension.

Tracking: DECO-28403

## packages/databricks-vscode

- Add a manual mode to opt out of automated Python environment (uv)
setup (#2158)
-   Offer a one-click "Install uv" action when uv is missing (#2162)
- Prompt re-login on setup-local session expiry instead of a hard error
(#2163)
- Normalize notebook cell source before wrapping jobs, fixing "Run as
Databricks Job" when a cell's source is a JSON string (#2143) — reported
in #2142
- Update Databricks CLI to v1.14.1 (#2160) — see the [CLI release
notes](https://github.com/databricks/cli/releases) for changes

_Changelog curated: internal refactor (#2148) and CI/test-only changes
(#2165, #2141) omitted; auto-close issue refs stripped._

---------

Co-authored-by: releasebot <noreply@github.com>
Co-authored-by: @rugpanov <gripanov@gmail.com>
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