-
Notifications
You must be signed in to change notification settings - Fork 1k
Runtime environment variables are deleted during function deployment using tools 9.4.0 or greater #3226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@pawlowskim thanks for reporting this. @joehan can you take a look please? |
) Today, we unexpectedly delete environment variables on existing Cloud Functions when updating functions via `firebase deploy --only functions` command #3226. This regression was introduced in #3132. ### Scenarios Tested 1. Manually setup an environment variable using Google Cloud Console on a firebase function. 2. Run `firebase deploy --only functions` to update the existing function. 3. Notice that existing environment variable isn't wiped out as a result of the new deploy.
The fix should be available on the next release of the CLI (ETA: ~week?). I'll close the issue once the release including #3266 is cut. |
Great, thanks for the fix and update :) will test it out for sure. |
Fixed released in 9.10.0. Please upgrade your CLI to receive the patch and deploy away! |
Would be good to update release notes https://github.com/firebase/firebase-tools/releases |
Ah missed my opportunity to update the changelog :( sorry. |
…rebase#3266) Today, we unexpectedly delete environment variables on existing Cloud Functions when updating functions via `firebase deploy --only functions` command firebase#3226. This regression was introduced in firebase#3132. ### Scenarios Tested 1. Manually setup an environment variable using Google Cloud Console on a firebase function. 2. Run `firebase deploy --only functions` to update the existing function. 3. Notice that existing environment variable isn't wiped out as a result of the new deploy.
[REQUIRED] Environment info
firebase-tools: 9.4.0 or greater
Platform: macOS Catalina (v 10.15.7), node v10.21.0
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
CUSTOM_VARIABLE:some_value
(from GCP console)[REQUIRED] Expected behavior
CUSTOM_VARIABLE:some_value
- should persists across deployments.[REQUIRED] Actual behavior
Only
FIREBASE_CONFIG
runtime variable is available in the function.Few things I have spotted:
src/deploy/functions/prepare.js
had code line like thisvar runtimeFromConfig = options.config.get("functions.runtime");
which is missing in 9.4.0+, and only default parameters are re-written toenvironmentVariables
of a function. This might help you track down the problem. v9.3.0...firebase:v9.4.0#diff-ef26a08c6cb27fae2c011ca0638635007349132a1f8e3957a0ee1306d2cc3ce5R58The text was updated successfully, but these errors were encountered: