Skip to content

flake: TestAgentScript/Invalid: unable to cancel the command #211

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
spikecurtis opened this issue Nov 14, 2024 · 2 comments · Fixed by coder/coder#15532
Closed

flake: TestAgentScript/Invalid: unable to cancel the command #211

spikecurtis opened this issue Nov 14, 2024 · 2 comments · Fixed by coder/coder#15532
Assignees
Labels

Comments

@spikecurtis
Copy link

=== Failed
=== FAIL: provisionersdk TestAgentScript/Invalid (10.01s)
    agent_test.go:123: unable to cancel the command, see logs:
        + trap waitonexit EXIT
        + mktemp -d -t coder.XXXXXX
        + BINARY_DIR=/tmp/coder.p7H1TG
        + BINARY_NAME=coder
        + BINARY_URL=http://127.0.0.1:44579/bin/coder-linux-amd64
        + cd /tmp/coder.p7H1TG
        + :
        + status=
        + command -v curl
        + curl -fsSL --compressed http://127.0.0.1:44579/bin/coder-linux-amd64 -o coder
        + break
        + chmod +x coder
        + [ -n  ]
        + export CODER_AGENT_AUTH=token
        + export CODER_AGENT_URL=http://127.0.0.1:44579/
        + ./coder --version
        + head -n1
        + output=this is not the agent you are looking for
        + grep -q Coder
        + echo this is not the agent you are looking for
        + echo ERROR: Downloaded agent binary returned unexpected version output
        ERROR: Downloaded agent binary returned unexpected version output
        + echo coder --version output: "this is not the agent you are looking for"
        coder --version output: "this is not the agent you are looking for"
        + exit 2
        + waitonexit
        + echo === Agent script exited with non-zero code (2). Sleeping 24h to preserve logs...
        === Agent script exited with non-zero code (2). Sleeping 24h to preserve logs...
        + sleep 86[400](https://github.com/coder/coder/runs/32976357611#step:7:401)

seen here: https://github.com/coder/coder/runs/32976357611

@mtojek
Copy link
Member

mtojek commented Nov 14, 2024

I improved error logging for now. Let's wait until we see the real root cause (err).

@spikecurtis
Copy link
Author

repro'd with the error

agent_test.go:123: unable to cancel the command: os: process already finished, see logs:
        + trap waitonexit EXIT
        + mktemp -d -t coder.XXXXXX
        + BINARY_DIR=/tmp/coder.6EBrcH
        + BINARY_NAME=coder
        + BINARY_URL=http://127.0.0.1:39125/bin/coder-linux-amd64
        + cd /tmp/coder.6EBrcH
        + :
        + status=
        + command -v curl
        + curl -fsSL --compressed http://127.0.0.1:39125/bin/coder-linux-amd64 -o coder
        + break
        + chmod +x coder
        + [ -n  ]
        + export CODER_AGENT_AUTH=token
        + export CODER_AGENT_URL=http://127.0.0.1:39125/
        + ./coder --version
        + head -n1
        + output=this is not the agent you are looking for
        + echo this is not the agent you are looking for
        + grep -q Coder
        + echo ERROR: Downloaded agent binary returned unexpected version output
        ERROR: Downloaded agent binary returned unexpected version output
        + echo coder --version output: "this is not the agent you are looking for"
        coder --version output: "this is not the agent you are looking for"
        + exit 2
        + waitonexit
        + echo === Agent script exited with non-zero code (2). Sleeping 24h to preserve logs...
        === Agent script exited with non-zero code (2). Sleeping 24h to preserve logs...
        + sleep 86[400](https://github.com/coder/coder/runs/32985430230#step:7:401)

https://github.com/coder/coder/runs/32985430230

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.

2 participants