Fix crash in lerna version when using gitSignTag#3832
Fix crash in lerna version when using gitSignTag#3832fahslaj merged 2 commits intolerna:mainfrom squidfunk:fix/gpg-race-condition
lerna version when using gitSignTag#3832Conversation
|
Hi @squidfunk , do you happen to have a public repo that this error occurs in? I created a small test repo and set up gpg locally and was not able to reproduce the issue you describe. |
|
Thanks for investigating. I don't currently have a public repo exposing this behavior. The problem only occurs sporadically, and you need to have several CPUs available and run |
|
@squidfunk Thank you for the extra context. I tested this on a larger repo with many packages and was able to reproduce the issue after all and confirm that the proposed solution fixes it. I've pushed a small formatting change and will merge this as soon as CI passes. |
|
Thanks @squidfunk ! |
|
Perfect! Thanks for the quick merge! Sorry that I wasn't more responsive, I had some other things on my plate today, but glad you could reproduce the problem |
When instructing lerna to sign tags,
gpgoften runs out of memory because it isn't designed to be run in parallel (see similar issue on another repository). Thus, whensignGitTagis set to true, signing must be carried out serially.Description
If
gitTagSignis set to true, this PR will sign tags one after another, omitting the race conditionMotivation and Context
Signing git tags
How Has This Been Tested?
I'm not sure how to test it, as we'd need to somehow mock
gitTagto check if we call it concurrently or not.Types of changes
Checklist:
Possibly related