Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENG-2660 Add a message once SSH connection is established #117

Closed

Conversation

fabgo
Copy link
Contributor

@fabgo fabgo commented Sep 28, 2024

Add a message once an SSH connection is established, if the -N option (no remote command) is used.

Add a message once an SSH connection is established, if the -N option (no remote command) is used.
@fabgo fabgo requested a review from gergas3 September 28, 2024 03:44
Copy link
Contributor

@nbrahms nbrahms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO let's keep the previous code organization. We also need to ensure GCP is kept separate from the generic logic, which we can do either here or in its own PR.

Comment on lines +188 to +193
const googleLoginMatch = chunkString.match(GOOGLE_LOGIN_MESSAGE);
isGoogleLoginException = isGoogleLoginException || !!googleLoginMatch; // once true, always true
if (isGoogleLoginException) {
// always overwrite to false so we don't retry the access
isEphemeralAccessDeniedException = false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we keep this GCP-specific logic within the GCP-specific SSH provider? We should ensure separation of concerns, and keep anything CSP-specific within that provider's plugin.

I know this is just a code move, but we should clean up as we go along.

* This works because AWS SSM wraps the session in a single-stream pty, so we
* do not capture stderr emitted from the wrapped shell session.
*/
const accessPropagationGuard = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the motivation to remove the sub-functioning for this PR? IMO the code is significantly easier to follow when it's more modular.

@fabgo fabgo closed this Sep 30, 2024
@fabgo fabgo deleted the fabian/eng-2660-add-established-connection-message branch September 30, 2024 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants