Skip to content

onRequest doesn't support setting Execution Environment #1756

@tony-g

Description

@tony-g

Related issues

Not that I could find searching for execution environment or deployment args - sorry if I missed something!

[REQUIRED] Version info

node:
v22.17.0

firebase-functions:
6.6.0
firebase-tools:
14.20.0

firebase-admin:
13.5.0

[REQUIRED] Test case

Cloud Run Functions has this Execution Environment setting

Image

https://cloud.google.com/run/docs/about-execution-environments

It's of course possible to update post-deploy, but it would be cleaner if we could co-locate these settings.

[REQUIRED] Steps to reproduce

N/A (Feature request, not a bug)

[REQUIRED] Expected behavior

Would be great if there was a setting (so we can keep all the settings together)

onRequest({ executionEnvironment: 'gen2', otherSettings }, theFunction)

I could imagine it's not appealing to maintain options for every Cloud Functions setting - Not sure if this is practical either, but since this appears to be a supported argument during function deploy, maybe there could be an escape hatch to allow us to specify deploy args?

onRequest({ deployArgs: { 'executionEnvironment': 'gen2' } }, theFunction)
// which would get translated into the equivalent of the `--execution-environment gen2`

[REQUIRED] Actual behavior

N/A

Were you able to successfully deploy your functions?

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions