-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Deploy based on new definitions #3474
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Unbreak build * linter changed its mind
#3457) The firestore:delete command should notify the user of the current project. This should help users minimize chances of accidental deletions when switching between projects.
When the optional feature parameter is provided in a `firebase init [feature]` command, this checks that its value is a valid choice before attempting any other initialization.
22e4187 to
d2994c3
Compare
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/sindresorhus/trim-newlines/releases) - [Commits](https://github.com/sindresorhus/trim-newlines/commits) --- updated-dependencies: - dependency-name: trim-newlines dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1. - [Release notes](https://github.com/sindresorhus/normalize-url/releases) - [Commits](https://github.com/sindresorhus/normalize-url/commits) --- updated-dependencies: - dependency-name: normalize-url dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… published extension (#3499)
added note to run `npm install` before `npm link` the first time
Basic create support This change adds support for `firebase --open-sesame golang`. After running this command, `firebase init` will support Go 1.13 as a langauge for Cloud Functions. Limitations: 1. Customers cannot mix Node and Go code (WAI) 2. There is little validation being done of customer code 3. The actual deployed function params are hard coded; SDK incoming
\To import modules packaged as ES module, we have to use import instead of require. Both the emulator and function deploy code hardcodes require to load user's function code and ends up throwing ERR_REQUIRE_ESM when given ES modules. We will now try using import when require fails with an ERR_REQUIRE_ESM error. This is a bit lazy - we could've detected whether given module is ES module vs CommonJS and dispatch require vs import appropriately - but I think it simplifies the script while still being correct.
Co-authored-by: Yuchen Shi <[email protected]>
a513a2e to
feda382
Compare
The primary purpose of this change is to introduce the "discovery"
subpackage of "runtimes". This package is a common utility that all
runtimes will use to discover their backend spec based on the "container
contract" being finalized currently.
The container contract says that we must interact with customer code
using tools we'd have in a docker container: a fully-contained directory
of code, a "run" command, and environment variables. Backend specs can
be discovered as:
1. The file /backend.yaml at the root of the container
2. The response to http://localhost:${ADMIN_PORT}/backend.yaml when
running the container's RUN command with ADMIN_PORT set to a free
port.
The golang runtime fulfills #2 through two steps:
1. The Functions SDK includes the "codegen" package that reads the
customer code and creates an "autogen" main package that runs
the customer code as the Firebase runtime (skeleton implementation
currently).
2. We then start up the Firebase runtime with ADMIN_PORT set and
fetch /backend.yaml
After this + a minor fix to the template code, we have working Go
deploys!
I also moved gomod parsing into its own file to keep index.ts to a
minimal set of things that aren't easily unit tested. Unfortunately
the diff is largr than it needs to be now.
feda382 to
7a1c5bc
Compare
Emulator does not log about the default being used for any other option. Why log about default used for `sourceDirectory`? Seems unnecessary.
… extension configurations (#3529) * fixes a number of issues where ext:dev:emulator:* did not allow valid extension configurations * Adding tests for cases fixed * add changelog * format * pr fixes * correct a comment
Today, function logs with structured data (e.g. those generated using firebase-functions SDK's logger api) do not show up in `firebase functions:log` command:
```js
// index.js
exports.hello = functions.https.onRequest((request, response) => {
info("Hello logs!", {structuredData: true});
info("hello world!");
response.send("Hello from Firebase!");
});
```
```bash
$ firebase functions:log
2021-06-30T12:47:42.955491814Z D hello: Function execution started
2021-06-30T12:47:43.050Z I hello: # LOOK HERE: where's the message?
2021-06-30T12:47:43.050Z I hello: hello world!
2021-06-30T12:47:43.061418239Z D hello: Function execution took 107 ms, finished with status code: 200
```
This happens because structured log entries are stored in [`jsonPayload` field](https://cloud.google.com/logging/docs/structured-logging), not `textPayload` field.
In addition to correctly parsing `jsonPayload` field, we will also correctly parse log entries with `protoPayload` fields (in most cases, these log entries come from audit logs).
*After*
```bash
2021-06-30T12:47:42.955491814Z D hello: Function execution started
2021-06-30T12:47:43.050Z I hello: {"message":"Hello logs!","structuredData":true}
2021-06-30T12:47:43.050Z I hello: hello world!
2021-06-30T12:47:43.061418239Z D hello: Function execution took 107 ms, finished with status code: 200
```
Co-authored-by: rachelsaunders <[email protected]>
* Release Firestore Emulator v1.6.0. * Fix checksums. * CHANGLOG.
…ebase-tools into inlined.detect-backend-yaml
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR builds upon #3464 (subset of this diff) to add the first steps of discovery documents.
We can successfully read
functions/backend.yamlto decide what to deploy as well as launching a service and reading from/__/backend.yaml. Currently the response from/__/backend.yamlis hard coded.