feat: Firestore tenant host routing with cache (Functions 0.31, Console 0.6.22)#291
Open
feat: Firestore tenant host routing with cache (Functions 0.31, Console 0.6.22)#291
Conversation
…le 0.6.22) - Functions: tenant-host-routing, /api/internal/resolve-tenant, async widgets - Console: async proxy, /internal/tenant-resolve, auth shell hook, tests - Env templates, apphosting defaults, CHANGELOGs, Vitest coverage includes Made-with: Cursor
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (94.50%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #291 +/- ##
==========================================
- Coverage 98.49% 98.38% -0.11%
==========================================
Files 102 103 +1
Lines 3390 3478 +88
Branches 907 934 +27
==========================================
+ Hits 3339 3422 +83
Misses 3 3
- Partials 48 53 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Avoid parent load()/loading gate remount clearing the draft on slow CI. Made-with: Cursor
Resolve conflicts in changelogs, package versions, and widget route: keep async Firestore hostname resolution with resolveViewerUidForPublicOnboarding(req, res). Console 0.6.26 / Functions 0.31.0 changelog entries on top of main. Co-authored-by: Cursor <cursoragent@cursor.com>
- Add root "emulators" script and wire dev:full through it. - Document local dev with pnpm run dev:full / emulators + dev only; move optional App Hosting emulator steps to docs/APP_HOSTING.md. - Align App Hosting emulator hostname with firebase.json (console.dev-chronogrove.com) in Auth emulator wiring, baseUrl helpers, and CORS allowlist test. - Update next-env.d.ts routes import path for Next dev types. Co-authored-by: Cursor <cursoragent@cursor.com>
dev-chronogrove.com emulator uses :8084 in the Origin header; chronogrove regexes previously required .com at end of string and rejected ports. Co-authored-by: Cursor <cursoragent@cursor.com>
…tenant - Drop unreachable empty-host guard in getCachedFirestoreClaim. - tenant-host-routing: TTL default for negative ms; blank/undefined host; internal API nulls for missing tenant doc, bad uid type, empty uid string. - create-express-app: internal key match/mismatch, duplicate host query, catch path via spy; widget GET without query when Firestore routing resolves host. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #257
Summary
tenant_hostsresolution after env map whenENABLE_FIRESTORE_TENANT_ROUTING=true, in-process TTL cache (TENANT_HOST_ROUTING_CACHE_MS, optionalTENANT_HOST_ROUTING_CACHE_MAX_ENTRIES),GET /api/internal/resolve-tenant?host=, optionalCHRONOGROVE_INTERNAL_API_KEY.proxy+/internal/tenant-resolvefor auth shell;useFirestoreTenantRootSlug+authless-tenant-surface;functions-app-originfor server fetches. App Hosting env defaults keep routing off until enabled.See changelogs:
functions/CHANGELOG.md,apps/console/CHANGELOG.md, rootCHANGELOG.md.Made with Cursor