Repository navigation
fix(updates): never announce the version already running - #559
Merged
Merged
Conversation
A stored update-check answer outlived an upgrade: a server upgraded to the release the last check found said "Kept 1.14.7 is available, this server runs 1.14.7" until the next daily check. Every reader now compares the stored release with the running version again: the status page's updates (the Admin notice and the Updates card) and the kept_update_available metric show only a newer one. Each answer now keeps the running version it was asked for, and an answer for another version (or one stored before this) is due at the next hourly run instead of waiting for the instance's hour. Nothing is asked at boot, and nothing at all while the check is off. Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
Signed-off-by: Ibrahim Roshdy <22573766+ibrahimroshdy@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
After an upgrade, admin pages could still say "Kept 1.14.7 is available — This server runs 1.14.7": a stored update-check answer from before the upgrade outlived it until the next daily check.
Closes #552.
readUpdateCheck, which feeds the admin notice and the Status card, and thekept_update_availablemetric). Right away, before any new check.admin/upgrades.md, and the metric's row inadmin/observability.md.Definition of done
updates/check.test.tsfailed before the fix (same version shows nothing, a newer one still shows, past it shows nothing, a re-check at the next hourly run after an upgrade); a fifth guards "never ask while off".src/updatesandsrc/backup/watch.test.ts30/30. Fast gate green.KEPT_*settings: n/a.