Repository navigation
fix(plugins): report refused automatic updates from Check Plugin Updates - #2251
Conversation
A failed automatic update during the scheduled or manual Check Plugin Updates task was recorded only in the task's result data: nothing was logged and the run finished as completed. Check now logs each per-plugin failure for every caller, and the task fails with each plugin's reason when any update or default install was refused. The old version keeps running as before. Closes Silo-Server#2239
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🟠 High · up to Plugin update failures can put credentials from diagnostic URLs into server logs and task history. Sanitize failure text before merging. Pre-merge checks |
|
Failure text now reaches the task error as well as the log and result data, so mask credential assignments and URL userinfo when a failure is recorded.
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Closes #2239
Related issue: #1223
Validation tasks: unblocks #1224 C1; unblocks #1225 C1
When an automatic plugin update is refused during the scheduled or manual Check Plugin Updates task, for example because the new binary doesn't match its catalog checksum, the old version keeps running but nothing records the refusal. The task finishes as completed, nothing is logged, and the admin has no way to learn that the update was attempted. Only the startup update pass logged these failures.
With this change the task run fails when any update or default install was refused, and the server logs a warning naming each plugin and the reason.
Approach
AutoUpdateService.Checknow logs each per-plugin failure itself, so every caller gets the warnings, andRunno longer logs them separately.CheckPluginUpdatesTaskstill stores the summary and reports its counts, then returns an error listing each failure whenFailedOperationsis above zero. The admin tasks API already reports a failed run as "Task failed. Inspect administrator diagnostics for details." without the error text, so the reason reaches the admin through the server log. A partial-success status for tasks would need a new task state, which is more than this fix needs.Validation
Checklogging a recorded failure.make lint-changedpasses.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-2251/
Surface and build: web admin Scheduled Tasks at desktop and phone width, and the server log. Before:
main(28d6c08c1); after:024c2d37e.Risks
A server whose catalog keeps listing a bad update now shows Check Plugin Updates as failed on every run until the catalog is fixed or the plugin's update policy is changed. That is the intended signal, but it's a new failed task on such servers.
Checklist
AI Disclosure