microsoft / microsoft/beachball

Better recovery after Git merge fails in CI

Open
#667 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
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
  1. Change the order of commands: Git merge first, then publish to the registry. That way if something goes wrong with Git the process errors out and quits.
  2. If the branch was merged, but publishing fails, revert the merge back to the main original 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:

  1. Fetch the correct versions for package.jsons (the current sync functionality`).
  2. Without bumping further, delete change files and generate updated changelogs.
  3. Create a flag for the next Beachball run in CI not to require changelogs (omit changelog files and package.json from check change).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.