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

improve: add component concurrency controls #2915

Merged
merged 1 commit into from
Aug 12, 2022

Conversation

mxyng
Copy link
Collaborator

@mxyng mxyng commented Aug 11, 2022

Summary

Minor change to the deploy workflow to add concurrency controls for individual components. A deploy for core should not override/block deploys for ui

@mxyng mxyng force-pushed the mxyng/component-concurrency-control branch from f8eb43c to f2e362d Compare August 11, 2022 21:07
@@ -25,7 +42,8 @@ jobs:
- name: Production
environment: ${{ matrix.environment.name }}
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ matrix.environment.name }}
group: ${{ github.workflow }}-synchronize-${{ matrix.environment.name }}-${{ needs.prepare.outputs.component-name }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

github.job is only available in context of steps so hard code it here to synchronize

@@ -25,7 +42,8 @@ jobs:
- name: Production
environment: ${{ matrix.environment.name }}
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ matrix.environment.name }}
group: ${{ github.workflow }}-synchronize-${{ matrix.environment.name }}-${{ needs.prepare.outputs.component-name }}
cancel-in-progress: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Workflow status is waiting when waiting for approvals and (presumably) during the wait timer so this is necessary. Otherwise new jobs will be pending until previous workflows have completed or expired.

This may be a problem if multiple workflows are created in quick succession and cancel each other while actually running but we'll figure it out when it gets to that point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this seem like it will fix the "stuck waiting for workflows" problem I saw in #2841?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure why #2841 had waiting workflows. It's possible it erroneously created the deploy workflow so I've add a branch filter but there's no strong evidence of that from the actions history

@mxyng mxyng force-pushed the mxyng/component-concurrency-control branch from f2e362d to 2473489 Compare August 12, 2022 15:56
@mxyng mxyng merged commit 544e0f7 into main Aug 12, 2022
@mxyng mxyng deleted the mxyng/component-concurrency-control branch August 12, 2022 17:23
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.

None yet

2 participants