-
Notifications
You must be signed in to change notification settings - Fork 1k
Add deprecation warnings for functions.config() API #8808
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
base: master
Are you sure you want to change the base?
Conversation
### Description Implement deprecation warnings for the functions.config() API ahead of the Cloud Runtime Configuration API shutdown on December 31, 2025. ### Changes - Add dangerouslyAllowFunctionsConfig experiment (defaults to true) - Create centralized deprecation warning module - Add warnings to all functions:config:* CLI commands - Add warning during deploy when runtime config is packaged ### Scenarios Tested - All functions:config:* commands show deprecation warning after execution - Deploy flow shows warning when .runtimeconfig.json is generated - Warnings are non-blocking (Phase 1 - awareness only) ### Sample Commands - firebase functions:config:get - firebase functions:config:set foo.bar=baz - firebase deploy --only functions (with existing runtime config)
Update deprecation warning to include comprehensive information about: - Action required by Dec 31, 2025 - What the deprecation means for users - Impact on CLI commands and deployments - Link to migration documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @taeold, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces deprecation warnings for the functions.config()
API within the Firebase CLI. The primary goal is to inform users about the upcoming shutdown of the underlying Cloud Runtime Configuration API by December 31, 2025, and guide them towards migration. It also provides a temporary experiment flag to allow continued use during the transition period.
Highlights
- Deprecation Warning Implementation: Integrated a new deprecation warning message into all
functions:config:clone
,functions:config:get
,functions:config:set
, andfunctions:config:unset
CLI commands. - Deployment Warning: Added a deprecation warning that triggers during the
firebase deploy
process if the deployed functions package includes runtime configuration data. - New Experiment Flag: Introduced
dangerouslyAllowFunctionsConfig
as a new experiment flag, defaulting totrue
, to temporarily allow the use of the deprecatedfunctions.config()
API during the migration phase. - Centralized Warning Message: Created a new utility file (
src/functions/deprecationWarnings.ts
) to centralize the detailed deprecation message, including the migration deadline and a link to the official documentation.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds deprecation warnings for the functions.config()
API. The experiment flag dangerouslyAllowFunctionsConfig
should be enforced, and multi-line strings can be improved with template literals.
dangerouslyAllowFunctionsConfig: { | ||
shortDescription: "Allows the use of deprecated functions.config() API", | ||
fullDescription: | ||
"The functions.config() API is deprecated and will be removed on December 31, 2025. " + | ||
"This experiment allows continued use of the API during the migration period.", | ||
default: true, | ||
public: true, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/functions/deprecationWarnings.ts
Outdated
const FUNCTIONS_CONFIG_DEPRECATION_MESSAGE = | ||
"DEPRECATION NOTICE: Action required to deploy after Dec 31, 2025\n" + | ||
" functions.config() API is deprecated.\n" + | ||
" Cloud Runtime Configuration API, the Google Cloud service used to store function configuration data, will be shut down on December 31, 2025. As a result, you must migrate away from using functions.config() to continue deploying your functions after December 31, 2025.\n" + | ||
" What this means for you:\n" + | ||
" The Firebase CLI commands for managing this configuration (functions:config:set, get, unset, clone, and export) are deprecated. These commands no longer work after December 31, 2025.\n" + | ||
" firebase deploy command will fail for functions that use the legacy functions.config() API after December 31, 2025.\n" + | ||
" Existing deployments will continue to work with their current configuration.\n" + | ||
" See your migration options at: https://firebase.google.com/docs/functions/config-env#migrate-to-dotenv"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a template literal for this multi-line string to improve readability.
const FUNCTIONS_CONFIG_DEPRECATION_MESSAGE = | |
"DEPRECATION NOTICE: Action required to deploy after Dec 31, 2025\n" + | |
" functions.config() API is deprecated.\n" + | |
" Cloud Runtime Configuration API, the Google Cloud service used to store function configuration data, will be shut down on December 31, 2025. As a result, you must migrate away from using functions.config() to continue deploying your functions after December 31, 2025.\n" + | |
" What this means for you:\n" + | |
" The Firebase CLI commands for managing this configuration (functions:config:set, get, unset, clone, and export) are deprecated. These commands no longer work after December 31, 2025.\n" + | |
" firebase deploy command will fail for functions that use the legacy functions.config() API after December 31, 2025.\n" + | |
" Existing deployments will continue to work with their current configuration.\n" + | |
" See your migration options at: https://firebase.google.com/docs/functions/config-env#migrate-to-dotenv"; | |
const FUNCTIONS_CONFIG_DEPRECATION_MESSAGE = `DEPRECATION NOTICE: Action required to deploy after Dec 31, 2025 | |
functions.config() API is deprecated. | |
Cloud Runtime Configuration API, the Google Cloud service used to store function configuration data, will be shut down on December 31, 2025. As a result, you must migrate away from using functions.config() to continue deploying your functions after December 31, 2025. | |
What this means for you: | |
The Firebase CLI commands for managing this configuration (functions:config:set, get, unset, clone, and export) are deprecated. These commands no longer work after December 31, 2025. | |
firebase deploy command will fail for functions that use the legacy functions.config() API after December 31, 2025. | |
Existing deployments will continue to work with their current configuration. | |
See your migration options at: https://firebase.google.com/docs/functions/config-env#migrate-to-dotenv`; |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8808 +/- ##
==========================================
- Coverage 51.97% 51.92% -0.05%
==========================================
Files 407 409 +2
Lines 30315 30401 +86
Branches 6276 6287 +11
==========================================
+ Hits 15755 15786 +31
- Misses 13143 13199 +56
+ Partials 1417 1416 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
Add deprecation warnings for functions.config() API ahead of Cloud Runtime Configuration API shutdown on Dec 31, 2025.
Changes
dangerouslyAllowFunctionsConfig
experiment (defaults to true)functions:config:*
commands