Repository navigation
docs(storage-resize-images): document FUNCTION_DEFAULT_REGION - #3307
IzaakGough wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the README.md for the storage-resize-images kit to document the FUNCTION_DEFAULT_REGION environment variable and clarify its behavior alongside BUCKET_REGION. Feedback suggests correcting the documentation for FUNCTION_DEFAULT_REGION to show it as optional and not prompted, as it is only a fallback and not defined in config.ts.
| | Field | Env var | Required | Default | Description | | ||
| | ---------------------- | ------------------------ | -------- | ---------------------- | ------------------------------------------------------------------------------------------ | | ||
| | `bucketRegion` | `BUCKET_REGION` | yes | (prompted) | Cloud Storage bucket location; also places the function | | ||
| | (none) | `FUNCTION_DEFAULT_REGION` | yes | (prompted) | Function region when `BUCKET_REGION` is empty ([details](#bucket_region-decides-where-the-function-runs)) | |
There was a problem hiding this comment.
Marking FUNCTION_DEFAULT_REGION as Required: yes and Default: (prompted) is misleading. Since it is not defined as a parameter in config.ts, the Firebase CLI will not prompt for it during a regular deploy if it is missing from .env. Additionally, it is only used as a fallback when BUCKET_REGION is empty, so it is not strictly required for the kit to function.
| | (none) | `FUNCTION_DEFAULT_REGION` | yes | (prompted) | Function region when `BUCKET_REGION` is empty ([details](#bucket_region-decides-where-the-function-runs)) | | |
| | (none) | <code>FUNCTION_DEFAULT_REGION</code> | no | (empty) | Function region when <code>BUCKET_REGION</code> is empty ([details](#bucket_region-decides-where-the-function-runs)) | |
Fixes #3274.
The README said
FUNCTION_DEFAULT_REGIONis never read and that an emptyBUCKET_REGIONkeeps the deployed region. Neither is true in an installed project, so users could not predict where the function would deploy.This documents
FUNCTION_DEFAULT_REGIONas the fallback whenBUCKET_REGIONis empty, and adds it to the configuration table.Based on the CLI's install and migrate templates and the deploys measured in the issue. Not redeployed for this change.