Repository navigation
Remove legacy sandbox SSH key registration commands - #8098
Conversation
Regression test report ✅Commit: Selected 2 changed tests (limit=20, 0 not selected) 2 tests: regression=1 unreleased=0 coverage=1 failing=0
TestAccept/cmd/sandbox/retired-key-commands: branch ✅ | main (daf81c6) ❌ | latest (v1.28.0) ❌main (daf81c6): latest (v1.28.0): same output as main (daf81c6) |
There was a problem hiding this comment.
Automated review at d92df5f. Each finding was verified against the code.
Not ready yet: 1 open question(s) about a change users could be hurt by.
This PR removes sandbox register and sandbox ssh-key list/delete, along with the key-registry API calls, key hashing, the gateway SSH-config writer, and their tests. In their place it adds a retirement acceptance test and migration notes that point to the OAuth-backed sandbox ssh and ssh-setup. The removal is consistent and nothing left behind references the deleted code. Two questions remain: how users revoke legacy keys that are still registered on the server, and whether the retired commands should print a migration hint instead of cobra's generic unknown-command error. There is also one wording nit in the help text.
Questions
- [blocking] Removing
ssh-key deletetakes away the only CLI path toDELETE /api/2.0/lakebox/ssh-keys/{hash}. The new README says server registrations are not revoked and that existing gateway aliases (which still pointIdentityFileat~/.ssh/sandbox_ed25519) stay as they are. If the gateway still accepts these keys, shouldssh-key list/deletestay as hidden or deprecated commands until the registry is shut down? The other option is for the README to explain how to revoke a key without the CLI. - After this change,
sandbox registerandsandbox ssh-key ...fail with cobra's genericunknown commandplus the full usage text, andsandbox register --name xfails withunknown flag: --name. None of these errors mentions the retirement orssh-setup. Should these be hidden stubs (withDisableFlagParsing) that return an error pointing todatabricks sandbox ssh/ssh-setup? The acceptance test could then assert that message once per command instead of repeating the usage block seven times. Or is the generic error acceptable? (non-blocking)
|
The existing generic API command retains an explicit revocation path. I added a README section showing The new For the non-blocking migration-stub question, I kept the retired command names absent and used the existing unknown-subcommand error handler, with the supported connection path documented in sandbox help and the README. The help now spells out |
Changes
Remove
sandbox registerandsandbox ssh-key list/delete, including their dedicated registry HTTP calls, key generation, key hashing, completion, and gateway SSH-config writer. Retired commands return an error. Document migration to port-forwarding-backedsandbox sshandsandbox ssh-setup; existing local keys, SSH configuration, and server registrations remain untouched.Why
Sandbox SSH uses authenticated port forwarding, so separate gateway key registration is no longer part of the supported connection path.
Tests