Skip to content

Test flake: cli TestServer/EphemeralDeployment #549

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

Open
johnstcn opened this issue Apr 1, 2025 · 2 comments
Open

Test flake: cli TestServer/EphemeralDeployment #549

johnstcn opened this issue Apr 1, 2025 · 2 comments
Assignees
Labels

Comments

@johnstcn
Copy link
Member

johnstcn commented Apr 1, 2025

Seen here: https://github.com/coder/coder/actions/runs/14190415218/job/39753647862

clitest.go:75: invoking command: coder --global-config /tmp/TestServerEphemeralDeployment2472266295/001 server --http-address :0 --access-url http://example.com/ --ephemeral
    ptytest.go:132: 2025-04-01 08:08:15.205: cmd: "Started HTTP listener at http://[::]:36307"
    ptytest.go:132: 2025-04-01 08:08:15.205: cmd: "Using an ephemeral deployment directory (/tmp/coder_ephemeral_1743494895205)\r"
    ptytest.go:167: 2025-04-01 08:08:15.205: cmd: matched "Using an ephemeral deployment directory" = "Started HTTP listener at http://[::]:36307\r\nUsing an ephemeral deployment directory"
    ptytest.go:132: 2025-04-01 08:08:15.205: cmd: "Using built-in PostgreSQL (/tmp/coder_ephemeral_1743494895205/postgres)\r"
    server_test.go:205: 2025-04-01 08:08:15.205: cmd: matched newline = " (/tmp/coder_ephemeral_1743494895205)"
    ptytest.go:132: 2025-04-01 08:08:15.411: cmd: "Removing ephemeral deployment directory...\r"
    ptytest.go:132: 2025-04-01 08:08:15.411: cmd: "Removed ephemeral deployment directory\r"
    ptytest.go:167: 2025-04-01 08:11:15.221: cmd: read error: match deadline exceeded: context deadline exceeded (wanted "View the Web UI"; got "\r\nUsing built-in PostgreSQL (/tmp/coder_ephemeral_1743494895205/postgres)\r\r\nRemoving ephemeral deployment directory...\r\r\nRemoved ephemeral deployment directory\r\r\n")
    ptytest.go:167: 
        	Error Trace:	/home/runner/work/coder/coder/pty/ptytest/ptytest.go:372
        	            				/home/runner/work/coder/coder/pty/ptytest/ptytest.go:196
        	            				/home/runner/work/coder/coder/pty/ptytest/ptytest.go:167
        	            				/home/runner/work/coder/coder/cli/server_test.go:213
        	Error:      	read error
        	Test:       	TestServer/EphemeralDeployment
        	Messages:   	match deadline exceeded: context deadline exceeded (wanted "View the Web UI"; got "\r\nUsing built-in PostgreSQL (/tmp/coder_ephemeral_1743494895205/postgres)\r\r\nRemoving ephemeral deployment directory...\r\r\nRemoved ephemeral deployment directory\r\r\n")
    ptytest.go:96: 2025-04-01 08:11:15.222: cmd: closing expecter: PTY close
    ptytest.go:121: 2025-04-01 08:11:15.222: cmd: copy done: <nil>
    ptytest.go:122: 2025-04-01 08:11:15.222: cmd: closing out
    ptytest.go:124: 2025-04-01 08:11:15.222: cmd: closed out: <nil>
    ptytest.go:87: 2025-04-01 08:11:15.222: cmd: closing logw
    ptytest.go:89: 2025-04-01 08:11:15.222: cmd: closed logw: <nil>
    ptytest.go:87: 2025-04-01 08:11:15.222: cmd: closing logr
    ptytest.go:89: 2025-04-01 08:11:15.222: cmd: closed logr: <nil>
    ptytest.go:113: 2025-04-01 08:11:15.222: cmd: closed expecter
@johnstcn
Copy link
Member Author

johnstcn commented Apr 1, 2025

cc @hugodutka

hugodutka added a commit to coder/coder that referenced this issue Apr 1, 2025
There's a flake reported in coder/internal#549
that was caused by the built-in Postgres failing to start. However, the
test was written in a way that didn't log the actual error which caused
Postgres to fail. This PR improves error logging in the affected test so
that the next time the error happens, we know what it is.
EdwardAngert pushed a commit to coder/coder that referenced this issue Apr 1, 2025
There's a flake reported in coder/internal#549
that was caused by the built-in Postgres failing to start. However, the
test was written in a way that didn't log the actual error which caused
Postgres to fail. This PR improves error logging in the affected test so
that the next time the error happens, we know what it is.
@spikecurtis
Copy link

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

No branches or pull requests

3 participants