8000 ci: fix release on moved main by codejedi365 · Pull Request #1039 · python-semantic-release/python-semantic-release · GitHub
[go: up one dir, main page]

Skip to content

ci: fix release on moved main #1039

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

Conversation

codejedi365
Copy link
Contributor
@codejedi365 codejedi365 commented Sep 28, 2024

Purpose

  • Resolves release when workflows are backed up and might release on a new HEAD of main not tested
  • Updated the example docs to prevent others having this issue

Rationale

This happened for the release of v9.9.0. I merged 3 PRs within a short time and since the tests were still running I thought I prevented the actual release commit pipeline from running but then the previous pipeline released the new code anyway because it pulled from the branch when the branch had moved during the workflow execution.

How did you test?

Unfortunately I won't be able to test this until it happens again. This should fix any issues as it is what I would do manually.

…started on

This change comes because if we merge into main multiple times but the action
flow for the first merge was still running it will release on commits that were
not considered yet. This happened with `v9.9.0`. This change ensures that the
commit that triggered the workflow is the one that has the release decision
performed on. This change inline with the concurrency directive should prevent
out of order releases from occuring.
@codejedi365 codejedi365 self-assigned this Sep 28, 2024
@codejedi365 codejedi365 merged commit 14f04df into python-semantic-release:master Sep 28, 2024
5 checks passed
@codejedi365 codejedi365 deleted the ci/fix-release-on-moved-main branch September 28, 2024 17:25
@codejedi365
Copy link
Contributor Author

Validated on with 2 PR resolutions, this PR & PR #1040. As you can see in the run, the correct checkout was the head of the PR after rebased onto main 14f04dff however at the time origin/master was now at adb1f7c6. Therefore it properly evaluated and looked to release on the actual commit that triggered the workflow. This fixed the issue we had with v9.9.0 where the pipeline for #1033, with workflow sha of d46596a9 released v9.9.0 based on origin/master being at 6a5d35d0.

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.

1 participant
0