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

Added concurrency section to Publish Website workflow (Issue 575) #583

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

marshmallowrobot
Copy link
Collaborator

When builds are triggered within about 4 min of each other, the parallel calls to GitHub's GraphQL API clobber one another. Even with a throttling helper, the clobbering results in a too-many-requests API error, and the build fails.

This small change should hopefully prevent this error in the future. It will check if the build/workflow is already running, and if so, cancels it. If there are multiple builds in quick succession, only the latest one will publish.

@marshmallowrobot marshmallowrobot requested a review from a team as a code owner August 15, 2023 14:01
@marshmallowrobot marshmallowrobot changed the title Added concurrency section to Publish Website workflow Added concurrency section to Publish Website workflow (Issue 575) Aug 15, 2023
@marshmallowrobot marshmallowrobot added this to In Review in Learning Path Segments via automation Aug 15, 2023
@marshmallowrobot marshmallowrobot linked an issue Aug 15, 2023 that may be closed by this pull request
Copy link
Collaborator

@tsadler1988 tsadler1988 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@tsadler1988
Copy link
Collaborator

Docs for reference: https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow

@marshmallowrobot marshmallowrobot merged commit 2d6d8bc into main Aug 15, 2023
2 checks passed
Learning Path Segments automation moved this from In Review to Done Aug 15, 2023
@marshmallowrobot marshmallowrobot deleted the 575-concurrent-builds branch August 15, 2023 14:52
@rrrutledge
Copy link
Contributor

Great work!

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

Successfully merging this pull request may close these issues.

Website build is failing
3 participants