Skip to content
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

Typescriptifying gcp.cloudfunctions #3060

Merged
merged 1 commit into from
Jan 20, 2021

Conversation

joehan
Copy link
Contributor

@joehan joehan commented Jan 20, 2021

Description

Refactoring gcp.cloudfunctions to use Typescript.

This is part of a large refactor of the Cloud Functions deploy codepath. This PR should not have any functional changes - in order to keep things understandable, I'm doing a series of js to ts refactors on this flow before I start sending out PRs for functional changes.

Scenarios Tested

Ran a series of function deploys to test the following situations:

  • Create 1 function
  • Create multiple function
  • Update function
  • Delete, create, update functions all in one deploy
  • Create, update functions, N to prompt when asked to delete functions
  • Create scheduled function
  • Update scheduler function to different schedule
  • Delete scheduled function

@google-cla google-cla bot added the cla: yes Manual indication that this has passed CLA. label Jan 20, 2021
@joehan joehan changed the base branch from master to jh-functions-refactor January 20, 2021 00:41
@joehan joehan merged commit ec7d079 into jh-functions-refactor Jan 20, 2021
@joehan
Copy link
Contributor Author

joehan commented Jan 20, 2021

Merging these in after 1 review to keep things a little simpler on my end, but I'll keep an eye on these for any comments and incorporate them into later PRs.

joehan added a commit that referenced this pull request Feb 16, 2021
* Adding onPoll option to operation-poller (#3046)

* Adds onPoll option

* format and remove only

* improved unit test

* Typescriptify functionsDeployHelper (#3059)

* Typescriptifying and adding CloudFunctionTrigger type

* Using funcName instead of func

* formats

* Typescriptifying gcp.cloudfunctions (#3060)

* Typescriptifying functionsConfig (#3063)

* Typescriptifying deploymentTool (#3061)

* Typescriptifying deploymentTool

* Update src/deploymentTool.ts

Co-authored-by: Michael Bleigh <[email protected]>

Co-authored-by: Michael Bleigh <[email protected]>

* Refactoring prepare stage of functions deploy (#3067)

* refactoring prepare setp of functions deploy to use typescript, check for failure policies, and parse function triggers

* refactoring prepare setp of functions deploy to use typescript, check for failure policies, and parse function triggers

* commenting out functionNamesAreValid

* formats

* refactoring release step of functions deploy to use typescript

* Adding logic to build regional deployments

* Implementing createDeploymentPlan

* First round of PR feedback, removing most usages of lodash

* moving function prompts into their own file

* seperating out a bunch of code from functionsDeployHelper

* Resolves merge conflicts

* refactoring release step of functions deploy to use typescript (#3071)

* Implements core logic of running function deploys

* Typescriptifying prepareFunctionsUpload (#3064)

* Typescriptifying prepareFunctionsUpload, and updating filesize package to get types

* fixing merge conflict

* Implementing createDeploymentPlan (#3081)

* refactoring release step of functions deploy to use typescript

* Adding logic to build regional deployments

* Implementing createDeploymentPlan

* First round of PR feedback, removing most usages of lodash

* moving function prompts into their own file

* seperating out a bunch of code from functionsDeployHelper

* round of pr fixes

* adresses more pr comments, and adds some todos

* cleaning up unused code

* Fixing some things that were broken while merging

* Fixing up the order of wait and close to ensure that queue promsies actually resolve

* Format and clean up typos

* refactoring error handling to be cleaner

* cleaning up extera newlines

* first round of pr fixes

* Readding some changes that I accidenttally wiped out during a merge

* Switching name to id where appropriate

* fixing another bug caused by functionName vs Id

* Refactor functions-delete  (#3110)

* Refactoring functions delete to use tasks, and cleaning up old polling code

* Refactoring functions delete to use tasks, and cleaning up old polling code

* refactoring to use new error handling

* cleanup unused imports

* small style fixes

* Cleaning up error reporting

* Implement validation for changing trigger types, and fixes from bug bash (#3131)

* Implement validation for changing trigger types, and fixes from bug bash

* more specifc error messages for different permutations of trigger types

* fixes package.json

Co-authored-by: Michael Bleigh <[email protected]>
@bkendall bkendall deleted the jh-ts-cloudfunctions branch August 4, 2021 19:27
devpeerapong pushed a commit to devpeerapong/firebase-tools that referenced this pull request Dec 14, 2021
* Adding onPoll option to operation-poller (firebase#3046)

* Adds onPoll option

* format and remove only

* improved unit test

* Typescriptify functionsDeployHelper (firebase#3059)

* Typescriptifying and adding CloudFunctionTrigger type

* Using funcName instead of func

* formats

* Typescriptifying gcp.cloudfunctions (firebase#3060)

* Typescriptifying functionsConfig (firebase#3063)

* Typescriptifying deploymentTool (firebase#3061)

* Typescriptifying deploymentTool

* Update src/deploymentTool.ts

Co-authored-by: Michael Bleigh <[email protected]>

Co-authored-by: Michael Bleigh <[email protected]>

* Refactoring prepare stage of functions deploy (firebase#3067)

* refactoring prepare setp of functions deploy to use typescript, check for failure policies, and parse function triggers

* refactoring prepare setp of functions deploy to use typescript, check for failure policies, and parse function triggers

* commenting out functionNamesAreValid

* formats

* refactoring release step of functions deploy to use typescript

* Adding logic to build regional deployments

* Implementing createDeploymentPlan

* First round of PR feedback, removing most usages of lodash

* moving function prompts into their own file

* seperating out a bunch of code from functionsDeployHelper

* Resolves merge conflicts

* refactoring release step of functions deploy to use typescript (firebase#3071)

* Implements core logic of running function deploys

* Typescriptifying prepareFunctionsUpload (firebase#3064)

* Typescriptifying prepareFunctionsUpload, and updating filesize package to get types

* fixing merge conflict

* Implementing createDeploymentPlan (firebase#3081)

* refactoring release step of functions deploy to use typescript

* Adding logic to build regional deployments

* Implementing createDeploymentPlan

* First round of PR feedback, removing most usages of lodash

* moving function prompts into their own file

* seperating out a bunch of code from functionsDeployHelper

* round of pr fixes

* adresses more pr comments, and adds some todos

* cleaning up unused code

* Fixing some things that were broken while merging

* Fixing up the order of wait and close to ensure that queue promsies actually resolve

* Format and clean up typos

* refactoring error handling to be cleaner

* cleaning up extera newlines

* first round of pr fixes

* Readding some changes that I accidenttally wiped out during a merge

* Switching name to id where appropriate

* fixing another bug caused by functionName vs Id

* Refactor functions-delete  (firebase#3110)

* Refactoring functions delete to use tasks, and cleaning up old polling code

* Refactoring functions delete to use tasks, and cleaning up old polling code

* refactoring to use new error handling

* cleanup unused imports

* small style fixes

* Cleaning up error reporting

* Implement validation for changing trigger types, and fixes from bug bash (firebase#3131)

* Implement validation for changing trigger types, and fixes from bug bash

* more specifc error messages for different permutations of trigger types

* fixes package.json

Co-authored-by: Michael Bleigh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants