-
Notifications
You must be signed in to change notification settings - Fork 962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 ReportBase: 56.15% // Head: 56.14% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5504 +/- ##
==========================================
- Coverage 56.15% 56.14% -0.02%
==========================================
Files 317 317
Lines 21494 21501 +7
Branches 4385 4388 +3
==========================================
+ Hits 12071 12072 +1
- Misses 8361 8367 +6
Partials 1062 1062
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
- 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few small changes, let's
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because cloud Functions V2 are only available in those regions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
prepareFrameworks
functions.yaml
and the cloud functionScenarios Tested
firebase.json
file includes theframeworksBackend
property with the chosen region.firebase deploy
with and without the necessity of a backend.functions.yaml
contains the correct region and theserver.js
file contains the cloud function with the correct region added to it.firebase.json
and verify that the CLI asks to delete or keep the current deployed cloud function with the old region.firebase.json
and verify that the CLI fails with the appropriate error message.Sample Commands