firebase / firebase/firebase-functions-dart
Set the execution environment via CallableOptions
- Dominant language
- Dart
- Stars
- 44
- Forks
- 9
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
### Description
Cloud Run supports two [execution environments](https://docs.cloud.google.com/run/docs/configuring/execution-environments), gen1 (gVisor) and gen2 (microVM). It would be useful to be able to assign the execution environment via CallableOptions.
### Use Case
Currently gen1 is the default execution environment for Dart functions. However the gen1 (gVisor) execution environment has a [bug](https://github.com/dart-lang/sdk/issues/47899) that blocks connecting to Cloud SQL. Execution environment gen2 (microVM) does not have that bug so the solution is to switch execution environments.
### Proposed Solution
Add an `executionEnvironment` parameter to the CallableOptions object that allows the developer to set the execution environment when defining the function.
### Alternatives Considered
This bug may eventually be fixe so this parameter will likely only be used in rear cases, so having it be something that is executed via the gcloud CLI is not a horrible option.
Contributor guide
Assessment
This issue has not been assessed yet.