Skip to content

.github: Include any additional commits when updating gentoo submodule - #4376

Merged
chewi merged 2 commits into
mainfrom
chewi/update-gentoo-with-commits
Nov 11, 2026
Merged

chewi merged 2 commits into
mainfrom
chewi/update-gentoo-with-commits

Conversation

@chewi

@chewi chewi commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Quite often, bumping the gentoo submodule requires additional fixes. We can push these to the auto-created branch, but if we don't verify and merge them by the time the job runs again, those commits get lost and the subsequent build will fail again. This change cherry-picks any additional commits made to the existing branch when recreating it. If this fails for some reason, it just continues without the additional commits.

This also renames the workflow from the old name. We initially kept the old name for easier testing.

How to use

This can be run manually with the GitHub CLI, but it will change the real gentoo update PR.

Testing done

I have manually tested as above with some additional commits present.

Quite often, bumping the gentoo submodule requires additional fixes. We
can push these to the auto-created branch, but if we don't verify and
merge them by the time the job runs again, those commits get lost and
the subsequent build will fail again. This change cherry-picks any
additional commits made to the existing branch when recreating it. If
this fails for some reason, it just continues without the additional
commits.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
We initially kept the old name for easier testing.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi chewi self-assigned this Nov 11, 2026
@chewi
chewi requested a review from a team as a code owner November 11, 2026 13:17
Copilot AI balanced review requested due to automatic review settings November 11, 2026 13:17

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.

🔵 Needs a closer look

Replaying a mixed overlay/gitlink commit can silently overwrite the selected upstream pin, leaving the published revision inconsistent with the PR title and body.

No open issues 🎉

What changed in this PR

Updates the Gentoo submodule workflow to preserve follow-up fixes when recreating the automated update branch.

Changes:

  • Explicitly checks out the default branch and runs update commands from the scripts directory.
  • Replays additional non-merge commits affecting files outside the submodule, falling back to the submodule-only update if replay fails.
File Description
.github/​workflows/​update-gentoo-submodule.yaml Adds replay of existing branch fixes and adjusts checkout and working-directory handling.

Review effort: Balanced

@t-lo t-lo 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.

This is very useful, thanks!

@chewi
chewi merged commit b2ab7a0 into main Nov 11, 2026
2 of 3 checks passed
@chewi
chewi deleted the chewi/update-gentoo-with-commits branch November 11, 2026 13:28

This branch is waiting to be deployed

1 waiting deployment
development — 1f8341e4 Waiting Nov 11, 2026 by chewi via Wait for approval #6129
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