Repository navigation
.github: Include any additional commits when updating gentoo submodule - #4376
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
🔵 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
scriptsdirectory. - 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
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.