Repository navigation
fix: Keep an RC install from a downgrade, and do not record a "no" as a failure #2006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -331,8 +331,9 @@ A service install (launchd or systemd) updates itself: | |
|
|
||
| A release-candidate install (`vX.Y.Z-rc.N`) moves only forward. It installs Latest | ||
| when Latest is a later version, for example `v0.10.0` over `v0.10.0-rc.1`, after the | ||
| same wait. It never moves back to an older Latest. A plain release follows Latest in | ||
| both directions, so the maintainers can withdraw a bad release. | ||
| same wait. It never moves back to an older Latest. `agentop update` by hand follows | ||
| the same rule: to move back, give the release, for example `--ref=v0.9.5`. A plain | ||
|
Comment on lines
+334
to
+335
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Limit the manual-update guarantee to the agentop version. The manual command checks only agentop. If agentop is a plain release and cortex is an RC ahead of Latest, manual update still reaches setup. Automatic update skips that installation. State this limitation here instead of saying that both commands follow the same rule. This matches the scope acknowledged in the PR objective.
|
||
| release follows Latest in both directions, so the maintainers can withdraw a bad release. | ||
|
|
||
| It does not change a `dev` or `main-<sha>` install. That build has no version order | ||
| against Latest, and is often ahead of it. `agentop doctor` says so, and the title bar | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (non-blocking; same point as CodeRabbit's comment on a41e3fb): this guard runs only when the first
latestRelease()returned a tag. If that lookup fails (latest == ""), the loop is skipped.currentReleasereturns""too, andinstallReleasecallslatestRelease()a second time. If the second call succeeds and Latest is older than the installed RC, the RC gets the downgrade after all. With--yesthere is no prompt to stop it. The window is small: one transient failure followed by a success. A cheap way to close it is to stop withcheck-failedwhen*ref == "",latest == "", and agentop or cortex is an RC. Another is to handlatesttoinstallReleaseFnonce it is known, asautoUpdatedoes withtag. Either way, thecurrentReleasecomment about letting the installer find the answer would still hold for non-RC installs.