Skip to content

ci: auto-resolve data/content conflicts in release-branch merge - #1491

Merged
David Pine (IEvangelist) merged 1 commit into
mainfrom
dapine/release-branch-auto-merge
Aug 14, 2026
Merged

David Pine (IEvangelist) merged 1 commit into
mainfrom
dapine/release-branch-auto-merge

Conversation

@IEvangelist

Copy link
Copy Markdown
Member

Problem

The Update Release Branch workflow (update-release-branch.yml) merges main into the active release branch (currently release/13.5) on every push to main. It has been failing on essentially every run — e.g. run 31735187914 — with Merge conflict detected ... Manual intervention required.

main and the release branch each accumulate independent, non-fast-forwardable changes to the same files, so a plain git merge always conflicts:

  • Generated data under src/frontend/src/data/** — aspire-integrations.json, github-stats.json, twoslash/aspire.d.ts, and the version-stamped pkgs/** and ts-modules/** files. Because each side renames the same base file to a different version (e.g. ...260730.1.json vs ...260804.1.json), git reports rename/rename conflicts. (72 files in the latest run.)
  • Curated site content under src/frontend/src/content/** — e.g. the release-specific ✨ Aspire 13.5 is available! banner and the localized index.mdx pages. (19 files in the latest run.)

A blanket -X theirs would regress the live site (revert the 13.5 banner back to 13.4); a blanket -X ours would freeze the generated data. Neither is correct.

Fix

Replace the hard-fail with path-scoped auto-resolution in the merge step:

Path Resolution Why
src/frontend/src/data/** + src/frontend/src/assets/samples/** take main (rewrite subtree to match) Regenerated from source-of-truth (NuGet + GitHub) by update-integration-data, which only ever targets main. Rewriting the whole subtree also clears rename-orphaned version-stamped files.
src/frontend/src/content/** keep release on conflict The release branch owns its published/localized content; non-conflicting content from main still merges in normally.
anything else fail (manual intervention) Safety valve for genuinely unexpected conflicts.

The clean-merge fast path is unchanged.

Validation

Simulated the exact algorithm against upstream/release/13.5 + upstream/main (the failing run's commit):

  • 91 conflicts → 0 unresolved; no leftover conflict markers.
  • src/frontend/src/data ends byte-identical to main; the orphaned ...260730.1.json package files are removed.
  • The ✨ Aspire 13.5 is available! banner is preserved in index.mdx / community/index.mdx.
  • bash -n and YAML parse both pass.

Copilot AI lite review requested due to automatic review settings August 13, 2026 19:41

Copilot AI 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.

Pull request overview

Updates the Update Release Branch GitHub Actions workflow to avoid recurring merge failures when merging main into the active release branch by automatically resolving conflicts in specific subtrees while still failing on unexpected conflicts.

Changes:

  • Adds a fast path for clean merges and introduces conflict-handling logic when the merge fails.
  • On conflicts, force-rewrites src/frontend/src/data/** and src/frontend/src/assets/samples/** to match main.
  • On conflicts under src/frontend/src/content/**, keeps the release-branch version while aborting for conflicts outside the allowed paths.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/update-release-branch.yml Outdated
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1491. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1491 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

Comment thread .github/workflows/update-release-branch.yml Outdated
Comment thread .github/workflows/update-release-branch.yml Outdated
Comment thread .github/workflows/update-release-branch.yml Outdated

@adamint Adam Ratzman (adamint) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The resolver still fails safely for authored-code conflicts, and the exact workflow shell was exercised in throwaway git repositories. I left three must-fix comments: a single conflict resets unrelated release-owned data, release-side deletions fail before the actionable abort path, and a main-side subtree deletion fails after staging broad removals. These are fixable in place, so approving with the comments.

The update-release-branch workflow merged main into the active release
branch with a plain `git merge` that hard-failed on every conflict, so
the automated sync never completed on its own.

Resolve the three conflict classes this merge actually produces:

- Generated data (the update-integration-data producer outputs:
  aspire-integrations.json, github-stats.json, samples.json,
  twoslash/aspire.d.ts, pkgs/**, ts-modules/**, assets/samples/**) is
  mirrored from main. Mirroring also removes the version-stamped
  rename/rename orphans these files routinely create.
- Curated presentation (content/** and assets/** except the generated
  assets/samples/**) keeps the release branch's version, so release-
  specific edits such as the version banner and recaptured dashboard
  screenshots never regress.
- Any other conflict aborts the merge cleanly for human review.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@IEvangelist
David Pine (IEvangelist) force-pushed the dapine/release-branch-auto-merge branch from 1f99482 to 134e9c5 Compare August 14, 2026 14:27
@IEvangelist
David Pine (IEvangelist) merged commit 1a09e0c into main Aug 14, 2026
10 checks passed
@IEvangelist
David Pine (IEvangelist) deleted the dapine/release-branch-auto-merge branch August 14, 2026 15:14
David Pine (IEvangelist) added a commit that referenced this pull request Aug 18, 2026
Resolve conflicts per update-release-branch.yml file-class policy (#1491):

- Generated data (pkgs, ts-modules, twoslash, integrations, github-stats): kept release/13.5 staged 13.5.0 data

- Curated content/imagery conflicts: kept release/13.5 versions (13.5 banners, dashboard screenshots, translations)

- CustomSelect.astro + ui-regressions.spec.ts: took main (newer hardening #1490 + matching regression tests)

- generate-ts-api-json.ps1: kept release/13.5 (superset: main API-gen hardening #1461 + carry-forward #1514)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

3 participants