Repository navigation
ci: auto-resolve data/content conflicts in release-branch merge - #1491
Conversation
There was a problem hiding this comment.
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/**andsrc/frontend/src/assets/samples/**to matchmain. - 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.
Frontend HTML artifact readyThe latest frontend build uploaded the This comment updates automatically when a new frontend build artifact is uploaded. |
Adam Ratzman (adamint)
left a comment
There was a problem hiding this comment.
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>
1f99482 to
134e9c5
Compare
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>
Problem
The Update Release Branch workflow (
update-release-branch.yml) mergesmaininto the active release branch (currentlyrelease/13.5) on every push tomain. It has been failing on essentially every run — e.g. run 31735187914 — withMerge conflict detected ... Manual intervention required.mainand the release branch each accumulate independent, non-fast-forwardable changes to the same files, so a plaingit mergealways conflicts:src/frontend/src/data/**—aspire-integrations.json,github-stats.json,twoslash/aspire.d.ts, and the version-stampedpkgs/**andts-modules/**files. Because each side renames the same base file to a different version (e.g....260730.1.jsonvs...260804.1.json), git reports rename/rename conflicts. (72 files in the latest run.)src/frontend/src/content/**— e.g. the release-specific✨ Aspire 13.5 is available!banner and the localizedindex.mdxpages. (19 files in the latest run.)A blanket
-X theirswould regress the live site (revert the 13.5 banner back to 13.4); a blanket-X ourswould freeze the generated data. Neither is correct.Fix
Replace the hard-fail with path-scoped auto-resolution in the merge step:
src/frontend/src/data/**+src/frontend/src/assets/samples/**update-integration-data, which only ever targetsmain. Rewriting the whole subtree also clears rename-orphaned version-stamped files.src/frontend/src/content/**mainstill merges in normally.The clean-merge fast path is unchanged.
Validation
Simulated the exact algorithm against
upstream/release/13.5+upstream/main(the failing run's commit):src/frontend/src/dataends byte-identical to main; the orphaned...260730.1.jsonpackage files are removed.✨ Aspire 13.5 is available!banner is preserved inindex.mdx/community/index.mdx.bash -nand YAML parse both pass.