fix: support secret environment variables for Cloud Run functions - #10489
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds the "run" platform to the list of supported platforms for secrets during deployment validation. Feedback indicates that while this change enables validation, the overall support for secrets on the "run" platform remains incomplete in other parts of the codebase, such as secret updates. Additionally, it is recommended to use a central constant for platform lists to improve maintainability.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10489 +/- ##
=======================================
Coverage ? 57.08%
=======================================
Files ? 599
Lines ? 38025
Branches ? 7682
=======================================
Hits ? 21707
Misses ? 14550
Partials ? 1768 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
513725f to
1e43d0f
Compare
014f113 to
f131e80
Compare
ajperel
left a comment
There was a problem hiding this comment.
Wouldn't hurt to add a test, but I think the code change makes sense. Thanks for the update.
I'll add tests now |
a4f2cb7 to
4becdc6
Compare
…0489) * fix: support secret environment variables for Cloud Run (platform=run) functions * fix: use backend.AllFunctionsPlatforms * lint errors * test: add validation for Cloud Run functions with secret environment variables
Dart functions (and any language deploying as Cloud Run services) use
platform=run. ThesecretsSupportedPlatformsallowlist invalidate.tsonly includedgcfv1andgcfv2, causing deploys with secrets to fail with:Fix
Add
"run"tosecretsSupportedPlatforms.Known limitations
Secret rotation (
firebase functions:secrets:set) is not yet supported for Cloud Run functions.The following code in
src/functions/secrets.tsstill throws forplatform=run:https://github.com/firebase/firebase-tools/blob/main/src/functions/secrets.ts#L382-L385
Related