Repository navigation
perf(registries): share publish-date lookups per poll cycle - #1655
Conversation
…g the container list in HA MQTT
|
No actionable comments were generated in the recent review. Walkthrough
Change: Refactor Merge Risk:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Performance fixes from the whole-app review, registry and MQTT side.
Tests cover the cache hit, in-flight sharing, failed-lookup cleanup and the MQTT refresh no longer calling
getContainers.✨ Added
BaseRegistry: poll-cycle publish-date cache.startDigestCachePollCycleandendDigestCachePollCycleclear it.memoizePublishedAtshares cached and in-flight lookups by registry URL, image, and tag. Failed lookups are removed.RegistryLookupOptionswithusePollCycleCache(set tofalseto bypass the cache).Ghcr: waits for a URL-specific token bucket before each versions-page request.Hub: privatefetchImagePublishedAtmethod.🔧 Changed
Ghcr.getImagePublishedAtandHub.getImagePublishedAt: new optionaloptions?: RegistryLookupOptionsparameter.Hass.ts: with agent topic segments enabled, watcher counts read fromcontainerStore.getContainersRaw. Disabled path is unchanged.🐛 Fixed
🗑️ Removed
🔒 Security
Concerns:
getImagePublishedAtcallers and implementations accept the newoptionsparameter. Check for other registry providers that still use the old signature.getContainersRawresults are not mutated or emitted in MQTT payloads. The redacted clone path is bypassed.memoizePublishedAt. Check for duplicated memoize/key logic that should stay inBaseRegistry.api.github.combucket, not a per-request bucket.