Open crhaglun opened 4 years ago
This is an issue with the current functionality. We eventually want to redesign publish. In the meantime to mitigate this you can try bumping in the beginning of the pipeline.
Ah, we're already doing 'rush bump' just before 'rush publish' :-) This is a Microsoft internal project, let me know if it would be meaningful to give you a direct link to the repo and build pipeline.
How do you intend to redesign 'rush publish'? Are there other changes needed than the one described here?
Since my team is affected, I'd be happy to help out expedite this work instead of spending time implementing some workaround.
Hi @apostolisms, any update on this?
Is this a feature or a bug?
Please describe the actual behavior.
We have a dedicated build pipeline for "rush publish", scheduled weekly + occasional manual runs.
Fairly often this pipeline fails when pushing git tags because of updates on the target branch happening while "rush publish" is running.
The git tags are actually pushed, but the update of HEAD fails causing the whole operation to fail;
If the issue is a bug, how can we reproduce it? Please provide detailed steps and include a GitHub branch if applicable. Your issue will get resolved faster if you can make it easy to investigate.
Run "rush publish" on a commit that's not the most recent commit on a branch (like master~1)
A very similar problem was reported on semantic-release: https://github.com/semantic-release/semantic-release/issues/993 Fixed in that project by omitting 'HEAD:branchname' from the "git push" command. Is that a plausible fix here as well?
What is the expected behavior?
Since this is not a functional problem -- NPM packages are pushed and git tags are indeed updated correctly -- it's a bit unexpected that the command exits with an error code.
If this is a bug, please provide the tool version, Node.js version, and OS.