Skip to content

decision(storage-resize-images): kit/extension parity – FUNCTION_DEFAULT_REGION is required but BUCKET_REGION overrides it #3274

Open

Description

@IzaakGough

storage-resize-images kit/extension parity. Priority: low. Users must set FUNCTION_DEFAULT_REGION, but it has no effect when BUCKET_REGION is set, and region errors name neither param.

Difference

functions:kits:install writes a wrapper that declares a required FUNCTION_DEFAULT_REGION param, described as the "Global default region where functions should be deployed" (from the CLI's index-kit.ts template). The kit's own BUCKET_REGION overrides it. The extension has a single location setting.

Reproduced

.env (bucket in europe-west4) Result
BUCKET_REGION=us-central1 Error: A function in region us-central1 cannot listen to a bucket in region europe-west4
Same, plus FUNCTION_DEFAULT_REGION=europe-west4 The same error: BUCKET_REGION wins
FUNCTION_DEFAULT_REGION line removed Non-interactive deploy fails asking for it
BUCKET_REGION= and FUNCTION_DEFAULT_REGION=europe-west4 Deploys to europe-west4
BUCKET_REGION= and FUNCTION_DEFAULT_REGION= Error: A function in region cannot listen to a bucket in region europe-west4 (blank region)

The README says an empty BUCKET_REGION= keeps the deployed region, or falls back to us-central1 or FIREBASE_FUNCTIONS_DEFAULT_REGION. Neither held: with FUNCTION_DEFAULT_REGION=us-central1 and FIREBASE_FUNCTIONS_DEFAULT_REGION=europe-west4, the variable was ignored. Redeploying an existing europe-west4 instance after changing FUNCTION_DEFAULT_REGION tried to move it. The README's Configuration table doesn't list FUNCTION_DEFAULT_REGION.

Code

Resolution

Two options:

  • Correct the README's empty-BUCKET_REGION paragraph and document FUNCTION_DEFAULT_REGION as the fallback.
  • Ask firebase-tools not to generate a region param for kits that place their own functions.

#3159 documented matching FUNCTION_DEFAULT_REGION to the bucket for migration.

Activity

  1. CorieW commented on Nov 3, 2026

    @CorieW
    Member

    Decision: keep it. FUNCTION_DEFAULT_REGION is required and only used when BUCKET_REGION is empty. Recorded under "Decisions" in #3263. The README docs are in #3307, which closes this issue when it merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

decisionNeeds a decision before work can proceedkitsparity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions