serverless / components

The Serverless Framework's new infrastructure provisioning technology — Build, compose, & deploy serverless apps in seconds...
https://www.serverless.com
Apache License 2.0
2.31k stars 182 forks source link

Add timeout option from serverless command config #1022

Closed JoaquinFernandez closed 2 years ago

JoaquinFernandez commented 3 years ago

What has been implemented?

In some complex workflows, like for example, using the website component to automatically deploy a website on PR opening, we want to be able to cleanup completely on PR close and clean all resources. To do this, the cloudfront distributions need to be disabled and then deleted. It takes a variable amount of time from 2-15 minutes. But since component's CLI is not passing through the upstream option timeout there is no way to configure it and it defaults to 60000 ms.

In order to overcome that I've added to the runner the option to read the command option timeout and pass it through.

I could help with the documentation, but I think it is pretty outdated in the src/cli/commands/help.js

Closes #959

Steps to verify

serverless remove --stage ISSUE-959 --timeout 900000

Todos:

Gabiras12 commented 3 years ago

My use case is similar. I need to wait for AWS to finish some async tasks like Cloudfront Distribution Update, ACM updates.. the 60s limit doesn't help much. Having this option would help components that can take more than 60s to run.

Gabiras12 commented 3 years ago

@timqian and @zongUMR can we close this one?

zongUMR commented 3 years ago

@medikoo @eahefnawy Looks like this PR will affect the commands code, maybe you can review it.

JoaquinFernandez commented 3 years ago

Happy to help unblock this if there is anything missing.

JoaquinFernandez commented 2 years ago

No updates?

@eahefnawy

JoaquinFernandez commented 2 years ago

I would gladly help unblock this if anything else is needed, it would make building removing operations way easier for us

JoaquinFernandez commented 2 years ago

So.... not happening

JoaquinFernandez commented 2 years ago

Up!

JoaquinFernandez commented 2 years ago

Again

JoaquinFernandez commented 2 years ago

Hi

JoaquinFernandez commented 2 years ago

Forever alone

JoaquinFernandez commented 2 years ago

Maybe for christmas?

Merry christmas

JoaquinFernandez commented 2 years ago

@medikoo clearly @eahefnawy is not the best person for this, is there anyone else we can involve?