Skip to content

fix: detect machine update failures#4878

Draft
rianmcguirefly wants to merge 2 commits intomasterfrom
fix-deploy-revert-detection
Draft

fix: detect machine update failures#4878
rianmcguirefly wants to merge 2 commits intomasterfrom
fix-deploy-revert-detection

Conversation

@rianmcguirefly
Copy link
Copy Markdown
Member

@rianmcguirefly rianmcguirefly commented Apr 30, 2026

Change Summary

What and Why:

Previously, when we gave up on an update and reverted a machine to its previous version (eg. if pulling the image from the registry failed), flyctl saw the machine in the "started" state (the old version still running) and treated the deploy as successful. Health checks would pass against the old image, so users had no indication their new code wasn't deployed.

Affects both flyctl deploy (in-place updates) and standalone flyctl machine update.

How:

Check the machine version is what we expected after wait succeeds.

Related to:


Documentation

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

@rianmcguirefly rianmcguirefly force-pushed the fix-deploy-revert-detection branch from 4d59b66 to f7ddf14 Compare May 4, 2026 06:45
@rianmcguirefly rianmcguirefly force-pushed the fix-deploy-revert-detection branch from f7ddf14 to c333818 Compare May 4, 2026 07:06
@rianmcguirefly rianmcguirefly force-pushed the fix-deploy-revert-detection branch from c333818 to 9f2c64c Compare May 4, 2026 07:17
@rianmcguirefly rianmcguirefly changed the title fix: detect machine update reverts during deploy fix: detect machine update failures May 4, 2026
@rianmcguirefly
Copy link
Copy Markdown
Member Author

=== RUN   TestFlyMachineRun_port
    test_env.go:105: workdir /tmp/TestFlyMachineRun_port1156148536/001
    result.go:59: expected successful zero exit code, got 1, for command: /home/runner/work/flyctl/flyctl/bin/flyctl machine update -a preflight-gha-25306166751-1-2026-05-de7ev3qz 48e2479ae49718 -y --port 80/tcp:http --port 1001/udp [stdout]: Updating machine 48e2479ae49718
Error: machine 48e2479ae49718 update failed: machine remains on previous version 01KQRY9AA1G8862ADXZH7GRPPK (state: replaced)
         [stderr]: Error: machine 48e2479ae49718 update failed: machine remains on previous version 01KQRY9AA1G8862ADXZH7GRPPK (state: replaced)
--- FAIL: TestFlyMachineRun_port (20.19s)

Well that's not supposed to happen. Investigating...

@rianmcguirefly rianmcguirefly force-pushed the fix-deploy-revert-detection branch 2 times, most recently from b33dad1 to 9f2c64c Compare May 8, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant