Skip to content

ci: Make failed backports visible - #352

Open
scouten-adobe wants to merge 1 commit into
mainfrom
fix/backport-conflict-visibility
Open

scouten-adobe wants to merge 1 commit into
mainfrom
fix/backport-conflict-visibility

Conversation

@scouten-adobe

Copy link
Copy Markdown
Collaborator

Problem

The automated backport of #350 to stable "succeeded" while producing nothing. Run 36186036296 shows:

CONFLICT (modify/delete): .github/workflows/release-train-cut.yml
  deleted in HEAD and modified in 3f0165c
error: could not apply 3f0165c...
[command]/usr/bin/git cherry-pick --abort

The action posted its summary comment on #350 and exited 0. The auto-merge step was skipped because created_pull_numbers was empty, and the run got a green check.

This is not a one-off. Run 36175861332 ("fix: Report failed fragments rather than dropping them") hit CONFLICT (content): Merge conflict in src/main.rs and did the same thing. Every conflicting backport silently no-ops with a success badge, which is why recent backports appeared to just not happen.

Release lines legitimately diverge from main -- stable carries 9 workflows to the 15 on main, plus older dependency pins and its own changelog -- so conflicting cherry-picks are routine, not exceptional. conflict_resolution: fail is the wrong default for this repo.

Changes

  • conflict_resolution: draft_commit_conflicts -- a conflicted backport now commits the first conflict and opens a draft PR, so there is a branch and a PR to finish by hand instead of nothing.
  • Auto-merge is skipped for draft backport PRs (GitHub refuses auto-merge on a draft, and they need a human anyway).
  • A new step fails the run when was_successful != 'true', so conflicted backports show red in the Actions list.
  • pull_description, the workflow header comment, and docs/release-process.md updated to describe the draft-conflict flow.

Validation

actionlint clean. The behavior change can only be exercised by a real backport; the next labeled PR that conflicts will demonstrate it.

Follow-up

#350 still needs a hand-resolved backport to stable -- that is a separate PR.

Release-line branches legitimately diverge from `main`, so conflicting
cherry-picks are routine. With `conflict_resolution: fail` (the default)
the backport action produced no branch and no pull request on conflict,
yet the workflow run still reported success -- so a broken backport was
invisible unless someone read the comments on the source PR.

* Switch to `conflict_resolution: draft_commit_conflicts` so a conflicted
  backport still yields a draft PR with the conflict committed.
* Skip auto-merge on draft backport PRs (GitHub refuses auto-merge on a
  draft, and they need a human anyway).
* Fail the run when any target was unsuccessful.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.42%. Comparing base (3f0165c) to head (4ba93e2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #352   +/-   ##
=======================================
  Coverage   76.42%   76.42%           
=======================================
  Files           4        4           
  Lines        1073     1073           
=======================================
  Hits          820      820           
  Misses        253      253           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ok-nick ok-nick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like this, we should bring it over to c2pa-rs if not done already.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants