Migrate setup-local invocation to orthogonal --no-constraints/--no-dbconnect flags - #2176
Merged
Merged
Conversation
…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>
Contributor
Author
|
🤖 Integration tests running for |
*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>
Contributor
Author
|
🤖 Integration tests ✅ passed for |
rugpanov
marked this pull request as ready for review
September 7, 2026 11:21
misha-db
approved these changes
Sep 7, 2026
Contributor
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Contributor
Author
|
🤖 Integration tests ❌ failed for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
databricks environments setup-localhas replaced the single behavioral flag--constraints-onlywith two orthogonal negative flags:--no-constraints--no-dbconnectdatabricks-connectdependency.The extension still modeled the old single
modeenum and only emitted--constraints-only. This migrates the invocation to the new flags so thesetup-options picker (a follow-up) can map its tiers straight onto composable
capabilities.
Changes
SetupLocalInvocation.modewith two orthogonal optional booleans —skipConstraints→--no-constraints,skipDbconnect→--no-dbconnect.buildSetupLocalArgsstays pure and deterministic (fixed flag order); the--constraints-onlyemission is dropped.flag-free default, and derive the attempt telemetry's
modedimension fromskipDbconnectso that event is unchanged.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-onlywas only ever emitted in a mode no callerused, 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.versionbump +re-fetch will land here once a CLI release carrying the new flags is
available (they are merged to CLI
mainbut not yet in a tagged release). Thechange is safe to run against the currently bundled CLI in the meantime because
it emits no new flags.
Testing
tsc --noEmit: clean.buildSetupLocalArgs,PythonSetupCliClient, andPythonSetupEnvironmentSetup(setup + telemetry) all green.This pull request and its description were written by Isaac.