microsoft / microsoft/beachball
Better recovery after Git merge fails in CI
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 815
- Forks
- 93
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 12
Description
Problem
We had Git fail to commit back into main branch after the packages had been published in CI, which was hard to untangle after. A couple ideas of how this could be improved.
Idea 1
- Change the order of commands: Git
mergefirst, thenpublishto the registry. That way if something goes wrong with Git the process errors out and quits. - If the branch was merged, but publishing fails, revert the merge back to the
mainoriginal state (so you get all the change files back to try again).
Idea 2
If idea 1 is not possible, improve the sync script or create a new one. After Git merge fails, the user has their packages published, but changelogs not generated and package.json's not updated. The recovery script would:
- Fetch the correct versions for
package.jsons (the currentsyncfunctionality`). - Without bumping further, delete change files and generate updated changelogs.
- Create a flag for the next Beachball run in CI not to require changelogs (omit changelog files and
package.jsonfromcheck change).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the CI publishing flow and the existing sync script, including the check change validation and the next Beachball run. Determine whether merge-before-publish recovery or a dedicated recovery flow is feasible. Done means a failed Git merge or publish leaves packages, changelogs, and change files recoverable without requiring an additional version bump.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- ci-cd, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100