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

Control concurrency of PR deployment jobs #265

Merged
merged 1 commit into from
Feb 7, 2025
Merged

Conversation

karl-johan-grahn
Copy link
Contributor

Currently, multiple PR jobs triggered at the same time can cause this error in the "Deploy PR docs" step:

error: failed to push branch pull-request-deployments to origin:
  To https://github.com/stakater/mto-docs
   ! [rejected]          pull-request-deployments -> pull-request-deployments (fetch first)
  error: failed to push some refs to 'https://github.com/stakater/mto-docs'
  hint: Updates were rejected because the remote contains work that you do not
  hint: have locally. This is usually caused by another repository pushing to
  hint: the same ref. If you want to integrate the remote changes, use
  hint: 'git pull' before pushing again.
  hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Error: Process completed with exit code 1.

This often happens when Renovate opens dependency updates for multiple doc branches at the same time. This is mainly a problem for versioned docs, since it contains multiple branches with similar dependencies.

What this change should do is group all deployment jobs into a group called pull_request_versioned_doc and only execute jobs in that group sequentially. Any jobs in progress will not be canceled. Read more about concurrency here.

@karl-johan-grahn karl-johan-grahn requested a review from a team as a code owner February 7, 2025 16:11
Copy link

github-actions bot commented Feb 7, 2025

@stakater-user Image is available for testing. docker pull ghcr.io/stakater/mto-docs:v0.0.207

Copy link

github-actions bot commented Feb 7, 2025

@karl-johan-grahn Image is available for testing. docker pull ghcr.io/stakater/mto-docs:SNAPSHOT-PR-265-04337dd0

@karl-johan-grahn karl-johan-grahn merged commit 3028e8c into main Feb 7, 2025
9 checks passed
@karl-johan-grahn karl-johan-grahn deleted the concurrency branch February 7, 2025 19:29
Copy link

github-actions bot commented Feb 7, 2025

@karl-johan-grahn PR doc deploy was successfully deleted from branch pull-request-deployments

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

Successfully merging this pull request may close these issues.

2 participants