Skip to content

fix(deploy): auto-upgrade treats the release asset-upload window as a clean retry#64

Merged
dndungu merged 1 commit into
mainfrom
fix/issue-61-upgrade-script
Jul 10, 2026
Merged

fix(deploy): auto-upgrade treats the release asset-upload window as a clean retry#64
dndungu merged 1 commit into
mainfrom
fix/issue-61-upgrade-script

Conversation

@dndungu

@dndungu dndungu commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Problem (#61)

Hit during the v1.15.0 rollout: the upgrade timer fired inside the window between release-please creating the GitHub release and GoReleaser attaching assets. Two stacked defects:

  1. With set -euo pipefail, the no-match grep in the asset-lookup pipeline killed the script before the intended ERROR no arm64 .deb found line could print — the journal showed only status=1/FAILURE with no explanation.
  2. An empty asset list during the upload window is routine, not an error; hard-failing just leaves a red systemd unit until the next tick.

Fix

|| true guards on the pipeline greps so the empty check is actually reachable, and the empty case now logs assets still uploading?; retrying next tick and exits 0.

Testing

  • Both pipeline paths exercised under set -euo pipefail: empty-assets JSON survives to the clean no-op; the real v1.15.0 release JSON still extracts the correct .deb URL.
  • shellcheck clean.

Live acceptance after deploy: the packaged script on the host matches the repo, and a manual timer run against an assetless state logs the retry message instead of failing (observable on the next real release).

Closes #61

… clean retry

release-please creates the GitHub release at tag time and GoReleaser
attaches assets minutes later; an upgrade check landing in that window
found no .deb and failed. Worse, the failure was mute: with pipefail,
the no-match grep in the asset-lookup pipeline killed the script before
the intended 'no arm64 .deb found' message could print, leaving only a
bare exit status 1 in the journal.

Guard the greps so the pipeline survives a no-match, and turn the
empty-asset case into a logged exit 0 — the timer retries on its next
tick, which is exactly the right behavior while assets upload.

Closes #61
@dndungu dndungu merged commit 8346c7a into main Jul 10, 2026
1 check passed
@dndungu dndungu deleted the fix/issue-61-upgrade-script branch July 10, 2026 18:32
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.

auto-upgrade: pipefail masks the 'no .deb asset' error and the script hard-fails during the release asset-upload window

1 participant