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

Using concurrency to cancel any in-progress job or run #3097

Merged
merged 2 commits into from
Feb 12, 2022

Conversation

blink1073
Copy link
Contributor

Summary of changes

Uses concurrency to cancel any in-progress job or run to help address #3093

Closes

Pull Request Checklist

.github/workflows/main.yml Outdated Show resolved Hide resolved
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
@abravalheri
Copy link
Contributor

abravalheri commented Feb 15, 2022

I don't know exactly but I have the impression that this change accidentally is preventing the release job to run on tags...

For example if we look at the workflow for the tag v60.9.1 (Fig. 1), the message seems to indicate that it got cancelled by GitHub because jobs for the commit being pushed to the main branch got enqueued just after the ones for the tag (Fig. 2):

image
Fig 1: Workflow for tag is getting cancelled because of a higher priority request

image
Fig 2: The higher priority request seems to be the normal push to main of the same commit

This might be related to the lack of determinism in the order workflows are triggered...

I don't know exactly how to solve this, but maybe it is a good idea to add the name of the event triggering the workflow to the group string? (if that is even possible)

@blink1073, @di what do you think?

@di
Copy link
Sponsor Member

di commented Feb 15, 2022

I think you're right. The 'release' job probably needs to become its own workflow with on: push: tags:

release:
needs: [test, test_cygwin, integration-test]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install tox
run: |
python -m pip install tox
- name: Release
run: tox -e release
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

4 participants