René's URL Explorer Experiment


Title: fix(supervisor): count pods from a limit=1 list instead of an aggregate metric by nicktrn · Pull Request #4442 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(supervisor): count pods from a limit=1 list instead of an aggregate metric by nicktrn · Pull Request #4442 · triggerdotdev/trigger.dev

X Title: fix(supervisor): count pods from a limit=1 list instead of an aggregate metric by nicktrn · Pull Request #4442 · triggerdotdev/trigger.dev

Description: The pod-count backpressure source read apiserver_storage_objects{resource="pods"} from an apiserver /metrics scrape. That gauge is a periodically-refreshed cached count, and it is served by whichever apiserver replica the scrape lands on — replicas disagree with each other at the same instant, by enough to swamp the engage/release hysteresis band. Engage and release timing was therefore partly a function of scrape routing. This replaces it with a single limit=1 list of the workload namespace and computes remainingItemCount + items.length. One pod object transferred, no informer, no watch cache. Two request-shape constraints are load-bearing and called out in the code: passing a label or field selector makes the apiserver omit remainingItemCount entirely, and setting resourceVersion serves a cached count rather than a quorum read. Neither is passed. remainingItemCount is only set when the list is truncated, so _continue is the truncation signal — if it is absent the returned page is the whole collection and items.length is already exact. If the list is truncated and the count is missing or implausible, the fetcher throws rather than guessing. Failure semantics are unchanged: a throw lands in the monitor's existing catch, exactly as the previous parse did. The hysteresis, verdict shape, and gauge are untouched. RBAC is unchanged — the existing role already grants pods: list. The /metrics non-resource grant in the deployment role becomes unused, and the scrape-timeout env var is now a slight misnomer. Both left alone deliberately: the grant may be wanted again for other apiserver signals, and renaming the var would need a coordinated config change for no behavioural gain. Tests cover the not-truncated, truncated, missing-count, negative-count and timeout paths.

Open Graph Description: The pod-count backpressure source read apiserver_storage_objects{resource="pods"} from an apiserver /metrics scrape. That gauge is a periodically-refreshed cached count, and it is served ...

X Description: The pod-count backpressure source read apiserver_storage_objects{resource="pods"} from an apiserver /metrics scrape. That gauge is a periodically-refreshed cached count, and it is...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4442

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f2038c52-a85d-0d8b-3709-aa1f2b752bcd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB1C6:29CAD0:6F2323:A46517:6AFAF53B
html-safe-nonce14e0eecf33784867993f803ed9fa496a73a120a4137b916eb2032175963f89b7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUM2OjI5Q0FEMDo2RjIzMjM6QTQ2NTE3OjZBRkFGNTNCIiwidmlzaXRvcl9pZCI6IjU5ODM1Mzg4MDk4MTgyNDg1MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacceaadab2fc1cddec786a983b7430ce408fdea48a208ea97451e1cc0f39856024
hovercard-subject-tagpull_request:4179793593
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4442/files
twitter:imagehttps://avatars.githubusercontent.com/u/55853254?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/55853254?s=400&v=4
og:image:altThe pod-count backpressure source read apiserver_storage_objects{resource="pods"} from an apiserver /metrics scrape. That gauge is a periodically-refreshed cached count, and it is served ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4442/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4442%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4442%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
nicktrnhttps://github.com/nicktrn
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
fix/pod-count-exact-listhttps://github.com/triggerdotdev/trigger.dev/tree/fix/pod-count-exact-list
Conversation 22 https://github.com/triggerdotdev/trigger.dev/pull/4442
Commits 6 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits
Checks 31 https://github.com/triggerdotdev/trigger.dev/pull/4442/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4442/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
fix(supervisor): count pods from a limit=1 list instead of an aggregate metric https://github.com/triggerdotdev/trigger.dev/pull/4442/files#top
Show all changes 6 commits https://github.com/triggerdotdev/trigger.dev/pull/4442/files
8cec1d1 fix(supervisor): count pods with an exact list instead of an aggregat… nicktrn Jul 31, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits/8cec1d1fba10293765184fb9957ed16934b386e0
535d23a chore(supervisor): oxfmt the pod-count files nicktrn Jul 31, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits/535d23abcf5ff707d58df088a92f72e5b4dea73c
ada5b78 fix(supervisor): bound the pod-count list server-side and clear its t… nicktrn Jul 31, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits/ada5b78ca1fb08df6d0fdaa91c2bbd4cac9f80ee
ae5cd5b chore(supervisor): shorten the release note to one line nicktrn Jul 31, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits/ae5cd5b6d3cb3a2f7f704c4edd6d3a89042d018c
45b05f1 test(supervisor): test the pod-count logic as pure functions, drop th… nicktrn Jul 31, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits/45b05f1099e6b822c47b17cffa732e4be2dc7017
cd5d5cc docs(supervisor): describe the pod count as an estimate, not exact nicktrn Jul 31, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4442/commits/cd5d5cc6d262596d7a4fe9eb57ab01b1bd632158
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4442/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
pod-count-exact-list.md https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-5cfebed2a0a2e877bf22ccc471900a5c2daa275734962704384bfa065095486c
k8sPodCountSignalSource.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-c0ed6ac426b21ba6e21a9416c2ca6c4fb529c2a5ad91fef4724954ceb9826a0b
k8sPodCountSignalSource.ts https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-e3d9e35348861329990423d6a6cb9d9dc15e0c529a3261ac7d40858a264ff86e
kubernetes.ts https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-2b9601b374af80b66572af720ebe19f63030d6ba710df66337569ce7b61f121c
index.ts https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-4e018b51c5717e291f73926c9144e6426f6916aa6630b7fd807b672a79bf911a
.server-changes/pod-count-exact-list.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-5cfebed2a0a2e877bf22ccc471900a5c2daa275734962704384bfa065095486c
View file https://github.com/triggerdotdev/trigger.dev/blob/cd5d5cc6d262596d7a4fe9eb57ab01b1bd632158/.server-changes/pod-count-exact-list.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4442/{{ revealButtonHref }}
apps/supervisor/src/backpressure/k8sPodCountSignalSource.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-c0ed6ac426b21ba6e21a9416c2ca6c4fb529c2a5ad91fef4724954ceb9826a0b
View file https://github.com/triggerdotdev/trigger.dev/blob/cd5d5cc6d262596d7a4fe9eb57ab01b1bd632158/apps/supervisor/src/backpressure/k8sPodCountSignalSource.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4442/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-c0ed6ac426b21ba6e21a9416c2ca6c4fb529c2a5ad91fef4724954ceb9826a0b
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-c0ed6ac426b21ba6e21a9416c2ca6c4fb529c2a5ad91fef4724954ceb9826a0b
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-c0ed6ac426b21ba6e21a9416c2ca6c4fb529c2a5ad91fef4724954ceb9826a0b
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-c0ed6ac426b21ba6e21a9416c2ca6c4fb529c2a5ad91fef4724954ceb9826a0b
apps/supervisor/src/backpressure/k8sPodCountSignalSource.tshttps://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-e3d9e35348861329990423d6a6cb9d9dc15e0c529a3261ac7d40858a264ff86e
View file https://github.com/triggerdotdev/trigger.dev/blob/cd5d5cc6d262596d7a4fe9eb57ab01b1bd632158/apps/supervisor/src/backpressure/k8sPodCountSignalSource.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4442/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-e3d9e35348861329990423d6a6cb9d9dc15e0c529a3261ac7d40858a264ff86e
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-e3d9e35348861329990423d6a6cb9d9dc15e0c529a3261ac7d40858a264ff86e
apps/supervisor/src/clients/kubernetes.tshttps://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-2b9601b374af80b66572af720ebe19f63030d6ba710df66337569ce7b61f121c
View file https://github.com/triggerdotdev/trigger.dev/blob/cd5d5cc6d262596d7a4fe9eb57ab01b1bd632158/apps/supervisor/src/clients/kubernetes.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4442/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-2b9601b374af80b66572af720ebe19f63030d6ba710df66337569ce7b61f121c
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-2b9601b374af80b66572af720ebe19f63030d6ba710df66337569ce7b61f121c
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-2b9601b374af80b66572af720ebe19f63030d6ba710df66337569ce7b61f121c
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
apps/supervisor/src/index.tshttps://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-4e018b51c5717e291f73926c9144e6426f6916aa6630b7fd807b672a79bf911a
View file https://github.com/triggerdotdev/trigger.dev/blob/cd5d5cc6d262596d7a4fe9eb57ab01b1bd632158/apps/supervisor/src/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4442/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-4e018b51c5717e291f73926c9144e6426f6916aa6630b7fd807b672a79bf911a
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-4e018b51c5717e291f73926c9144e6426f6916aa6630b7fd807b672a79bf911a
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-4e018b51c5717e291f73926c9144e6426f6916aa6630b7fd807b672a79bf911a
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4442/files
https://github.com/triggerdotdev/trigger.dev/pull/4442/files#diff-4e018b51c5717e291f73926c9144e6426f6916aa6630b7fd807b672a79bf911a
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.