Repository navigation
Hosting SSR region - #5504
Hosting SSR region#5504
Conversation
- Add initialization step to choose region - Validate region in prepareFrameworks - Add custom region in functions.yaml and the cloud function
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5504 +/- ##
==========================================
- Coverage 56.15% 56.14% -0.02%
==========================================
Files 317 317
Lines 21496 21503 +7
Branches 4385 4388 +3
==========================================
+ Hits 12071 12072 +1
- Misses 8363 8369 +6
Partials 1062 1062 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Reuse ALLOWED_SSR_REGIONS - Add default region to prompt - Add all the frameworksBackend properties to function args.
…e/firebase-tools into chalosalvador-hosting-ssr-region
- Iterate over valid regions - Simplify cloud function first arg
jamesdaniels
left a comment
There was a problem hiding this comment.
Made a few small changes, let's ![]()
| export const DEFAULT_REGION = "us-central1"; | ||
| export const NODE_VERSION = parseInt(process.versions.node, 10).toString(); | ||
| export const DEFAULT_REGION = "us-central1"; | ||
| export const ALLOWED_SSR_REGIONS = [ |
There was a problem hiding this comment.
Hi, is there a motive behind limiting the regions? For example, we currently use europe-west2 (London) but it seems this configuration would be disallowed?
There was a problem hiding this comment.
That's because cloud Functions V2 are only available in those regions.
There was a problem hiding this comment.
@tamerxkilinc This page https://cloud.google.com/functions/docs/locations?hl=en#tier_2_pricing shows that Cloud Functions v2 are currently supported in many more regions. Does that mean we can already use them or are there other limiting factors?
There was a problem hiding this comment.
Should be possible to use the new regions now
Description
Add the ability to set the region of a web framework's generated SSR function.
prepareFrameworksfunctions.yamland the cloud functionScenarios Tested
firebase.jsonfile includes theframeworksBackendproperty with the chosen region.firebase deploywith and without the necessity of a backend.functions.yamlcontains the correct region and theserver.jsfile contains the cloud function with the correct region added to it.firebase.jsonand verify that the CLI asks to delete or keep the current deployed cloud function with the old region.firebase.jsonand verify that the CLI fails with the appropriate error message.Sample Commands