fix(poster-cleanarr): bypass the GET cache on status polls - #451
Merged
Conversation
The job log-tail poller and the module execution-status read went through apiCore.get's default 5-minute cache. Scan jobs carry no module_name, so the log-tail response echoes next_offset unchanged and the poll URL never varies — every poll after the first was served the cached 'running' status for the full TTL. A 20-second metadata scan showed the scanning spinner for ~5 minutes, and any retry or renavigation restarted the wait. Pass useCache: false on both reads; a status poll must never be cached.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe API client now bypasses GET caching for execution status and job log polling. The job log documentation describes the cache bypass. Request parameters and endpoints remain unchanged. ChangesExecution polling freshness
Estimated code review effort: 2 (Simple) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
10 tasks
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
Poster Cleanarr scans appeared to hang: the backend job finished in ~20 seconds, but the UI kept showing the scanning spinner for ~5 minutes, and retrying or navigating away restarted the wait.
Three pieces combine to cause it:
module_namein their payload (backend/api/posters.py), soGET /api/jobs/{id}/log-tailtakes its no-module-log early return and echoesnext_offsetback unchanged — the poll URL never varies between calls.tailJobLog(frontend/src/utils/api/posters.js) calledapiCore.getwithout opting out of the cache, andapiCore.getcaches GET responses for 5 minutes by default.pollJobUntilDonepolls every 1.5s until it sees a terminal status — but after the first real fetch, every subsequent poll of the identical URL was served the cachedrunningresponse until the TTL expired.The cleanup
LiveLogModalsharestailJobLog, so a cleanup job's final status was likewise masked for up to 5 minutes after the last log line.Fix
Pass
useCache: falseon the two live-status reads:tailJobLog— the job log-tail poller (scan spinner + cleanup modal)getExecutionStatus— live module execution status shown when expanding a running job on the Jobs page, previously also on the default 5-minute cacheAudit of the same class
Swept every
apiCore.getfor status/poll reads served by the default cache. All other pollers already opt out or use deliberate short TTLs:fetchRunStates(30s TTL, poll loops passuseCache: false),getJob(5s TTL, Jobs page poll passesuseCache: false),getStats(30s),listJobs(10s), cl2kseasonsStatus/uploadStatus, poster-self-heal, border-replacerr preview, and webhook provision status (alluseCache: false).Verification
npm --prefix frontend run lint— passnpx prettier --check src— passsuccesswithin seconds); this is purely a frontend read-path fix.Summary by CodeRabbit