Skip to content

flake: TestUpdateValidateRichParameters #551

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

Closed
sreya opened this issue Apr 1, 2025 · 0 comments · Fixed by coder/coder#17211
Closed

flake: TestUpdateValidateRichParameters #551

sreya opened this issue Apr 1, 2025 · 0 comments · Fixed by coder/coder#17211
Labels

Comments

@sreya
Copy link

sreya commented Apr 1, 2025

Seen here

025-04-01T16:44:03.0921572Z ==================
2025-04-01T16:44:03.0921644Z WARNING: DATA RACE
2025-04-01T16:44:03.0921746Z Read at 0x00c00462e0c8 by goroutine 26845:
2025-04-01T16:44:03.0921909Z   github.com/coder/coder/v2/provisioner/echo.TarWithOptions()
2025-04-01T16:44:03.0922170Z       /home/runner/work/coder/coder/provisioner/echo/serve.go:257 +0x115b
2025-04-01T16:44:03.0922358Z   github.com/coder/coder/v2/coderd/coderdtest.CreateTemplateVersion()
2025-04-01T16:44:03.0922628Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:875 +0xee
2025-04-01T16:44:03.0922829Z   github.com/coder/coder/v2/cli_test.TestUpdateWithRichParameters.func3()
2025-04-01T16:44:03.0923046Z       /home/runner/work/coder/coder/cli/update_test.go:234 +0x28a
2025-04-01T16:44:03.0923145Z   github.com/coder/coder/v2/coderd.New()
2025-04-01T16:44:03.0923361Z       /home/runner/work/coder/coder/coderd/coderd.go:485 +0x392c
2025-04-01T16:44:03.0923458Z   github.com/coder/coder/v2/coderd.New()
2025-04-01T16:44:03.0923667Z       /home/runner/work/coder/coder/coderd/coderd.go:474 +0x3516
2025-04-01T16:44:03.0923824Z   github.com/coder/coder/v2/coderd/coderdtest.NewWithAPI()
2025-04-01T16:44:03.0924098Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:581 +0xf1
2025-04-01T16:44:03.0924248Z   github.com/coder/coder/v2/coderd/coderdtest.NewOptions()
2025-04-01T16:44:03.0924522Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:287 +0x1375
2025-04-01T16:44:03.0924662Z   github.com/coder/coder/v2/coderd/coderdtest.NewOptions()
2025-04-01T16:44:03.0924986Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:281 +0x1247
2025-04-01T16:44:03.0925130Z   github.com/coder/coder/v2/coderd/coderdtest.NewWithAPI()
2025-04-01T16:44:03.0925390Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:579 +0xd7
2025-04-01T16:44:03.0925548Z   github.com/coder/coder/v2/coderd/coderdtest.newWithCloser()
2025-04-01T16:44:03.0925801Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:213 +0x3b
2025-04-01T16:44:03.0925923Z   github.com/coder/coder/v2/coderd/coderdtest.New()
2025-04-01T16:44:03.0926178Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:181 +0x27
2025-04-01T16:44:03.0926372Z   github.com/coder/coder/v2/cli_test.TestUpdateWithRichParameters.func3()
2025-04-01T16:44:03.0926580Z       /home/runner/work/coder/coder/cli/update_test.go:231 +0xe8
2025-04-01T16:44:03.0926656Z   testing.tRunner()
2025-04-01T16:44:03.0926908Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1792 +0x225
2025-04-01T16:44:03.0926995Z   testing.(*T).Run.gowrap1()
2025-04-01T16:44:03.0927241Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1851 +0x44
2025-04-01T16:44:03.0927247Z 
2025-04-01T16:44:03.0927354Z Previous write at 0x00c00462e0c8 by goroutine 26842:
2025-04-01T16:44:03.0927572Z   github.com/coder/coder/v2/provisioner/echo.TarWithOptions()
2025-04-01T16:44:03.0927815Z       /home/runner/work/coder/coder/provisioner/echo/serve.go:258 +0x11e4
2025-04-01T16:44:03.0928016Z   github.com/coder/coder/v2/coderd/coderdtest.CreateTemplateVersion()
2025-04-01T16:44:03.0928346Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:875 +0xee
2025-04-01T16:44:03.0928599Z   github.com/coder/coder/v2/cli_test.TestUpdateWithRichParameters.func2()
2025-04-01T16:44:03.0928859Z       /home/runner/work/coder/coder/cli/update_test.go:169 +0x28a
2025-04-01T16:44:03.0928990Z   github.com/coder/coder/v2/coderd.New()
2025-04-01T16:44:03.0929224Z       /home/runner/work/coder/coder/coderd/coderd.go:485 +0x392c
2025-04-01T16:44:03.0929563Z   github.com/coder/coder/v2/coderd.New()
2025-04-01T16:44:03.0929931Z       /home/runner/work/coder/coder/coderd/coderd.go:474 +0x3516
2025-04-01T16:44:03.0930137Z   github.com/coder/coder/v2/coderd/coderdtest.NewWithAPI()
2025-04-01T16:44:03.0930437Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:581 +0xf1
2025-04-01T16:44:03.0930620Z   github.com/coder/coder/v2/coderd/coderdtest.NewOptions()
2025-04-01T16:44:03.0930934Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:287 +0x1375
2025-04-01T16:44:03.0931147Z   github.com/coder/coder/v2/coderd/coderdtest.NewOptions()
2025-04-01T16:44:03.0931439Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:281 +0x1247
2025-04-01T16:44:03.0931648Z   github.com/coder/coder/v2/coderd/coderdtest.NewWithAPI()
2025-04-01T16:44:03.0931940Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:579 +0xd7
2025-04-01T16:44:03.0932165Z   github.com/coder/coder/v2/coderd/coderdtest.newWithCloser()
2025-04-01T16:44:03.0932462Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:213 +0x3b
2025-04-01T16:44:03.0932634Z   github.com/coder/coder/v2/coderd/coderdtest.New()
2025-04-01T16:44:03.0932912Z       /home/runner/work/coder/coder/coderd/coderdtest/coderdtest.go:181 +0x27
2025-04-01T16:44:03.0933163Z   github.com/coder/coder/v2/cli_test.TestUpdateWithRichParameters.func2()
2025-04-01T16:44:03.0933379Z       /home/runner/work/coder/coder/cli/update_test.go:166 +0xe8
2025-04-01T16:44:03.0933538Z   testing.tRunner()
2025-04-01T16:44:03.0933810Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1792 +0x225
2025-04-01T16:44:03.0933951Z   testing.(*T).Run.gowrap1()
2025-04-01T16:44:03.0934216Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1851 +0x44
2025-04-01T16:44:03.0934221Z 
2025-04-01T16:44:03.0934342Z Goroutine 26845 (running) created at:
2025-04-01T16:44:03.0934457Z   testing.(*T).Run()
2025-04-01T16:44:03.0934765Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1851 +0x8f2
2025-04-01T16:44:03.0935062Z   github.com/coder/coder/v2/cli_test.TestUpdateWithRichParameters()
2025-04-01T16:44:03.0935327Z       /home/runner/work/coder/coder/cli/update_test.go:228 +0x9f8
2025-04-01T16:44:03.0935449Z   testing.tRunner()
2025-04-01T16:44:03.0935750Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1792 +0x225
2025-04-01T16:44:03.0935869Z   testing.(*T).Run.gowrap1()
2025-04-01T16:44:03.0936208Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1851 +0x44
2025-04-01T16:44:03.0936213Z 
2025-04-01T16:44:03.0936315Z Goroutine 26842 (running) created at:
2025-04-01T16:44:03.0936441Z   testing.(*T).Run()
2025-04-01T16:44:03.0936694Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1851 +0x8f2
2025-04-01T16:44:03.0936966Z   github.com/coder/coder/v2/cli_test.TestUpdateWithRichParameters()
2025-04-01T16:44:03.0937201Z       /home/runner/work/coder/coder/cli/update_test.go:163 +0x97e
2025-04-01T16:44:03.0937324Z   testing.tRunner()
2025-04-01T16:44:03.0937583Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1792 +0x225
2025-04-01T16:44:03.0937712Z   testing.(*T).Run.gowrap1()
2025-04-01T16:44:03.0937987Z       /opt/hostedtoolcache/go/1.24.1/x64/src/testing/testing.go:1851 +0x44
2025-04-01T16:44:03.0938183Z ==================
@sreya sreya added the flake label Apr 1, 2025
ethanndickson added a commit to coder/coder that referenced this issue Apr 2, 2025
Closes coder/internal#551

We've noticed lots of flakes in `go test -race` tests that use the echo provisioner. I believe the root cause of this to be #17012, where we started mutating the `echo.Responses`. This only caused issues as we previously shared `echo.Responses` across multiple test cases.

This PR is therefore the same as #17128, but I believe this is all the cases where an `echo.Responses` is shared between tests - including tests that haven't flaked (yet).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant