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

When a build is ignored, the action fails to retrieve the existing deployment #45

Open
erezrokah opened this issue Dec 21, 2022 · 5 comments

Comments

@erezrokah
Copy link

When one configures an ignore command on Vercel, and pushes a new commit, the action fails to retrieve any existing deployments (shown as outdated on GitHub) if the build is skipped:
image
image

I tried passing ref here

instead of sha (e.g. passing the branch name), but it doesn't seem to work (maybe because Vercel only sets the deployment on commits).

Another solution would be to retrieve previous commits and look for deployments from them, but there could be a race condition here where a new one hasn't appeared yet and we get the stale one.

Not sure what's the proper solution for it

kodiakhq bot pushed a commit to cloudquery/cloudquery that referenced this issue Dec 27, 2022

#### Summary

A workaround to patrickedqvist/wait-for-vercel-preview#45.
This should fix the broken links CI workflow when a build is ignored on Vercel.
I'm using negated logic `!= false` as we also run this check on a schedule and manually. Otherwise we need to set multiple outputs (`skip-for-pr`, `skip-for-schedule`)

<!--
@oxfist
Copy link
Contributor

oxfist commented Jan 9, 2023

Hi @erezrokah! Did you try adding allow_inactive: true in the action parameters? From what you're describing it seems that should work if there already was a preview in the PR and this setting defaults to false https://github.com/patrickedqvist/wait-for-vercel-preview#allow_inactive

@erezrokah
Copy link
Author

Hi @oxfist thanks for the reply! We are using allow_inactive: true, however I think the cause is that the action retrieves deployments for a specific sha so if you push a new commit that is ignored on Vercel that commit sha won't have any deployments retrieved by the action (hence my attempt to use ref)

@erezrokah
Copy link
Author

Our current workaround is to re-implement the Vercel ignore logic in our GitHub action workflow and only use wait-for-vercel if we expect a build to be triggered

@MTG2000
Copy link

MTG2000 commented Jul 26, 2024

Hey @erezrokah
I'm currently facing the same issue.

Could you share in more details how you solved it?

If it's possible to share a code snippet, that would be great.

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