Skip to content

Commit 5b3926e

Browse files
taeoldjoehan
andauthored
chore: Update Cloud Run functions runtime versions (#8534)
* chore: Update Cloud Functions runtime versions Updates the Node.js and Python runtime versions to align with the latest supported runtimes on Cloud Run. Notably, this changes the default runtime of python to be 3.13 instead of 3.12. * Add changelog. * Add python313 support. * Update firebase.config schema. * Schema update, fix unit tests. * Update status for decommissioned runtimes. * Fix tests. * Update firebase.config schema. --------- Co-authored-by: joehan <[email protected]>
1 parent 04364fa commit 5b3926e

File tree

6 files changed

+27
-22
lines changed

6 files changed

+27
-22
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- Updated supported runtimes for functions. Default python runtime is now 3.13. (#8534)
12
- Fixed issue where Secret Manager API was not automatically enabled for functions using secrets. (#8528)
23
- Changed artifact registry cleanup policy error to warn for CI/CD workloads #8513
34
- Enhance firebase init apphosting to support local source deploys. (#8479)

schema/firebase-config.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,16 +275,12 @@
275275
},
276276
"runtime": {
277277
"enum": [
278-
"nodejs10",
279-
"nodejs12",
280-
"nodejs14",
281-
"nodejs16",
282-
"nodejs18",
283278
"nodejs20",
284279
"nodejs22",
285280
"python310",
286281
"python311",
287-
"python312"
282+
"python312",
283+
"python313"
288284
],
289285
"type": "string"
290286
},

src/deploy/functions/runtimes/python/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ export function getPythonBinary(
6060
return "python3.11";
6161
} else if (runtime === "python312") {
6262
return "python3.12";
63+
} else if (runtime === "python313") {
64+
return "python3.13";
6365
}
6466
assertExhaustive(runtime, `Unhandled python runtime ${runtime as string}`);
6567
}

src/deploy/functions/runtimes/supported/supported.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe("supported runtimes", () => {
4646
expect(logLabeledWarning).to.have.been.calledWith(
4747
"functions",
4848
"Runtime Node.js 20 was deprecated on 2026-04-30 and will be " +
49-
"decommissioned on 2026-10-31, after which you will not be able to " +
49+
"decommissioned on 2026-10-30, after which you will not be able to " +
5050
"deploy without upgrading. Consider upgrading now to avoid disruption. See " +
5151
"https://cloud.google.com/functions/docs/runtime-support for full " +
5252
"details on the lifecycle policy",
@@ -58,7 +58,7 @@ describe("supported runtimes", () => {
5858
expect(logLabeledWarning).to.have.been.calledWith(
5959
"functions",
6060
"Runtime Node.js 20 will be deprecated on 2026-04-30 and will be " +
61-
"decommissioned on 2026-10-31, after which you will not be able to " +
61+
"decommissioned on 2026-10-30, after which you will not be able to " +
6262
"deploy without upgrading. Consider upgrading now to avoid disruption. See " +
6363
"https://cloud.google.com/functions/docs/runtime-support for full " +
6464
"details on the lifecycle policy",

src/deploy/functions/runtimes/supported/types.ts

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,63 +49,69 @@ export const RUNTIMES = runtimes({
4949
},
5050
nodejs10: {
5151
friendly: "Node.js 10",
52-
status: "GA",
52+
status: "decommissioned",
5353
deprecationDate: "2024-01-30",
5454
decommissionDate: "2025-01-30",
5555
},
5656
nodejs12: {
5757
friendly: "Node.js 12",
58-
status: "GA",
58+
status: "decommissioned",
5959
deprecationDate: "2024-01-30",
6060
decommissionDate: "2025-01-30",
6161
},
6262
nodejs14: {
6363
friendly: "Node.js 14",
64-
status: "GA",
64+
status: "decommissioned",
6565
deprecationDate: "2024-01-30",
6666
decommissionDate: "2025-01-30",
6767
},
6868
nodejs16: {
6969
friendly: "Node.js 16",
70-
status: "GA",
70+
status: "decommissioned",
7171
deprecationDate: "2024-01-30",
7272
decommissionDate: "2025-01-30",
7373
},
7474
nodejs18: {
7575
friendly: "Node.js 18",
76-
status: "GA",
76+
status: "decommissioned",
7777
deprecationDate: "2025-04-30",
78-
decommissionDate: "2025-10-31",
78+
decommissionDate: "2025-10-30",
7979
},
8080
nodejs20: {
8181
friendly: "Node.js 20",
8282
status: "GA",
8383
deprecationDate: "2026-04-30",
84-
decommissionDate: "2026-10-31",
84+
decommissionDate: "2026-10-30",
8585
},
8686
nodejs22: {
8787
friendly: "Node.js 22",
8888
status: "GA",
8989
deprecationDate: "2027-04-30",
90-
decommissionDate: "2027-10-31",
90+
decommissionDate: "2028-10-31",
9191
},
9292
python310: {
9393
friendly: "Python 3.10",
9494
status: "GA",
9595
deprecationDate: "2026-10-04",
96-
decommissionDate: "2027-04-30",
96+
decommissionDate: "2027-04-04",
9797
},
9898
python311: {
9999
friendly: "Python 3.11",
100100
status: "GA",
101101
deprecationDate: "2027-10-24",
102-
decommissionDate: "2028-04-30",
102+
decommissionDate: "2028-04-24",
103103
},
104104
python312: {
105105
friendly: "Python 3.12",
106106
status: "GA",
107107
deprecationDate: "2028-10-02",
108-
decommissionDate: "2029-04-30",
108+
decommissionDate: "2029-04-02",
109+
},
110+
python313: {
111+
friendly: "Python 3.13",
112+
status: "GA",
113+
deprecationDate: "2029-10-10",
114+
decommissionDate: "2030-04-10",
109115
},
110116
});
111117

src/functions/projectConfig.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe("projectConfig", () => {
2929
});
3030

3131
it("fails validation given config w/o source", () => {
32-
expect(() => projectConfig.validate([{ runtime: "nodejs10" }])).to.throw(
32+
expect(() => projectConfig.validate([{ runtime: "nodejs22" }])).to.throw(
3333
FirebaseError,
3434
/codebase source must be specified/,
3535
);
@@ -84,7 +84,7 @@ describe("projectConfig", () => {
8484
});
8585

8686
it("fails validation given singleton config w/o source", () => {
87-
expect(() => projectConfig.normalizeAndValidate({ runtime: "nodejs10" })).to.throw(
87+
expect(() => projectConfig.normalizeAndValidate({ runtime: "nodejs22" })).to.throw(
8888
FirebaseError,
8989
/codebase source must be specified/,
9090
);
@@ -98,7 +98,7 @@ describe("projectConfig", () => {
9898
});
9999

100100
it("fails validation given multi-resource config w/o source", () => {
101-
expect(() => projectConfig.normalizeAndValidate([{ runtime: "nodejs10" }])).to.throw(
101+
expect(() => projectConfig.normalizeAndValidate([{ runtime: "nodejs22" }])).to.throw(
102102
FirebaseError,
103103
/codebase source must be specified/,
104104
);

0 commit comments

Comments
 (0)