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

fix: use one note reference per tag to prevent conflicts #2085

Merged
merged 2 commits into from Jan 5, 2024

Conversation

KillianHmyd
Copy link
Contributor

@KillianHmyd KillianHmyd commented Aug 23, 2021

Current behavior

All notes are pushed under the reference semantic-release because of that, if from two different branches and channels a release is performed at the same time the release would fail on one of them with this error :

 ! [rejected]        refs/notes/semantic-release -> refs/notes/semantic-release (fetch first)

New behavior

Instead of using only one note reference we would use one per tag, this way we could not have any conflict between multiple channels.
This change should be retro-compatible and doesn't need a migration.

resolves #1613

@KillianHmyd KillianHmyd changed the title fix: use one note reference per tag to prevent conflicts [WIP] fix: use one note reference per tag to prevent conflicts Sep 13, 2021
@KillianHmyd

This comment was marked as resolved.

@KillianHmyd
Copy link
Contributor Author

Hello @gr2m, is it possible to have your input on this PR 🙏 ?

@gr2m
Copy link
Member

gr2m commented Oct 18, 2021

sorry for the lack of a response. We are currently focusing on migrating semantic-release to ESM. Once we are done with the transition we will get back to open PRs and issues, and will also onboard more maintainers

@KillianHmyd
Copy link
Contributor Author

Good to know @gr2m 👍 Thanks for you answer

@KillianHmyd

This comment was marked as off-topic.

@KillianHmyd

This comment was marked as off-topic.

@KillianHmyd KillianHmyd force-pushed the fix/notes-concurrency branch 2 times, most recently from 4300828 to efaf0f9 Compare May 12, 2022 12:46
@KillianHmyd KillianHmyd changed the title [WIP] fix: use one note reference per tag to prevent conflicts fix: use one note reference per tag to prevent conflicts Jan 10, 2023
@KillianHmyd KillianHmyd force-pushed the fix/notes-concurrency branch 7 times, most recently from 762f476 to 6e1b6c7 Compare January 10, 2023 20:14
@KillianHmyd

This comment was marked as off-topic.

@dgroh

This comment was marked as off-topic.

@KillianHmyd KillianHmyd force-pushed the fix/notes-concurrency branch 2 times, most recently from 7c7068d to a05273c Compare April 17, 2023 07:54
@KillianHmyd

This comment was marked as off-topic.

@tjg184

This comment was marked as off-topic.

@Renatopster

This comment was marked as off-topic.

@gr2m
Copy link
Member

gr2m commented May 29, 2023

We get to it. If you could please add a 👍🏼 emoji to the pull request instead of basically adding +1 comments, we'd appreciate it. It's only causing noise for us and everyone else watching the pull request.

We cannot give you an ETA but you can see more activity happening in @semantic-release again, so hopefully not to far out. We are close to wrapping up the transition to ES Modules which is our primary focus right now.

@nicolai-chisacov
Copy link

Hello! Are there any known workarounds, to make semantic-release plugin to not fail with mentioned above issue, on parallel release builds?

@mcmiddle592
Copy link

Hello, just wanted to mention that I pulled in @KillianHmyd branch into my release pipeline and it resolved my issues when releasing defect fixes to multiple Long Term Support (LTS) branches in a single repo at once. Without the changes I get the same error mentioned in the PR description whenever semantic-release runs on multiple branches in parallel on a single repo.

For those curious on how I did the test, I had to pull in the GitHub branch through npm like so:
npm i https://github.com/KillianHmyd/semantic-release.git#fix/notes-concurrency --save-dev --legacy-peer-deps

I had to add the following to my .npmrc file while testing the GitHub branch due to the branch not matching some of my peer dependency requirements mentioned in my package-lock.json: legacy-peer-deps=true. You can add this directly into your npm commands in your pipeline, but editing the .npmrc was the lowest impact change I could find.

Screenshot below is the error you get without this workaround:
image

@travi travi mentioned this pull request Dec 15, 2023
3 tasks
@travi travi changed the base branch from master to beta January 5, 2024 20:43
Copy link
Member

@travi travi left a comment

Choose a reason for hiding this comment

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

sorry for the delayed merge. thanks for the contribution!

@travi travi merged commit 020ea7d into semantic-release:beta Jan 5, 2024
6 checks passed
Copy link

github-actions bot commented Jan 5, 2024

🎉 This PR is included in version 23.0.0-beta.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@travi
Copy link
Member

travi commented Jan 5, 2024

please give the pre-release a try and report any complications. hoping to promote to stable in about a week

@KillianHmyd
Copy link
Contributor Author

Hello @travi, just saw that you merged the PR thank you !
We will try the beta version and keep you updated.
For information, we are using my fork version since the creation of this PR in production environment. We haven't encounter any complications during the past 2 years

Copy link

🎉 This PR is included in version 23.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

pushNotes fails when builds run in parallel
8 participants