UnlyEd / github-action-await-vercel

GitHub Action - Awaits a Vercel deployment to be ready
https://github.com/marketplace/actions/await-for-vercel-deployment
MIT License
30 stars 9 forks source link

Vercel timeout #95

Closed cipriancaba closed 1 year ago

cipriancaba commented 1 year ago

Describe the bug We have some longer deploy times and use this to correctly enforce the result status of the vercel deployment, but after enabling debug mode, we noticed that after a while, the vercel request will timeout

FetchError: request to https://api.vercel.com/v11/now/deployments/get?url=********.vercel.app failed, reason: connect ETIMEDOUT 76.76.21.112:443

I think this is a ddos protection on vercel's side

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior It would be really helpful if we could configure the retry step (eg: as opposed to checking status every 5 seconds, we can do it every 30 seconds)

Much appreciated

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Vadorequest commented 1 year ago

Are you sure this issue is related to the number of retries?

How long does your Vercel deployment take?

cipriancaba commented 1 year ago

It takes about 20minutes, we're statically building a ton of pages.

Just checked the code and it seems like everything happens in a while loop https://github.com/UnlyEd/github-action-await-vercel/blob/b3516eac88ef939ccc2c6b25987ba153d2c7ef48/src/awaitVercelDeployment.ts#L18

Is there any chance we can add a timeout between requests? Seems like this is just hammering vercel api without any delay. I think 5secs would be nice, ideally configurable

Vadorequest commented 1 year ago

@cipriancaba I believe https://github.com/UnlyEd/github-action-await-vercel/pull/97 might solve your issue. (PR from first time contributor)

Vadorequest commented 1 year ago

Merged through #98

Could you let me know if this change improves your issues?

Vadorequest commented 1 year ago

This other PR should help as well. https://github.com/UnlyEd/github-action-await-vercel/pull/100

I'm closing this, let me know if anything doesn't work as expected.

cipriancaba commented 1 year ago

Works great, much appreciated @Vadorequest

Vadorequest commented 1 year ago

I haven't done much!

@namoscato @dlively1 are to thank for those :)