Bug 1499551 - Bound jobs-view memory: per-repo push cap + idle-timeout polling (part 2/3)#9705
Open
camd wants to merge 8 commits into
Open
Bug 1499551 - Bound jobs-view memory: per-repo push cap + idle-timeout polling (part 2/3)#9705camd wants to merge 8 commits into
camd wants to merge 8 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9705 +/- ##
=======================================
Coverage 82.66% 82.67%
=======================================
Files 626 626
Lines 36753 36784 +31
Branches 3348 3338 -10
=======================================
+ Hits 30383 30412 +29
- Misses 5988 5989 +1
- Partials 382 383 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Part 2 of 3 addressing Bug 1499551 (jobs-view memory growth over time). Expanded per team discussion to also bound background-tab lifetime.
1. Per-repo rolling push cap
On a watched tree the 60s poll appends pushes and their jobs with no eviction, so
pushList/jobMap/decisionTaskMapand the per-<Push>job state grow unbounded. Now:getRepoPushCap).2. Stop polling forgotten background tabs (idle timeout + keep-alive)
hidden) stops the push/job poll after 2 hours of continuous inactivity. Bringing it back to the foreground resumes polling (with one catch-up poll) and resets the clock.New pieces:
pollControlStore(per-tabkeepAlive/pollingPaused),usePollingLifecyclehook (interval + visibility idle logic, extracted fromPushListfor isolated testing), andKeepAliveButton.Testing
getRepoPushCap,enforcePushLimiteviction + selected/pinned protection + jobMap pruning, floor applied onfetchPushes, trim afterpollPushes.usePollingLifecyclewith fake timers + simulated visibility changes — stops after the limit while hidden, resumes + catch-up on refocus, refocus resets the clock, keep-alive extends to 12h.pollControlStoreandKeepAliveButton(toggle + paused indicator).Part 3 (#9706) is stacked on this branch.