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

flake: TestServer/Logging/CreatesFile: TempDir RemoveAll cleanup fails #213

Closed
johnstcn opened this issue Nov 14, 2024 · 6 comments · Fixed by coder/coder#15582
Closed
Assignees
Labels

Comments

@johnstcn
Copy link
Member

Seen here: https://github.com/coder/coder/actions/runs/11840487921/job/32994548981?pr=15518

    clitest.go:261: command "coder server" exited with error: <nil>
    testing.go:1231: TempDir RemoveAll cleanup: remove C:\Users\RUNNER~1\AppData\Local\Temp\TestServerLoggingCreatesFile3252984926\001\coder-logging-test-2246164782: The process cannot access the file because it is being used by another process.
@johnstcn johnstcn added the flake label Nov 14, 2024
@johnstcn
Copy link
Member Author

Hey @defelmnq -- is it possible this is related to coder/coder#15438 ?

@spikecurtis
Copy link

@ethanndickson
Copy link
Member

ethanndickson commented Nov 18, 2024

Potentially caused by t.Cleanup from TempDir getting run before clitest.Start's cleanup? Doesn't really explain why the flake only appeared after log rotation was added, however.

@spikecurtis
Copy link

I think there is a known issue in Lumberjack that there isn't a good way to ensure it is shut down and has closed all files.

@johnstcn
Copy link
Member Author

Maybe can try wrapping it in the lumberjackWriteCloseFixer from cli/agent.go?

@ethanndickson
Copy link
Member

I'm gonna give it a try

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.

4 participants