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

TestWebSessionsRenewDoesNotBreakExistingTerminalSession flakiness #15816

Closed
Joerger opened this issue Aug 24, 2022 · 1 comment · Fixed by #18403
Closed

TestWebSessionsRenewDoesNotBreakExistingTerminalSession flakiness #15816

Joerger opened this issue Aug 24, 2022 · 1 comment · Fixed by #18403

Comments

@Joerger
Copy link
Contributor

Joerger commented Aug 24, 2022

Failure

Relevant snippet

This fails locally ~1/3 calls if you don't include the --race flag.

--- FAIL: TestWebSessionsRenewDoesNotBreakExistingTerminalSession (1.36s)
    apiserver_test.go:4693: 
        	Error Trace:	apiserver_test.go:4693
        	           				apiserver_test.go:3482
        	Error:      	Received unexpected error:
        	           	EOF
        	Test:       	TestWebSessionsRenewDoesNotBreakExistingTerminalSession
@Joerger
Copy link
Contributor Author

Joerger commented Aug 24, 2022

This seems to be a weird race condition. Adding a second delay in the middle of apiserver.renewSession makes this error appear every time.

newSession, err := ctx.extendWebSession(r.Context(), req.AccessRequestID, req.Switchback)
if err != nil {
	return nil, trace.Wrap(err)
}
time.Sleep(time.Second)
newContext, err := h.auth.newSessionContextFromSession(newSession)
if err != nil {
	return nil, trace.Wrap(err)
}

zmb3 added a commit that referenced this issue Nov 11, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
zmb3 added a commit that referenced this issue Nov 16, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
github-actions bot pushed a commit that referenced this issue Nov 16, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
github-actions bot pushed a commit that referenced this issue Nov 16, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
github-actions bot pushed a commit that referenced this issue Nov 16, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
zmb3 added a commit that referenced this issue Nov 18, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
zmb3 added a commit that referenced this issue Nov 20, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
zmb3 added a commit that referenced this issue Nov 20, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
zmb3 added a commit that referenced this issue Nov 21, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
zmb3 added a commit that referenced this issue Nov 21, 2022
Fixes two sources of flakiness in the test:

1. This test wasn't looking up the current OS user, and would try
   to start a session as a user that may not exist on the system.
2. It would run an `echo hello` command and search for `hello` in
   the terminal, but "hello" is also present in the command, so
   this resulted in false positives.

Updates #15816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant