route restartModule through viamClient dial infra and implement TestRestartModule#5901
route restartModule through viamClient dial infra and implement TestRestartModule#5901JosephBorodach wants to merge 5 commits intomainfrom
Conversation
cheukt
left a comment
There was a problem hiding this comment.
changes lgtm but @abe-winter definitely has touched this code more
|
old version called new version uses I don't have enough goutils depth to understand the difference between ExternalAuth and EntityCredentials -- is that a meaningful or risky change? |
No - the check existed because the machine API key was the credential used to connect - no key = no connection. The new code uses the CLI user's own credentials instead so whether the machine has API keys registered can never cause a failure
In our change, token users go through
I don't think so - the new behavior is exactly what This doesn't introduce something new - it aligns The change doesn't boil down to Practical difference
But it's not a risky change bc |
^ where is this happening? from reading I thought the new version is always using WithExternalAuth |
It's in For API key users, |
abe-winter
left a comment
There was a problem hiding this comment.
ah I didn't read carefully. thanks for clarification, lgtm
|
wait actually -- there are two dialOpts in cli/auth.go how do you know c.conf.DialOptions() goes to apiKey.dialOpts rather than token.dialOpts? |
|
Overview
restartModuleto usevc.prepareDialInner+vc.connectToRobotinstead of manually fetching a machine API key and callingclient.Newdirectly. This makes it consistent with howconnectToShellServiceestablishes robot connections and removes the dependency onGetRobotAPIKeysfor dialingTestRestartModuleI haven't spent much time in this area so would definitely appreciate double checking that my changes to
restartModulemake sense