Repository navigation
Web role: refresh the published reports' board units in the background - #540
Conversation
The web role refreshed every published report's board unit before it listened. A change that makes each unit new -- #538 gave them a private-dump count -- rewrites all of them on the first start, which took production past openipc-deploy's 90-second /up gate twice; it rolled back, dev having too few reports to show it. The refresh now starts once the routes are up, in the background, and the role's stop waits for it before giving up the web lock. A refresh cut short by a stop is finished by the next start: a unit whose files are missing is rewritten.
PR Summary by QodoRefresh published report board units after web startup
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
…the shutdown wait Qodo's review of #540, now that the startup refresh runs while the site serves: - the published reports are read once the apply's lock is held (RefreshReportUnits), so a refresh started first cannot apply a list older than a later review's and put a report rejected meanwhile back on its board; - a unit's rewrite stages its files under Root/.staging and swaps them in after its rows commit, so no page links a file not yet there, and a rewrite cut short leaves the unit as it was; - the web role's stop waits ten seconds for the refresh, not forever: one queued behind a review's waits on a mutex that does not watch the context.
|
All three Qodo findings were real; fixed in 441179b:
|
Follow-up to #538.
The web role refreshed every published report's board unit (
refreshReportUnits) before it started listening. #538 added a private-dump count to every unit, so the first start rewrote all ~82 of them. On production that took longer thanopenipc-deploy's 90-second/upgate, and the deploy rolled back twice. Dev has fewer reports and passed. It went through only after the refresh was run once in a separate container with the new image.What changes
/upanswers at once.unchangedchecks the files).Meanwhile the board pages serve the units as they were, exactly as they do between a review and its refresh.
Tests: vet passes, and
./cmd/...and./internal/boardspass.