-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ci] Add /update command to update upstream_utils #6817
Conversation
💀 CI doesn't like me today, can I get gradle CI rerun please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command seems like a really inefficient workflow for contributors. With /format
, the formatter is almost guaranteed to succeed. upstream_utils, on the other hand, often fails to apply patches and requires that they be manually rebased. It's not usually as simple as bumping the upstream tag and rerunning the script.
Something that would be kinda neat is an upstream_utils script subcommand that takes a new tag. It would try to apply the patches to the new tag, and if it failed, automatically fetch the old tag, apply the patches, then start an interactive rebase (git rebase -i
) onto the new tag (git rebase
sometimes includes commits it shouldn't because repos like LLVM use a separate branch for each release).
We could also make that subcommand automatically run git format-patch new_tag..HEAD --abbrev=40 --zero-commit --no-signature
on success and move the generated .patch files into allwpilib.
@@ -102,3 +102,87 @@ jobs: | |||
# Commit | |||
git commit -am "Regenerate pregenerated files" | |||
git push | |||
|
|||
update: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This duplicates .github/workflows/upstream-utils.yml
. Maybe you could dispatch to that workflow from here?
Do you intend for this to be interactive? Or mechanically editing the command list with something like sed? |
User interaction with interactive rebase was intentional. I don't see a good way of automating it. You can have a script modify the command list, but I'm not sure if keeping the last N entries, where N is the number of patches, is sufficient. |
Oh wait a moment Git rebase has flags for this; I think this might work:
That should take the commit range I hope this is helpful |
Yea, that's way easier. |
OBE by #6829. |
No description provided.