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

Race condition with build workflow #2

Closed
rossjrw opened this issue Mar 3, 2022 · 3 comments
Closed

Race condition with build workflow #2

rossjrw opened this issue Mar 3, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@rossjrw
Copy link
Owner

rossjrw commented Mar 3, 2022

Just encountered a situation where the build and preview workflow occurred at the same time (during the merge of a PR). They both attempted to write a commit on top of the current gh-pages commit. This resulted in the gh-pages branch moving to the commit that removed the preview for the PR, whereas the commit that deployed the build for the new commit made to the main branch was lost.

I will need to investigate running workflows synchronously.

@rossjrw rossjrw added the bug Something isn't working label Mar 3, 2022
@rossjrw
Copy link
Owner Author

rossjrw commented Mar 3, 2022

https://medium.com/geekculture/make-github-workflows-run-consecutively-4d98840ed600

use one of:

https://github.com/lewagon/wait-on-check-action
https://github.com/fountainhead/action-wait-for-check

make sure that the requested check is not required to have happened/be happening (not all buils will coincide with a preview and vice versa)

these plugins need a token - they recommend PAT, but standard can be used if it's within tolerance:

https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting

if advising end user to create a PAT, recommend adherence to security guidelines:

https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions


All of the above is rubbish. Actual solution: JamesIves/github-pages-deploy-action#1054

@rossjrw
Copy link
Owner Author

rossjrw commented Apr 8, 2022

Possibly fixed in 591779e - needs confirmation

@rossjrw
Copy link
Owner Author

rossjrw commented Apr 30, 2023

I haven't seen this crop up in ages, so calling it fixed.

@rossjrw rossjrw closed this as completed Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant