firebase / firebase/firebase-tools-ui

Gen2 functions should fail in the suite when using secret keys in functions.config() instead of Secret Manager

Open
#995 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
291
Forks
74
PR merge metrics
No merged PRs in 30d

Description

The Firebase Emulator Suite is very handy when developing apps using Firebase. So thanks for making it!

I recently updated a Firebase function to gen2. When deploying the function to production it failed because gen2 doesn't support storing secret keys in the functions.config(), part of the `firebase-functions` package. Instead one has to use Secret Manager in GC and read the values via `process.env`.

The Firebase Emulator Suite doesn't have the same requirement. It still supports "the old way". Thus, I was unable to detect this error in my code before updating my function in production.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the Firebase Emulator Suite handles gen2 functions and functions.config(), then reproduce the production failure with a gen2 function that uses a secret key. Done means the suite rejects this unsupported configuration or otherwise reports the same requirement to use Secret Manager, with coverage for the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, node.js, typescript
Domain
backend, cloud, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.