Repository navigation
Conversation
Allow the warehouse time to resume from idle and keep fallback responses out of the cache. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Share a failed refresh briefly so an outage cannot repeatedly exhaust registry quotas. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4a50c04. Configure here.
| throw error; | ||
| }, | ||
| ); | ||
| published = refresh; |
There was a problem hiding this comment.
Warehouse misses refetch public registries
Medium Severity
loadPublishedAdoption treats any missing selfHosted.totals as a failed refresh and drops the in-process TTL to 15s for the whole loadAdoption result. That condition also holds when warehouse credentials are absent, the endpoint URL is rejected, or the query times out, so GitHub, PyPI, npm, and GHCR are fetched again on every retry. Combined with no-store on the fallback page, origin traffic can exceed GitHub's unauthenticated 60 request/hour limit and hide the OSS metrics the fallback is meant to keep showing.
Reviewed by Cursor Bugbot for commit 4a50c04. Configure here.


Changelog category
Changelog entry
The adoption dashboard retries after a warehouse failure and keeps the fallback page out of the cache.
Why
An idle warehouse can take longer to answer than a public registry. A cached failure page can keep metrics hidden for up to an hour after the warehouse recovers.
Scope and risk
The warehouse request gets a 30-second deadline. The page shares an in-flight refresh across requests in the same process. A failed refresh can be retried after 15 seconds. Page and CSV fallback responses bypass CDN caching until the warehouse responds.
Compatibility, rollout and rollback
Tests
node --test docs/lib/adoption*.test.mjs docs/lib/oss-snapshot.test.mjsnpm --prefix docs run buildCache-Control: no-store. The second restored the one-hour cache.make format,make lint,make typecheckLOOM_ENV_FILE= .venv/bin/python -m pytest tests/unit/test_doc_links.py tests/unit/test_public_copy.py -qAI assistance in the code
AI-generated (Codex). I checked the dashboard cache path, retry behavior, and built response headers.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
Note
Medium Risk
Touches public adoption page caching and telemetry fetch timeouts; mis-detection of warehouse availability could affect CDN behavior, but scope is limited to the docs adoption route and data loader.
Overview
Fixes adoption dashboard behavior when the ClickHouse Query API is slow or down—especially while an idle warehouse is waking up.
Data layer: Warehouse fetches now use a 30s abort deadline (public registry calls stay at 5s).
readSourcerespects a caller-providedsignalinstead of always applying the short timeout.loadPublishedAdoptionkeeps the normal 5-minute in-process cache on success, but on a failed or incomplete warehouse load (selfHosted.totalsundefined) it shortens cache expiry to 15 seconds so the next request retries quickly instead of reusing a failed snapshot for five minutes.HTTP caching: The adoption page and CSV exports only send one-hour CDN / short CSV cache headers when warehouse aggregates are actually present; otherwise responses use
Cache-Control: no-storeso Vercel does not serve a stale “warehouse disconnected” page for up to an hour after recovery.Docs/tests: Telemetry README wording is updated to describe conditional page caching. A new unit test simulates warehouse timeout, shared in-flight refresh, and a successful retry with the expected timeout values.
Reviewed by Cursor Bugbot for commit 4a50c04. Bugbot is set up for automated code reviews on this repo. Configure here.