-
Notifications
You must be signed in to change notification settings - Fork 999
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
github-actions: Auto-backporting #4775
Conversation
ab78f47
to
c06be73
Compare
I made the changes to the .github repo as well. I will remove them from this PR if those look good. kata-containers/.github#46 |
c06be73
to
3db017a
Compare
.github/scripts/hub-util.sh
Outdated
@@ -0,0 +1,1045 @@ | |||
#!/bin/bash |
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.
Why is this script being copied into this repo (from https://github.com/kata-containers/.github/blob/main/scripts/hub-util.sh)?
If we only want it here (and I'm not sure we do as we have other repos), that needs to be documented in the commit, and an issue raised in the .github
repo to delete the original version of this script.
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.
I copied it to this repo to make it possible to test it before it was merged into that repo, since the action pulls it from github. I planned on deleting it once that script was merged in.
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.
Hi @jodh-intel @bookinabox , I just merged kata-containers/.github#46 so that we will be able to remove the script from this PR.
Not sure why it can't find the API url. I suspect it might be because its across repos? I don't see why that would work but the move-in-progress would fail and I did get this to work on my fork. Will mess around more with this. Edit: It's very puzzling to me because move-issue-to-in-progress went off fine. Besides being across repos, there's also that when I was testing on my fork I used GITHUB_TOKEN instead of KATA_GITHUB_ACTIONS_TOKEN since my fork does not have the copied secrets. Edit2: Weird, I remember seeing the add backport label on this check before, but I no longer see it. Perhaps I was looking at the wrong thing before? I know on my local fork the action did not appear until I merged into main. |
3db017a
to
7948732
Compare
I removed the duplicate hub-util script from here and tested on my fork. |
Great, it seems promising!
Currently there the action "Add backport label / check-issues " that checks if the PR has either 'needs-backport' or 'no-backport-needed'. This PR itself didn't pass that check. :) So we will need to consider the scenarios too:
Is it possible for the action to add a comment on the pull request saying that now the contributor needs to tag the PR properly? Apart from that:
|
Hi @fidencio @snir911 @amshinde @bergwolf @egernst , as you are in the release rota team, we would appreciate your feedback here. All in all, the idea behind this PR is to ease backport of fixes so that you don't need to cherry-pick yourself fixes at the release time or chase people to do so. Ah, bear in mind that @bookinabox is going to finish his internship in two weeks then there isn't time to implement a more sophisticated workflow. |
7948732
to
6efd6af
Compare
6efd6af
to
9688e19
Compare
@wainersm I added the PR label check (needs-backport vs no-backport-needed), but this again required changes to hub-utils I also added the automatic comment.
|
9688e19
to
d4bf936
Compare
An implementation of semi-automating the backporting process. This implementation has two steps: 1. Checking whether any associated issues are marked as bugs If they do, mark with `auto-backport` label 2. On a successful merge, if there is a `auto-backport` label and there are any tags of `backport-to-BRANCHNAME`, it calls an action that cherry-picks the commits in the PR and automatically creates a PR to those branches. This action uses https://github.com/sqren/backport-github-action Fixes kata-containers#3618 Signed-off-by: Derek Lee <derlee@redhat.com>
d4bf936
to
96d9037
Compare
^ I improved/fixed how the automatic labeling works.
|
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.
Thanks @bookinabox!
lgtm
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.
Thanks @bookinabox ! LGTM.
/test |
Not sure why jenkins-metrics-ubuntu-20-04 is failing |
Can one of the admins verify this patch? |
Sometimes it simply fail. The fail is not related with this PR, let me re-run the job. /test-metrics |
/test-metrics |
/test-ubuntu-metrics |
Hi @GabyCT ! Is there any known issue with the metrics job? It failed twice for this PR which has changed unrelated. |
never mind :) |
A work-in-progress implementation of semi-automating the backporting
process.
This implementation has two steps:
Checking whether any associated issues are marked as bugs
If they do, mark with
auto-backport
labelOn a successful merge, if there is a
auto-backport
label and thereare any tags of
backport-to-BRANCHNAME
, it calls an action thatcherry-picks the commits in the PR and automatically creates a PR to
those branches.
This action uses https://github.com/sqren/backport-github-action
Currently, I copied and modified the hub-util.sh script from
kata-containers/.github.scripts/hub-util.sh to include a function to
output the labels JSON associated with an issue to find the labels.
If this approach looks good, I will remove that script from here and
make a separate PR to that repo to add this utility.
Fixes #3618
Signed-off-by: Derek Lee derlee@redhat.com