-
Notifications
You must be signed in to change notification settings - Fork 929
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
Refactor Functions deploy code to use types that aren't literal API structs #3361
Merged
Conversation
This file contains 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
Add backend namespace before rebasing codebase onto it. The Backend namespace defines types that are neither the __trigger annotations nor the GCP API types. This follows Google best practices for implementing services because it buffers the system from changes in storage or API layers. In this codebase, it will allow us to support new trigger discovery techniques (e.g. a container contract HTTP API) and new versions of APIs if they should ever be needed. In this change I try out a new method for using args.Context; it's based on the Go style of Context where a namespace can provide a value using Context as a private implementation detail. I'm personally a fan. WDYT?
Wire up new flag to the backend refactor
Function create and update should add deployment tool labels
Add CLI prompts for the new runWith options Also accidentally merged: Fix issues from bug bash 1. Remove the "No HTTPS functions" log line is no longer printed 2. The list of function URLs that are printed is now restricted to this deploy.
Note: This is a "launch" branch of previously reviewed commits. |
joehan
approved these changes
May 13, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all the previous PRs that went into this launch branch, and took a quick pass over this. LGTM!
devpeerapong
pushed a commit
to devpeerapong/firebase-tools
that referenced
this pull request
Dec 14, 2021
…tructs (firebase#3361) * Functions deploy uses new "backend" types (firebase#3303) Add backend namespace before rebasing codebase onto it. The Backend namespace defines types that are neither the __trigger annotations nor the GCP API types. This follows Google best practices for implementing services because it buffers the system from changes in storage or API layers. In this codebase, it will allow us to support new trigger discovery techniques (e.g. a container contract HTTP API) and new versions of APIs if they should ever be needed. In this change I try out a new method for using args.Context; it's based on the Go style of Context where a namespace can provide a value using Context as a private implementation detail. I'm personally a fan. WDYT? * Add format converters for the new backend flags (firebase#3333) * Wire the new flags into the backend refactor (firebase#3334) Wire up new flag to the backend refactor * Create and Update Function should add deploymentTool labels (firebase#3356) Function create and update should add deployment tool labels * Add prompts for new runWith options (firebase#3352) Add CLI prompts for the new runWith options Also accidentally merged: Fix issues from bug bash 1. Remove the "No HTTPS functions" log line is no longer printed 2. The list of function URLs that are printed is now restricted to this deploy.
devpeerapong
pushed a commit
to devpeerapong/firebase-tools
that referenced
this pull request
Dec 14, 2021
…al API structs (firebase#3361)" (firebase#3379) This reverts commit 16b2e96.
devpeerapong
pushed a commit
to devpeerapong/firebase-tools
that referenced
this pull request
Dec 14, 2021
* Revert "Revert "Refactor Functions deploy code to use types that aren't literal API structs (firebase#3361)" (firebase#3379)" This reverts commit e438b26. * Format fixes * Fix bug with promptOnce in open command Co-authored-by: Thomas Bouldin <inlined@google.com>
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.
Previous versions of the Functions deploy code used a mangled type that wasn't a pure API CloudFunction and wasn't purely the type that we get from the SDK. This introduces a third "conceptual" type for FunctionSpec that we translate to and from so we can be much more rigorous about which format we're using at a given time. While we're at it, I: