Skip to content

Fix upstream-sync workflow silently failing on conflict - #15

Merged
xeniacloud merged 1 commit into
masterfrom
fix/xenia-upstream-sync-conflict-handling
Sep 20, 2026
Merged

xeniacloud merged 1 commit into
masterfrom
fix/xenia-upstream-sync-conflict-handling

Conversation

@xeniacloud

Copy link
Copy Markdown

Problem

The scheduled Upstream Sync workflow (.github/workflows/upstream-sync.yml) has been failing silently every Monday since 2026-09-14: on a merge conflict it ran git merge --abort and just failed the Actions run, treating the failed run itself as the "alert." Since issues are disabled on this repo, nothing ever surfaced it to anyone, and the fork drifted from 129 to 381 commits behind before this was noticed (see PR #14, the manual catch-up).

Fix

  • On conflict, commit the merge as-is with conflict markers and open a PR flagging it, instead of aborting and failing — matches the pattern used by this session's other Xenia fork upstream-sync workflows and the Confluence Fork & Rebrand Playbook guidance ("still open the PR with conflict markers rather than failing silently").
  • Add workflows: write permission — needed because this fork's conflicts routinely touch files under .github/workflows/ (e.g. linux-appimage.yml, sonarcloud.yml), and GITHUB_TOKEN can't push such a diff without it; previously this was worked around by discarding workflow-file changes on clean merges, which no longer applies now that conflicted merges need to push them too.
  • Skip creating a duplicate PR while one from a previous run is already open (sync/upstream-* head).

Tested: YAML validated with yaml.safe_load; logic not run against a real Actions runner in this PR — recommend a workflow_dispatch run after merge to confirm end-to-end.

🤖 Generated with Claude Code

The conflict path did `git merge --abort` and just failed the run,
relying on the failed Actions run itself as the "alert" since issues
are disabled on this repo. That's not visible enough - the workflow
sat broken for weeks (129 -> 381 commits behind) before anyone noticed.

Now commits the conflicted merge as-is with conflict markers and opens
a PR flagging the conflict, same pattern as the other Xenia forks'
upstream-sync workflows. Also adds `workflows: write` permission
(needed to push a diff that touches .github/workflows/, which this
fork's conflicts routinely do) and skips creating a duplicate PR while
one is already open.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Artifact containing the AppImage: nextcloud-appimage-pr-15.zip

Digest: sha256:8f595ba7a2c639b2b7d05eb5dd494c1a89548072eda7b7889998fee2b689c23f

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@xeniacloud
xeniacloud merged commit 47e837e into master Sep 20, 2026
15 of 19 checks passed
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.

1 participant