experimental/ssh: add --environment flag to ssh connect#5706
Open
anton-107 wants to merge 1 commit into
Open
Conversation
Adds a user-facing --environment flag mapping to compute.Environment.BaseEnvironment in the serverless submit path. It accepts an env.yaml path, a workspace-base-environments resource ID, or a bare display name (resolved via ListWorkspaceBaseEnvironments). - Rejects --environment with --environment-version or --cluster. - Serializes through ToProxyCommand so it survives serverless reconnect. - Folds the environment into the default connection name so distinct environments map to distinct servers (mirrors --accelerator). - Adds an environment slot to SshTunnelEvent telemetry. DECO-27423 Co-authored-by: Isaac
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: d4d1e64
29 interesting tests: 13 SKIP, 7 flaky, 6 RECOVERED, 3 FAIL
Top 17 slowest tests (at least 2 minutes):
|
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.
Changes
Adds a user-facing
--environmentflag todatabricks ssh connectthat maps tocompute.Environment.BaseEnvironmentin the serverless submit path. It accepts three input forms:env.yamlpath (leading/),workspace-base-environments/...resource ID,Environments.ListWorkspaceBaseEnvironmentsAll.Supporting behavior:
--environmenttogether with--environment-version(mutually exclusive in the SDK) or with--cluster(serverless only).ToProxyCommandso it survives serverless reconnect (quoted, since paths/display names may contain spaces).--acceleratoris handled.environmentslot toSshTunnelEventtelemetry.Why
Implements DECO-27423. Serverless SSH users could pin an environment version but not point the session at a custom base environment (their own
env.yamlor a workspace base environment). No SDK bump is needed —databricks-sdk-goalready exposesBaseEnvironmentand the workspace-base-environments listing API.Because a serverless server bakes in its environment at startup, the environment is part of the server's identity; folding it into the default connection name avoids silently reusing a server started with a different environment. The remaining explicit-
--namereuse case and the interactive-shell Python path are tracked as follow-ups (DECO-27498, DECO-27499).Tests
Validate(both incompatibility errors, valid serverless/GPU cases),ToProxyCommandround-trip, default-connection-name differentiation, andresolveBaseEnvironment(path/ID passthrough, display-name resolution, not-found, ambiguous) using the SDK mock client../task test-exp-ssh(unit +TestAccept/sshacceptance) passes;./task lint-qclean.This pull request and its description were written by Isaac.