Skip to content

Migrate setup-local invocation to orthogonal --no-constraints/--no-dbconnect flags - #2176

Merged
rugpanov merged 3 commits into
mainfrom
migrate-setup-local-orthogonal-flags
Sep 7, 2026
Merged

Migrate setup-local invocation to orthogonal --no-constraints/--no-dbconnect flags#2176
rugpanov merged 3 commits into
mainfrom
migrate-setup-local-orthogonal-flags

Conversation

@rugpanov

@rugpanov rugpanov commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

databricks environments setup-local has replaced the single behavioral flag
--constraints-only with two orthogonal negative flags:

Flag Effect
--no-constraints Skip writing the remote Python-version / dependency pins.
--no-dbconnect Skip adding the databricks-connect dependency.

The extension still modeled the old single mode enum and only emitted
--constraints-only. This migrates the invocation to the new flags so the
setup-options picker (a follow-up) can map its tiers straight onto composable
capabilities.

Changes

  • Replace SetupLocalInvocation.mode with two orthogonal optional booleans —
    skipConstraints--no-constraints, skipDbconnect--no-dbconnect.
    buildSetupLocalArgs stays pure and deterministic (fixed flag order); the
    --constraints-only emission is dropped.
  • Update the two call sites (the real setup run and the drift dry-run) to the
    flag-free default, and derive the attempt telemetry's mode dimension from
    skipDbconnect so that event is unchanged.
  • Rework the arg unit tests around the new mapping (each flag alone, both
    together, default emits neither, and never --constraints-only).

No behavior change

Both callers run the default (Full) setup, which emits no behavioral flags —
exactly as before. --constraints-only was only ever emitted in a mode no caller
used, so nothing changes in the argv sent to the CLI today; the new flags become
reachable only when the picker is introduced.

Draft / follow-up

Kept as a draft pending the bundled-CLI dependency: the cli.version bump +
re-fetch will land here once a CLI release carrying the new flags is
available (they are merged to CLI main but not yet in a tagged release). The
change is safe to run against the currently bundled CLI in the meantime because
it emits no new flags.

Testing

  • tsc --noEmit: clean.
  • Unit suite: buildSetupLocalArgs, PythonSetupCliClient, and
    PythonSetupEnvironmentSetup (setup + telemetry) all green.
  • eslint + prettier: clean on all changed files.

This pull request and its description were written by Isaac.

…connect flags

*Why*

The `setup-local` CLI has replaced the single behavioral flag `--constraints-only`
with two orthogonal negative flags — `--no-constraints` (skip writing the remote
Python-version/dependency pins) and `--no-dbconnect` (skip adding databricks-connect).
The extension's `SetupLocalInvocation` still modeled the old single `mode`
enum and only knew how to emit `--constraints-only`. Migrating now lets a later
setup-options picker map its tiers directly onto real, composable capabilities.

*What*

- Replace `SetupLocalInvocation.mode` with two orthogonal optional booleans,
  `skipConstraints` → `--no-constraints` and `skipDbconnect` → `--no-dbconnect`;
  drop the `--constraints-only` emission. `buildSetupLocalArgs` stays pure and
  deterministic (fixed flag order).
- Update the two call sites (the real setup run and the drift dry-run) to the
  flag-free default; derive the attempt telemetry's `mode` dimension from
  `skipDbconnect` so that event is unchanged.
- Rework the arg unit tests around the new flag mapping (each flag alone, both
  together, default emits neither, and never `--constraints-only`).

No behavior change: both callers run the default (Full) setup, which emits no
behavioral flags, exactly as before. The flags become reachable when the picker
is introduced. The bundled `cli.version` bump lands separately once a CLI
release carrying the new flags is available.

*Verification*

- `tsc --noEmit`: clean.
- Unit suite: `buildSetupLocalArgs`, `PythonSetupCliClient`, and
  `PythonSetupEnvironmentSetup` (setup + telemetry) all green (1061 passing);
  remaining local failures are unrelated environment artifacts (stale bundled
  CLI binary version pin).
- eslint + prettier: clean on all changed files.

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

rugpanov commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests running for a8453f9b — ⏳.
View run

*Why*

A code-conventions review flagged the 4-line comment at the attempt-telemetry
emit site as longer than the single line it guards (CODE_CONVENTIONS.md §4b:
"shorter than the code it guards").

*What*

Reduce it to the one load-bearing fact — why `skipDbconnect` maps to the
`constraints-only` telemetry mode (it is the orthogonal spelling of the legacy
`--constraints-only`). No behavior change; comment only.

*Verification*

- `tsc --noEmit`: clean (modulo an unrelated local symlink artifact).
- eslint + prettier: clean.

Co-authored-by: Isaac <no-reply@databricks.com>
@rugpanov
rugpanov deployed to test-trigger-is September 7, 2026 09:04 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is September 7, 2026 09:06 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is September 7, 2026 09:06 — with GitHub Actions Active
@rugpanov

rugpanov commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ✅ passed for c95891a4 (the earlier failure was an unrelated deploy_and_run_pipeline remote-timeout flake; it passed on shard re-run).
View run

@rugpanov
rugpanov marked this pull request as ready for review September 7, 2026 11:21
@rugpanov
rugpanov deployed to test-trigger-is September 7, 2026 14:08 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 7, 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: 2176
  • Commit SHA: 57896939e5d406f1eb4c38a5dfc7e38866a32f21

Checks will be approved automatically on success.

@rugpanov
rugpanov deployed to test-trigger-is September 7, 2026 14:09 — with GitHub Actions Active
@rugpanov
rugpanov deployed to test-trigger-is September 7, 2026 14:10 — with GitHub Actions Active
@rugpanov

rugpanov commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Integration tests ❌ failed for 57896939.
View run

@rugpanov
rugpanov merged commit eaec588 into main Sep 7, 2026
8 of 9 checks passed
@rugpanov
rugpanov deleted the migrate-setup-local-orthogonal-flags branch September 7, 2026 14:42
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