AtomicJar / testcontainers-cloud-setup-action

Apache License 2.0
3 stars 0 forks source link

Timed out waiting for agent to be running #10

Open rrileyca opened 1 month ago

rrileyca commented 1 month ago

Using this snippet:

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Setup Testcontainers Cloud Client
      uses: atomicjar/testcontainers-cloud-setup-action@v1
      with:
        token: ${{ secrets.TC_CLOUD_TOKEN }}

My actions intermittently fail on the Setup Testcontainers Cloud Client step, saying it timed out. The full output of the step is below:

Run atomicjar/testcontainers-cloud-setup-action@v1
Run # download and run the agent at the background
Downloading https://app.testcontainers.cloud/download/testcontainers-cloud-agent_latest_linux_x86-64
2024-05-30T19:48:45.523Z --- INF Testcontainers Cloud Agent arch=amd64 os="Ubuntu 22.04.4 LTS/ubuntu:22.04.4 (22.04)" version=1.14.0.5169+0b56bef
2024-05-30T19:48:45.524Z --- INF Initializing config cloud=/home/runner/.config/testcontainers/cloud.properties dir=/home/runner/.config/testcontainers tc=/home/runner/.testcontainers.properties
2024-05-30T19:48:45.525Z --- INF Creating new state file location=/home/runner/.cache/AtomicJar/testcontainers.cloud.desktop/state.json
2024-05-30T19:48:45.525Z --- INF Assigning new installation ID iid=iid_[7](https://github.com/burrito-talk/hbsi-core/actions/runs/9308238095/job/25621481224#step:3:8)c49be24-8b6a-46bb-9c6f-9b2d664c092e
2024-05-30T19:48:46.458Z --- INF Starting a listener...
2024-05-30T19:48:46.458Z --- INF Stored agent endpoint addr=tcp://127.0.0.1:42351
2024-05-30T19:48:46.458Z --- INF Starting mutagen daemon...
2024-05-30T19:48:46.459Z --- INF Mutagen daemon listening endpoint=/home/runner/.config/testcontainers/run/mtgn.sock
2024-05-30T19:48:46.460Z --- INF Serving requests with Testcontainers Cloud runtime index=0
2024-05-30T19:48:46.464Z --- INF Created docker context name=tcc
2024-05-30T19:48:46.464Z --- INF Listening address=tcp://127.0.0.1:42351
Run # waiting for agent successful connection
2024-05-30T19:48:50.546Z --- INF Testcontainers Cloud Agent arch=amd64 os="Ubuntu 22.04.4 LTS/ubuntu:22.04.4 (22.04)" version=1.14.0.5169+0b56bef
2024-05-30T19:48:50.546Z --- INF Initializing config cloud=/home/runner/.config/testcontainers/cloud.properties dir=/home/runner/.config/testcontainers tc=/home/runner/.testcontainers.properties
2024-05-30T19:48:50.546Z --- INF Waiting up to 120 seconds for the agent to start...
2024-05-30T19:50:50.546Z --- FTL Timed out waiting for agent to be running addr=127.0.0.1:42351
Error: Process completed with exit code 1.

This is run on GitHub, as in github.com (not self-hosted). Any idea why this would be so intermittent?

jamesward commented 1 month ago

Initially I had this happen as well. But then I re-ran my Action and it worked. Not sure if it is flaky or needed something to provision.

realjenius commented 1 month ago

Hey @jamesward ! This conversation carried over to the Testcontainers Cloud slack channel, where we discovered (at least in the case of @rrileyca ) that this was related to free account constraints (# of concurrent workflows), and that the logging is not being as clear and obvious as it should be in those cases. It is possible this is similar situation for your case as well.

We have a task prioritized on our side to make sure this error is presented more clearly by the client, and is not just embedded within the agent log file (which is often not easily visible from the CI pipeline).