Repository navigation
Conversation
… update periodicCheckLoop skipped the tick only while checking, downloading, verifying or installing. With an update staged (StateReady) it ran CheckAndInstall again and downloaded the same release on every tick until Restart. Skip StateReady too, as the existing CheckInterval test already assumes. Fixes wailsapp#6188
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: wailsapp/wails/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe periodic updater now skips checks in ChangesPeriodic update checks
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Periodic checks preserve a staged update instead of repeatedly downloading it. Restart and manual checks remain available; no actionable merge-blocking risk remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change prevents repeated downloads without changing update verification or installation authority. It intentionally pauses automatic discovery of newer releases while an update remains staged; restart or a manual check is needed to resume discovery. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the ticking clock Comment |
|
Automated v3 GA test run (taliesin-ai) for head
* Same failure on master The app was not launched (no GUI session over SSH). This run doesn't review or approve the PR. |
Description
With
Config.CheckIntervalset,periodicCheckLoopskips a tick only while the updater is checking, downloading, verifying or installing. Once an update is staged (StateReady), the next tick runsCheckAndInstallagain, which finds the same release and downloads the whole artifact once more, every interval until the app restarts. The comment inTestInit_CheckInterval_TicksProviderAndStopsalready says the loop ignoresStateReady; the condition just didn't include it.The loop now skips
StateReadyas well. A release published after an update is already staged is picked up by the first check afterRestart, not before; checking for a newer version while one is staged would need a version comparison in that path, which seemed out of scope for this fix.Fixes #6188
Type of change
How Has This Been Tested?
TestInit_CheckInterval_DoesNotRedownloadStagedUpdateruns the updater with a 20 ms interval, waits for the update to be staged, lets several more ticks pass and checks that the provider served a single download. Onmasterit fails withexpected 1 download while the update is staged, got 11; with the change it passes, also under-race.From
v3:go test ./pkg/updater/...passes (all six packages),go vet ./pkg/updater/is clean and both changed files aregofmt-clean.Test Configuration
macOS 26 (arm64), Go 1.26.2. Package tests only;
wails doctorwas not run since no app was built.Checklist:
website/src/pages/changelog.mdxwith details of this PR (v3 changelog entries are added automatically)Summary by CodeRabbit