flyctl-actions icon indicating copy to clipboard operation
flyctl-actions copied to clipboard

GitHub Actions: periodic `flyctl: not found`

Open seeARMS opened this issue 1 year ago • 6 comments

We have a GitHub action workflow that deploys our Fly instance upon git push.

Periodically and seemingly randomly, the workflow quickly fails with the following error:

Run superfly/[email protected]
  with:
    args: deploy --remote-only --strategy immediate --wait-timeout 360 --config ./packages/api/fly.staging.toml --dockerfile ./packages/api/Dockerfile --ignorefile .dockerignore --app paragraph-feature-par-[2](https://github.com/paragraph-xyz/monorepo/actions/runs/8740055948/job/23982824117#step:5:2)645 -e COMMIT=${GITHUB_SHA} --vm-size shared-cpu-2x
  env:
    FLY_API_TOKEN: ***

sh: flyctl: not found

Flyctl should never not be found, so I don't know why this is occurring.

seeARMS avatar Apr 18 '24 14:04 seeARMS

@seeARMS it looks like you're pinned to v1.1 of the action which was released almost 4 years ago. We've made some improvements since then!

Could you try updating to the latest version, either v1, which will automatically pick up minor versions, or v1.5 if you want to lock to a specific version. I think this will fix things up for you.

specifically this line in your workflow:

      - uses: superfly/flyctl-actions/setup-flyctl@v1

matthewlehner avatar Apr 23 '24 20:04 matthewlehner

I'm going to close this for now, if you're still running into this in the future, feel free to bump it!

matthewlehner avatar Apr 24 '24 23:04 matthewlehner

I upgraded to v1 but still encountering this:

image

seeARMS avatar Apr 25 '24 15:04 seeARMS

Still continuing to happen:

image

A restart of the workflow fixes it, so this seems to happen intermittently.

seeARMS avatar Jun 13 '24 20:06 seeARMS

Happening about once a day now.

seeARMS avatar Jul 05 '24 23:07 seeARMS

@seeARMS I haven't been able to reproduce this, do you have any other context that might help me see what's happening?

matthewlehner avatar Jul 07 '24 00:07 matthewlehner

This action continues to periodically fail with nothing logged:

Image

vboginskey avatar May 30 '25 14:05 vboginskey

We are seeing the same periodic failure

saschatimme avatar Aug 12 '25 14:08 saschatimme

I have encountered this failure. A closer examination of the docker build process shows that curl failed to download the fly install script. This error doesn't abort the docker build, which allows the actions workflow to continue until it attempts to run a fly command. This results in users reporting the wrong error.

  #8 [3/4] RUN curl -L https://fly.io/install.sh | FLYCTL_INSTALL=/usr/local sh
  #8 0.151   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  #8 0.151                                  Dload  Upload   Total   Spent    Left  Speed
  #8 0.151 
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  #8 1.216 curl: (35) Recv failure: Connection reset by peer
  #8 DONE 1.2s

The error seems random because network failures are unpredictable.

EDIT: I should also mention that the docker build doesn't fail because the pipe swallows the error code that docker uses to detect failures. Bash has the pipefail option to work around this exact problem. You could use the SHELL docker command to turn on pipefail, if your shell supports it.

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

johnw-bluemark avatar Nov 28 '25 18:11 johnw-bluemark