fix(deploy): auto-upgrade treats the release asset-upload window as a clean retry#64
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
set -euo pipefail, the no-matchgrepin the asset-lookup pipeline killed the script before the intendedERROR no arm64 .deb foundline could print — the journal showed onlystatus=1/FAILUREwith no explanation.Fix
|| trueguards on the pipeline greps so the empty check is actually reachable, and the empty case now logsassets still uploading?; retrying next tickand exits 0.Testing
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.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