-
Notifications
You must be signed in to change notification settings - Fork 651
fix: avoid duplicate READY message when shell is already running #3462
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
base: master
Are you sure you want to change the base?
Conversation
This commit modifies the start.go file to check for an existing shell session (via ssh.pid) before showing the READY message. This prevents duplicate READY messages when the shell is already launched. Signed-off-by: Konikz <konikz@github.com>
@@ -313,6 +313,13 @@ func watchHostAgentEvents(ctx context.Context, inst *store.Instance, haStdoutPat | |||
if *inst.Config.Plain { | |||
logrus.Infof("READY. Run `ssh -F %q %s` to open the shell.", inst.SSHConfigFile, inst.Hostname) | |||
} else { | |||
// Check if a shell session is already running | |||
if _, err := os.Stat(filepath.Join(inst.Dir, "ssh.pid")); err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you test this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still testing, I'll revert back once fixed.
Is this email address correct? |
@AkihiroSuda no Sir, i'm not Github staff, I just use the "Keep my email addresses private" and use this email because my college address doesn't handle CLA invocations well. |
Is konikz@github.com reachable? |
It doesn't. It assigns an email address of CNCF clarified in DCO and Real Names:
Since the name and email are required to contact the contributor in case there is a concern about the licensing of the contributed code, we can only accept commits that have been signed with a proper name and working email address (see above that it doesn't have to be your legal name, but it should still identify you personally). |
@AkihiroSuda & @jandubois , |
This commit modifies the start.go file to check for an existing shell session (via ssh.pid) before showing the READY message. This prevents duplicate READY messages when the shell is already launched.
Fixes
#3452