Skip to content
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Updated untime config deprecation warning to no longer shows for v1 functions that only use default Firebase config. (#8963)
- Updated Data Connect emulator to v2.11.1, which:
- [added] Add an app watch that collects embedded GQL into the connector folder.
- [fixed] Handle foreign key constraint error as FailedPrecondition.
Expand Down
7 changes: 5 additions & 2 deletions src/deploy/functions/prepareFunctionsUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
type SortedConfig = string | { key: string; value: SortedConfig }[];

// TODO(inlined): move to a file that's not about uploading source code
export async function getFunctionsConfig(projectId: string): Promise<Record<string, unknown>> {

Check warning on line 28 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment
try {
return await functionsConfig.materializeAll(projectId);
} catch (err: any) {

Check warning on line 31 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
logger.debug(err);

Check warning on line 32 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `Error`
let errorCode = err?.context?.response?.statusCode;

Check warning on line 33 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .context on an `any` value

Check warning on line 33 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
if (!errorCode) {
logger.debug("Got unexpected error from Runtime Config; it has no status code:", err);
errorCode = 500;
Expand All @@ -47,7 +47,7 @@
return {};
}

async function pipeAsync(from: archiver.Archiver, to: fs.WriteStream) {

Check warning on line 50 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
from.pipe(to);
await from.finalize();
return new Promise((resolve, reject) => {
Expand All @@ -59,7 +59,7 @@
async function packageSource(
sourceDir: string,
config: projectConfig.ValidatedSingle,
runtimeConfig: any,

Check warning on line 62 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
): Promise<PackagedSourceInfo | undefined> {
const tmpFile = tmp.fileSync({ prefix: "firebase-functions-", postfix: ".zip" }).name;
const fileStream = fs.createWriteStream(tmpFile, {
Expand Down Expand Up @@ -101,15 +101,18 @@
mode: 420 /* 0o644 */,
});

// Log deprecation warning when runtime config is being packaged
logFunctionsConfigDeprecationWarning();
// Only warn about deprecated runtime config if there are user-defined values
// (i.e., keys other than the default 'firebase' key)
if (Object.keys(runtimeConfig).some((k) => k !== "firebase")) {

Check warning on line 106 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `{}`
logFunctionsConfigDeprecationWarning();
}
}
await pipeAsync(archive, fileStream);
} catch (err: any) {

Check warning on line 111 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
throw new FirebaseError(
"Could not read source directory. Remove links and shortcuts and try again.",
{
original: err,

Check warning on line 115 in src/deploy/functions/prepareFunctionsUpload.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
exit: 1,
},
);
Expand Down
8 changes: 4 additions & 4 deletions src/functions/deprecationWarnings.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { logWarningToStderr } from "../utils";

const FUNCTIONS_CONFIG_DEPRECATION_MESSAGE = `DEPRECATION NOTICE: Action required to deploy after Dec 31, 2025
const FUNCTIONS_CONFIG_DEPRECATION_MESSAGE = `DEPRECATION NOTICE: Action required to deploy after March 2026

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.
Cloud Runtime Configuration API, the Google Cloud service used to store function configuration data, will be shut down in March 2026. As a result, you must migrate away from using functions.config() to continue deploying your functions after March 2026.

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.
- The Firebase CLI commands for managing this configuration (functions:config:set, get, unset, clone, and export) are deprecated. These commands will no longer work after March 2026.
- firebase deploy command will fail for functions that use the legacy functions.config() API after March 2026.

Existing deployments will continue to work with their current configuration.

Expand Down
Loading