diff --git a/CHANGELOG.md b/CHANGELOG.md index b333ed4770f..156d506372d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +- Updated supported runtimes for functions. Default python runtime is now 3.13. (#8534) - Fixed issue where Secret Manager API was not automatically enabled for functions using secrets. (#8528) - Changed artifact registry cleanup policy error to warn for CI/CD workloads #8513 - Enhance firebase init apphosting to support local source deploys. (#8479) diff --git a/schema/firebase-config.json b/schema/firebase-config.json index bdab2cf8be1..b0e531545b5 100644 --- a/schema/firebase-config.json +++ b/schema/firebase-config.json @@ -275,16 +275,12 @@ }, "runtime": { "enum": [ - "nodejs10", - "nodejs12", - "nodejs14", - "nodejs16", - "nodejs18", "nodejs20", "nodejs22", "python310", "python311", - "python312" + "python312", + "python313" ], "type": "string" }, diff --git a/src/deploy/functions/runtimes/python/index.ts b/src/deploy/functions/runtimes/python/index.ts index 1bcf0796103..70d18976990 100644 --- a/src/deploy/functions/runtimes/python/index.ts +++ b/src/deploy/functions/runtimes/python/index.ts @@ -60,6 +60,8 @@ export function getPythonBinary( return "python3.11"; } else if (runtime === "python312") { return "python3.12"; + } else if (runtime === "python313") { + return "python3.13"; } assertExhaustive(runtime, `Unhandled python runtime ${runtime as string}`); } diff --git a/src/deploy/functions/runtimes/supported/supported.spec.ts b/src/deploy/functions/runtimes/supported/supported.spec.ts index f5a7d2a0940..a099b406fe9 100644 --- a/src/deploy/functions/runtimes/supported/supported.spec.ts +++ b/src/deploy/functions/runtimes/supported/supported.spec.ts @@ -46,7 +46,7 @@ describe("supported runtimes", () => { expect(logLabeledWarning).to.have.been.calledWith( "functions", "Runtime Node.js 20 was deprecated on 2026-04-30 and will be " + - "decommissioned on 2026-10-31, after which you will not be able to " + + "decommissioned on 2026-10-30, after which you will not be able to " + "deploy without upgrading. Consider upgrading now to avoid disruption. See " + "https://cloud.google.com/functions/docs/runtime-support for full " + "details on the lifecycle policy", @@ -58,7 +58,7 @@ describe("supported runtimes", () => { expect(logLabeledWarning).to.have.been.calledWith( "functions", "Runtime Node.js 20 will be deprecated on 2026-04-30 and will be " + - "decommissioned on 2026-10-31, after which you will not be able to " + + "decommissioned on 2026-10-30, after which you will not be able to " + "deploy without upgrading. Consider upgrading now to avoid disruption. See " + "https://cloud.google.com/functions/docs/runtime-support for full " + "details on the lifecycle policy", diff --git a/src/deploy/functions/runtimes/supported/types.ts b/src/deploy/functions/runtimes/supported/types.ts index e7cd7014734..7c127e4569a 100644 --- a/src/deploy/functions/runtimes/supported/types.ts +++ b/src/deploy/functions/runtimes/supported/types.ts @@ -49,63 +49,69 @@ export const RUNTIMES = runtimes({ }, nodejs10: { friendly: "Node.js 10", - status: "GA", + status: "decommissioned", deprecationDate: "2024-01-30", decommissionDate: "2025-01-30", }, nodejs12: { friendly: "Node.js 12", - status: "GA", + status: "decommissioned", deprecationDate: "2024-01-30", decommissionDate: "2025-01-30", }, nodejs14: { friendly: "Node.js 14", - status: "GA", + status: "decommissioned", deprecationDate: "2024-01-30", decommissionDate: "2025-01-30", }, nodejs16: { friendly: "Node.js 16", - status: "GA", + status: "decommissioned", deprecationDate: "2024-01-30", decommissionDate: "2025-01-30", }, nodejs18: { friendly: "Node.js 18", - status: "GA", + status: "decommissioned", deprecationDate: "2025-04-30", - decommissionDate: "2025-10-31", + decommissionDate: "2025-10-30", }, nodejs20: { friendly: "Node.js 20", status: "GA", deprecationDate: "2026-04-30", - decommissionDate: "2026-10-31", + decommissionDate: "2026-10-30", }, nodejs22: { friendly: "Node.js 22", status: "GA", deprecationDate: "2027-04-30", - decommissionDate: "2027-10-31", + decommissionDate: "2028-10-31", }, python310: { friendly: "Python 3.10", status: "GA", deprecationDate: "2026-10-04", - decommissionDate: "2027-04-30", + decommissionDate: "2027-04-04", }, python311: { friendly: "Python 3.11", status: "GA", deprecationDate: "2027-10-24", - decommissionDate: "2028-04-30", + decommissionDate: "2028-04-24", }, python312: { friendly: "Python 3.12", status: "GA", deprecationDate: "2028-10-02", - decommissionDate: "2029-04-30", + decommissionDate: "2029-04-02", + }, + python313: { + friendly: "Python 3.13", + status: "GA", + deprecationDate: "2029-10-10", + decommissionDate: "2030-04-10", }, }); diff --git a/src/functions/projectConfig.spec.ts b/src/functions/projectConfig.spec.ts index 4c6e568cfb4..de9e8d97b84 100644 --- a/src/functions/projectConfig.spec.ts +++ b/src/functions/projectConfig.spec.ts @@ -29,7 +29,7 @@ describe("projectConfig", () => { }); it("fails validation given config w/o source", () => { - expect(() => projectConfig.validate([{ runtime: "nodejs10" }])).to.throw( + expect(() => projectConfig.validate([{ runtime: "nodejs22" }])).to.throw( FirebaseError, /codebase source must be specified/, ); @@ -84,7 +84,7 @@ describe("projectConfig", () => { }); it("fails validation given singleton config w/o source", () => { - expect(() => projectConfig.normalizeAndValidate({ runtime: "nodejs10" })).to.throw( + expect(() => projectConfig.normalizeAndValidate({ runtime: "nodejs22" })).to.throw( FirebaseError, /codebase source must be specified/, ); @@ -98,7 +98,7 @@ describe("projectConfig", () => { }); it("fails validation given multi-resource config w/o source", () => { - expect(() => projectConfig.normalizeAndValidate([{ runtime: "nodejs10" }])).to.throw( + expect(() => projectConfig.normalizeAndValidate([{ runtime: "nodejs22" }])).to.throw( FirebaseError, /codebase source must be specified/, );