flyctl deploy --wait-timeout switch; does it work?

I see that the wait is always 60s (when the documentation says the default is 120s) for regular appsv2 deploys.

I believe this line (flaps.go#L242) might be the culprit, but unsure:

- const proxyTimeoutThreshold = 60 * time.Second

func (f *Client) Wait(ctx context.Context, machine *api.Machine, state string, timeout time.Duration) (err error) {
	waitEndpoint := fmt.Sprintf("/%s/wait", machine.ID)
	if state == "" {
		state = "started"
	version := machine.InstanceID
	if machine.Version != "" {
		version = machine.Version
-	if timeout > proxyTimeoutThreshold {
-		timeout = proxyTimeoutThreshold
-	}

Is anyone else seeing this?

1 Like

It works for me. Looks like WaitForHealthchecksToPass uses a different code path.


$ cat > Dockerfile <<"EOF"
FROM busybox
CMD sleep 600

$ cat > fly.toml <<"EOF"
  protocol = "tcp"
  internal_port = 8080
    interval = "15s"

$ fly launch
An existing fly.toml file was found
? Would you like to copy its configuration to the new app? (y/N) y

$ time fly deploy --wait-timeout=300 --ha=false
  [1/1] Waiting for XXX [app] to become healthy: 0/1
WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
WARN failed to release lease for machine XXX: lease not found
Error: timeout reached waiting for healthchecks to pass for machine XXX failed to get VM XXX: Get "": net/http: request canceled
note: you can change this timeout with the --wait-timeout flag
real    6m30.823s

(total time 6m30s, of which ~60s was deploying etc., and ~5m30s was waiting for the healthcheck).

1 Like

To me, the cli suggested wait-timeout for state change (stopstart, post an update), not health-checks (gh-action logs).

I haven’t checked thoroughly but suggestChangeWaitTimeout is called from multiple places, too.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.