Page MenuHomePhabricator

Remove code which overrides "diffusion.ssh-username" when instanced
ClosedPublic

Authored by epriestley on May 15 2020, 1:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 10, 7:18 PM
Unknown Object (File)
Sun, Mar 31, 9:40 AM
Unknown Object (File)
Fri, Mar 29, 2:02 PM
Unknown Object (File)
Thu, Mar 28, 3:44 PM
Unknown Object (File)
Feb 11 2024, 6:25 AM
Unknown Object (File)
Jan 23 2024, 3:39 AM
Unknown Object (File)
Dec 22 2023, 3:32 AM
Unknown Object (File)
Dec 19 2023, 6:11 AM
Subscribers
None

Details

Summary

Ref T13529. Now that instances can be renamed, an instance may have multiple valid SSH usernames and the preferred SSH username may not be the intenal instance name.

PhacilitySiteSource should already always set diffusion.ssh-username correctly, to the current preferred SSH username (which may be "new-name" after a rename from "old-name"), so we should never be able to reach this code without an accurate diffusion.ssh-username value available.

The code to resolve names into instances also already works for both "ssh old-name@..." and "ssh new-name@...".

So I believe this code has no beneficial effects and only causes harm: it may force us to return "old-name" when falling through would correctly return "new-name".

Test Plan
  • Previously: renamed an instance, then SSH'd to it using both the old and new names. Both work.
  • Previously: verified that diffusion.ssh-username is set correctly after a rename.
  • Verified that Diffusion "Clone" UI now shows "new-name" after an instance rename.
  • The real question here is: does this break something I'm not thinking of? And the change probably has to go to production to answer that.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.May 15 2020, 2:45 PM
This revision was automatically updated to reflect the committed changes.