Track custom integrations from the HACS default list - #1128
Track custom integrations from the HACS default list#1128clintongormley wants to merge 1 commit into
Conversation
brands no longer accepts new custom_integrations entries since HA 2026.3.0, so any custom integration created after the freeze can never appear in the public stats: reported domains that are not in brands' domains.json are dropped when the queue is processed. Use the HACS default repository list as an additional source of known domains, so integrations distributed through HACS are counted even when they have no brands entry. The list is reduced to the domains we need and cached in KV, refreshed at most once a day. A failed refresh falls back to the cached list, so an outage of a third-party source can never stall queue processing. Fixes home-assistant#1094 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1d9efc4 to
969bb76
Compare
|
Another data point in favour of this:
I verified the drop happens exactly where you describe, on an instance that does report: analytics preferences are A cross-check on the current Happy to test against a preview deployment if that is useful. |
Proposed change
processQueueonly counts a reported custom integration if its domain is in brands'domains.json, and since HA 2026.3.0 brands no longer accepts newcustom_integrations/entries (Brands Proxy API announcement). A custom integration created after the freeze can therefore never appear in the public stats, however many installations report it.This adds the HACS default repository list as a second source of known domains — 901 domains that brands does not have today — and keeps working for anything added to HACS from now on.
The list comes from
https://data-v2.hacs.xyz/integration/data.json(the same host HACS itself uses), is reduced to a plain list of domains, and is cached in KV. It refreshes at most once a day; a failed refresh reuses the cached list and raises a Sentry warning, so an outage of a third-party source can't stall queue processing. With nothing cached it falls back to brands alone.Matching against a curated list rather than accepting any reported domain keeps the property the brands filter was there for: only domains from a publicly reviewable list are counted, so
custom_integrations.jsoncan't be filled with arbitrary keys.Notes for reviewers
worker/src/utils/fetch-json.tsis new — three sources now share the fetch/check/parse shape, so it is extracted. That also surfaced the!versionResponse.okbranch throwing"Could not get domain list from brands", now corrected.Type of change
Additional information
Checklist
script/worker_test,script/worker_build).🤖 Generated with Claude Code