Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5f7921c
feat: generate python functions template
Salakar Mar 9, 2022
22b85d6
-
Salakar Mar 14, 2022
f703430
Merge branch 'master' of https://github.com/firebase/firebase-tools i…
Salakar Mar 23, 2022
167fba2
-
Salakar Mar 23, 2022
0d0ae06
-
Salakar Mar 23, 2022
df83e08
feat: python venv support
Salakar Apr 6, 2022
8f5a89d
Merge branch 'master' of https://github.com/invertase/firebase-tools …
Salakar Jun 1, 2022
3a29f57
Merge branch 'master' of https://github.com/firebase/firebase-tools i…
Salakar Jun 15, 2022
79136fd
-
Salakar Jun 15, 2022
85ad23a
Merge pull request #1 from invertase/cf3-dev-py
Salakar Jun 15, 2022
2a6f0d5
-
Salakar Jun 15, 2022
50eb9b6
Merge branch 'master' of https://github.com/firebase/firebase-tools i…
Salakar Jun 24, 2022
6e85040
fix: sync to latest runtime delegate changes
Salakar Jun 24, 2022
5f44712
fix: git url for firebase-functions-python
Salakar Jun 28, 2022
aebfbd3
chore: update python template
Salakar Jun 28, 2022
710400d
refactor: remove cloud runtime config
Salakar Jun 28, 2022
4315773
chore: add autogenerated.py to gitignore
Salakar Jun 28, 2022
2f303ec
chore: update python main.py template
Salakar Jul 13, 2022
e36267c
chore: don't prompt for python version ust yet
Salakar Jul 13, 2022
c9aa3c2
chore: use 3.9 for now
Salakar Jul 13, 2022
35caa48
chore: upgrade pip on functions init
Salakar Jul 13, 2022
abd94f2
chore: add python specific ignores for functions deployment
Salakar Jul 13, 2022
5c57e63
feat: hide python generated files inside venv
pr-Mais Jul 13, 2022
147de95
Merge branch 'master' into functions-python
Salakar Jul 15, 2022
cac1f3b
chore: cleanup older runtimes for python
Salakar Jul 28, 2022
08f6e84
Merge branch 'master' of https://github.com/firebase/firebase-tools i…
Salakar Jul 28, 2022
32b1d03
chore: explicitly use `python3.9` binary
Salakar Jul 28, 2022
4da5f56
chore: add code comments
Salakar Jul 28, 2022
91d2cca
refactor: remove codegen
Salakar Aug 4, 2022
0fce44d
upgrade runtime to python 3.10
pr-Mais Sep 12, 2022
81e2dcd
upgrade runtime to python 3.10 (#2)
pr-Mais Oct 8, 2022
a9cbf91
Merge branch 'functions-python' of https://github.com/invertase/fireb…
Salakar Oct 8, 2022
7f6780b
Merge branch 'master' of https://github.com/firebase/firebase-tools i…
Salakar Oct 8, 2022
62e03d3
chore: update repo
Salakar Oct 8, 2022
6dcd35e
remove 3.9
Salakar Oct 8, 2022
d690d43
typo
Salakar Oct 8, 2022
f789156
update path to serving (in private submodule now
Salakar Oct 8, 2022
d14e600
linting issue fix
Salakar Oct 8, 2022
5091448
Merge branch 'master' into functions-python
Salakar Oct 11, 2022
425d344
chore: update main.py example
Salakar Oct 11, 2022
14cc71e
Merge branch 'functions-python' of https://github.com/invertase/fireb…
Salakar Oct 11, 2022
9be77ff
Remove go discovery module.
taeold Jan 11, 2023
c528e08
Refactor how node binary is retrieved for functions/extensions.
taeold Jan 12, 2023
1a56798
Refactor logic for invoking node functions in the emulator.
taeold Jan 12, 2023
d268610
Fix bug with overriding socketpath.
taeold Jan 13, 2023
7331550
Revert misc. changes in formatting.
taeold Jan 13, 2023
e779577
Remove unnecessary import stmt.
taeold Jan 13, 2023
9a9c5e7
Misc nits.
taeold Jan 13, 2023
1614271
Fix bug w/ extensions emulator.
taeold Jan 13, 2023
e7d25e2
Fix broken test case.
taeold Jan 14, 2023
032dbc4
Add python support for CF3.
taeold Jan 13, 2023
1d562e5
Get python emulator going.
taeold Jan 13, 2023
7174936
Wrap up python emulator support.
taeold Jan 13, 2023
a8d0840
Style nits.
taeold Jan 14, 2023
a79cbc7
Improve Windows support.
taeold Jan 14, 2023
540e9b3
Misc. nits.
taeold Jan 14, 2023
fba411d
Fix broken test
taeold Jan 14, 2023
a17d9dd
Use functions-framework instead of custom harness for executing pytho…
taeold Jan 17, 2023
4fdf5e1
Remove accidentally checked-in file.
taeold Jan 18, 2023
2b820ce
Merge branch 'master' of https://github.com/firebase/firebase-tools i…
pr-Mais Jan 18, 2023
9266f5f
Merge branch 'cf3_python' of https://github.com/firebase/firebase-too…
pr-Mais Jan 18, 2023
3cf0c20
fix expoort issues
pr-Mais Jan 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/deploy/functions/runtimes/discovery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function detectFromPort(

while (true) {
try {
res = await Promise.race([fetch(`http://localhost:${port}/__/functions.yaml`), timedOut]);
res = await Promise.race([fetch(`http://127.0.0.1:${port}/__/functions.yaml`), timedOut]);
break;
} catch (err: any) {
// Allow us to wait until the server is listening.
Expand Down
87 changes: 0 additions & 87 deletions src/deploy/functions/runtimes/golang/gomod.ts

This file was deleted.

152 changes: 0 additions & 152 deletions src/deploy/functions/runtimes/golang/index.ts

This file was deleted.

15 changes: 10 additions & 5 deletions src/deploy/functions/runtimes/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as backend from "../backend";
import * as build from "../build";
import * as python from "./python";
import * as node from "./node";
import * as validate from "../validate";
import { FirebaseError } from "../../../error";
Expand All @@ -9,7 +10,7 @@ const RUNTIMES: string[] = ["nodejs10", "nodejs12", "nodejs14", "nodejs16", "nod
// Experimental runtimes are part of the Runtime type, but are in a
// different list to help guard against some day accidentally iterating over
// and printing a hidden runtime to the user.
const EXPERIMENTAL_RUNTIMES = ["go113"];
const EXPERIMENTAL_RUNTIMES: string[] = ["python310", "python311"];
export type Runtime = typeof RUNTIMES[number] | typeof EXPERIMENTAL_RUNTIMES[number];

/** Runtimes that can be found in existing backends but not used for new functions. */
Expand All @@ -34,7 +35,8 @@ const MESSAGE_FRIENDLY_RUNTIMES: Record<Runtime | DeprecatedRuntime, string> = {
nodejs14: "Node.js 14",
nodejs16: "Node.js 16",
nodejs18: "Node.js 18",
go113: "Go 1.13",
python310: "Python 3.10",
python311: "Python 3.11 (Preview)",
};

/**
Expand Down Expand Up @@ -63,6 +65,11 @@ export interface RuntimeDelegate {
*/
runtime: Runtime;

/**
* Path to the bin used to run the source code.
*/
bin: string;

/**
* Validate makes sure the customers' code is actually viable.
* This includes checks like making sure a package.json file is
Expand Down Expand Up @@ -109,9 +116,7 @@ export interface DelegateContext {
}

type Factory = (context: DelegateContext) => Promise<RuntimeDelegate | undefined>;
// Note: golang has been removed from delegates because it does not work and it
// is not worth having an experiment for yet.
const factories: Factory[] = [node.tryCreateDelegate];
const factories: Factory[] = [node.tryCreateDelegate, python.tryCreateDelegate];

/**
*
Expand Down
Loading