feat: add built-in functionRegion parameter for region#1928
Open
inlined wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a new built-in parameter functionRegion (and its alias region) to resolve the Cloud region from the FUNCTION_REGION environment variable, along with corresponding unit tests and CEL expression tests. The reviewer suggests wrapping the environment variable cleanup in a try...finally block within the unit tests to prevent potential test pollution if assertions fail.
inlined
force-pushed
the
ultima-rocket-spins-20h39
branch
from
July 16, 2026 04:39
b8c90b3 to
d27725f
Compare
### Description GCF v2 does not include the FUNCTION_REGION environment variable by default, which can break some workflows. In particular, Firebase Extensions may depend on this variable to target callable or task queue functions in the same region. This change adds the `functionRegion` built-in parameter (and `region` alias) to the SDK. ### Scenarios Tested - Unit tests for value extraction and CEL representation. ### Sample Commands - N/A (SDK library)
inlined
force-pushed
the
ultima-rocket-spins-20h39
branch
from
July 16, 2026 16:42
4ee75da to
b94dfb1
Compare
ajperel
reviewed
Jul 16, 2026
| * A built-in parameter that resolves to the Cloud region, without prompting | ||
| * the deployer. Alias for {@link functionRegion}. | ||
| */ | ||
| export const region: Param<string> = functionRegion; |
Contributor
There was a problem hiding this comment.
For my own learning... why do we need a region alias of this?
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.
Description
GCF v2 does not include the FUNCTION_REGION environment variable by default, which can break some workflows. In particular, Firebase Extensions may depend on this variable to target callable or task queue functions in the same region. This change adds the
functionRegionbuilt-in parameter (andregionalias) to the SDK.Scenarios Tested
relnote: Add
functionRegionbuilt-in parameter for region