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

Retry failed function deployment on ETIMEDOUT #728

Closed
soumak77 opened this issue Apr 7, 2018 · 4 comments
Closed

Retry failed function deployment on ETIMEDOUT #728

soumak77 opened this issue Apr 7, 2018 · 4 comments

Comments

@soumak77
Copy link

soumak77 commented Apr 7, 2018

Every time I deploy functions, at least one function fails to deploy due to ETIMEDOUT. My project has around 50 functions and I'm deploying from a slow internet connection. I would like to request that the failed functions get redeployed when this error is encountered. I do see that some errors are retried, but I'm not sure whether this applies to ETIMEDOUT

var retryableCodes = [
1, // cancelled by client
4, // deadline exceeded
10, // aborted (typically due to concurrency issue)
14 // unavailable
];

Another possible way to fix this might be to provide an argument to allow deploying functions in batches and waiting for each batch to complete before deploying the next batch of functions. The reason I think this might work is because my functions always deploy successfully when I run a partial deployment of 5-10 functions.

@laurenzlong
Copy link
Contributor

We do offer the ability to group your functions and deploy individual functions or groups instead of the whole project: https://firebase.google.com/docs/cli/#partial_deploys. At this time we are not going to support batching your functions, since you have the ability to do that yourself.

I believe ETIMEDOUT would be error code 4, so that is retryed.

@soumak77
Copy link
Author

@laurenzlong is there a way to increase the amount of times the CLI tries to redeploy a function?

@laurenzlong
Copy link
Contributor

laurenzlong commented Apr 10, 2018

Technically it is possible, but it may not be a good idea since a lot of the deployment quotas are time range based (i.e. x number of deploys within x seconds). Retrying right away would actually make the problem worse. So we would not want to make that change in the CLI.

If you have a business case for deploying a lot of functions at at time, you can request for a quota increase on the Cloud Console, the quota you would want to increase is "Write requests per 100 seconds per user".

@rhodgkins
Copy link
Contributor

rhodgkins commented Mar 31, 2020

@laurenzlong we get this quite a lot when deploying (its quite annoying!) - I've looked at increasing the quota you've mentioned but its not editable, any other ideas / work arounds, thanks?

elvisun added a commit that referenced this issue Dec 9, 2021
* Handle all versions when parsing cloud monitoring response

* Add interactive option for ext:dev:usage command

* Update ext-dev-usage.ts
elvisun added a commit that referenced this issue Dec 23, 2021
* Bootstrap producer stats command and APIs (#724)

* MVP for reading from cloud monitoring

* Parse result into into meaningful buckets

* Format

* Reorganize to be more testable

* Add some tests

* format

* api test

* Add metricsUtil tests

* Cleanup console logs

* Refactor cloud monitoring to a general api under gcp/

* cleanup console logs

* Fetch project number from getPublisherProfile in ext:dev:usage (#725)

* Rename to metricsTypeDef

* Add help to get publisher profile

* Add tests

* Provide more info in error message

* format

* Render metrics output in table format

* Render output in a table

* align right

* adjust table output

* Format

* Add tests

* Handle all versions when parsing cloud monitoring response (#727)

* Add interactive option for ext:dev:usage command (#728)

* Handle all versions when parsing cloud monitoring response

* Add interactive option for ext:dev:usage command

* Update ext-dev-usage.ts

* Add a link to patheon at the end of ext:dev:usage command (#729)

* Add a link to pantheon in extension:dev:usage

* Update ext-dev-usage.ts

* Format

* Update helper text at end of ext:dev:usage command (#731)

* Update text at end of ext:dev:usage command

* format

* Add back log that's accidentally deleted

* format

* Update text copy

* Improve deep link by specifying more params

* Address bugbash UX feedback for provider metrics (#733)

* Address bugbash UX feedback

* Fix tests

* Fix typo

* Fix typo 2

* Address PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants