Skip to content

fix(report-api): add Firestore and static fallbacks for geos and ranks - #166

Merged
max-ostapenko merged 1 commit into
mainfrom
fix-geos-ranks-fallback
Oct 3, 2026
Merged

max-ostapenko merged 1 commit into
mainfrom
fix-geos-ranks-fallback

Conversation

@max-ostapenko

Copy link
Copy Markdown
Contributor

Summary

When AlloyDB's bigquery_fdw encounters Concurrent stream usage exceeded or connection errors, calls to /v1/geos or /v1/ranks currently fail with HTTP 500/404.

This PR adds resilient fallbacks in queryGeos and queryRanks:

  1. Attempts AlloyDB as primary.
  2. Falls back to Firestore (geos and ranks collections, populated monthly by Dataform).
  3. Falls back to default base arrays (ALL, etc.) if both database sources are unavailable, preventing 500/404 errors.

@max-ostapenko
max-ostapenko merged commit 9707e88 into main Oct 3, 2026
5 checks passed
@max-ostapenko
max-ostapenko deleted the fix-geos-ranks-fallback branch October 3, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant