-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add cherrypicker to prow deployment bundle #7393
Conversation
Having issues with prow/bump.sh...
|
prow/bump.sh publishes images etc., please don't do that in this PR. we'll bump prow in a different PR. |
@BenTheElder |
@jennybuckley you can put any image tag in the initial deployment.yaml, the script will update the tag. |
7a14d0f
to
3317d39
Compare
secretName: hmac-token | ||
- name: oauth | ||
secret: | ||
secretName: oauth-token |
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 would suggest using a bot different from k8s-ci-robot. All it needs is org membership in order for its PRs to get automatically tested but other than that it shouldn't need any write permissions in repos.
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.
fejta-bot perhaps? 🙃
thoughts @fejta?
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.
If we do decide to use that bot do we just replace "oauth-token" with "fejta-bot-token" ?
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.
Or do we need a new bot / token
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.
fejta-bot sgtm assuming it needs no permissions to anything aside from a github account
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.
do we need to set up a new token for it, or is there an existing one?
I can't find any mention of fejta-bot in this repo, aside from a few comments.
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.
/cc @fejta
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.
Search prow/config.yaml for prior art:
Lines 13705 to 13716 in 5b2902d
- --token-file=/etc/token/bot-github-token | |
- --test-owners-csv=/test_owners.csv | |
- --triage-window=1 | |
- --triage-count=10 | |
- --flakyjob-count=3 | |
volumeMounts: | |
- name: token | |
mountPath: /etc/token | |
volumes: | |
- name: token | |
secret: | |
secretName: fejta-bot-token |
If we're enabling this for k/k, is it going to do battle with the cherrypick mungegithub instance and related mungers? sig-contribex is attempting to better document how the mungegithub-based cherry picker works, are there docs for how this works? kubernetes/community#1980 |
@spiffxp The |
@cjwagner ok, I hadn't really paged in the full cherrypick process, now that I've reviewed that PR, it looks like this is sort of a replacement for |
@spiffxp Yeah, that seems accurate. It looks like the |
What remains to be done here? It'd be good to have this in and well understood prior to 1.11.x code freeze, so we could at least tell people to use a |
We have @openshift-cherrypick-robot for this as the bot needs fewer rights than the others, unclear if you guys want to do similarly. |
/assign @fejta @BenTheElder
☝️ Very cool, let's get this in (is this still alive?) |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Yeah, I feel ways about having bots open PRs:
@Kargakis @stevekuznetsov How do you feel about/handle these in openshift? I'm really not sure this is a workflow we want in Kubernetes. |
How long do cherry-picks stay alive? We don't create the PR if it cannot be made cleanly in the first place and have not seen cases where a cherrypick lands first and ruins the possibility of another open cherrypick. In those cases, drop back to the normal workflows we all know and love. In the happy case, just use the bots.
If the PR already merged into |
Please excuse my butting in! I have further improvements to the cherrypick docs sitting in kubernetes/community#2408 and have also (somewhat successfully but laboriously) shepherded a coworker's cherrypicks to completion. With those experiences in mind, I for one would love to see a All cherrypick PRs are subject to final approval (the manual adding of @cblecker I don't entirely understand the concern about rebase conflicts and unprivileged users. |
Improving the cherrypick process.. 100% all for it! Still have major, major concerns about the bot opening a PR route. The code review concern, yes, is mitigated by the requirement of the branch manager's approval. I hadn't thought about that, and that makes me much more comfortable on that point. Let me try to explain further on the rebase concern.. Release branches are all point in time snapshots of what was on master. As time goes on, with some commits cherry picked back and others not, the code will drift. If I make a PR to master right now, there's a okay chance it will pick back to 1.11 without a merge conflict. The same can't be said for 1.10 and 1.9. Even if it does merge cleanly, there may be tests or other parts of the code that break because of the cherry picked code. The cherry picks can also be held for awhile between generation and merge, such as when a branch manager is preparing for a branch cut, or because there is a security fix pending. If there is any modifications required (merge conflict on PR generation, rebase needed after PR generation, or test failures requiring code changes), then a bot generated PR is basically a waste and needs to be discarded and recreated using the cherry pick pull script. These aren't hypotheticals.. these are actual situations I see all the time in k/k. To summarize: Having a bot generate a PR may work a small percentage of the time and make the process super quick.. but I think a majority of the time one of the above scenarios will impact the PR, and then they have to fall back to the alternative process anyways. I'd rather improve and work on the alternative process, making it the one true process that is the best we can make it, then have two different paths.. especially when one of those paths may require discarding entire PRs because of circumstances outside of the contributor's control. |
This is mostly not true with the cherrypick bot, you can push changes to open PRs if you will but that should be very rare. Only if there is a conflict in the first place, the bot will not open the PR and inform with a message about the conflict.
We actually see the opposite in openshift repos: https://github.com/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3Aopenshift-cherrypick-robot+archived%3Afalse+is%3Aclosed+ |
Some points/questions: More than half of the cherry-picks I have opened in k/k have had conflicts. If the cherrypick bot fails with a message that it can't open a PR and wants me to use the script, it sgtm to me.
Have seen this too. There are cases where cherry-pick PRs either fail tests due to changed code or a discussion arises on the cherry-pick PR which ends up with removing some part in the cherry-picked PR and selecting only some code out of it. Basically, with the bot it means that all cherry-picks created without conflicts can only have two future states: they are either ready to be merged or to be closed. This would make "reviews" on a cherry-pick PR redundant. Are we ok about that? 🤔 To be clear, I am all in for a bot but just want to understand the process and semantics better. :)
Personally, the script has always been reliable. Though I agree that the cherrypick process should be made easier. Is there an issue with the list of problems or suggestions for UX improvements for the script? Even if we decide to choose a bot-focused way, we should definitely fix those problems. |
/sig release |
Also, I am not sure if this is really a concern but this allows someone listed in OWNERS of the respective change to create a cherry-pick PR and lgtm+approve it. It's not always necessary that the branch manager will be familiar with the nitty-gritties of the change and may If the approver had the power to "approve" the PR it means that they should be familiar with the change and understand the unintended side effects but this also essentially means that an approver listed in the OWNERS file is allowed to self-lgtm their PRs. Again, are we ok with that? 🤔 There are examples of PRs with |
@Kargakis How would you do this without write access? |
Only org members are allowed to /cherrypick. At least in Openshift. The bot
is also deployed in a different project with --allow-all=true but I haven't
seen anybody needing to edit an open cherrypick so far even if it's
supported only for contributors.
…On Wed, Aug 29, 2018, 16:26 Christoph Blecker ***@***.***> wrote:
This is mostly not true with the cherrypick bot, you can push changes to
open PRs if you will
@Kargakis <https://github.com/kargakis> How would you do this without
write access?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7393 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADuFf0GpEf_LGZyUmjcxsVTbhiu6yNmDks5uVqSFgaJpZM4S5VKK>
.
|
@cblecker your comments are 100% valid, but I guess if we just look at the query @Kargakis posted we see 2500+ (!!!!!) PRs that cherry-picked and merged cleanly with the bot only. I don't think cherry-picks to OpenShift release branches are necessarily less complicated than those to k8s release branches. I'm not sure that the fact that automatic cherry-picks might fail in some cases should be an argument against letting the flow help where it can, best-effort. |
@stevekuznetsov Can you compare the workflow of openshift/openshift-docs vs openshift/origin or k/k? Of the ~2500 PRs there, ~1800 of them are in openshift/openshift-docs. It looks like there is only travis CI there, and the PRs are merged by humans. There are only 81 PRs in that query that are actually for openshift/origin, but again, I know very little about the openshift workflow. |
Even without the docs repo -- which does have a simplistic test workflow -- we still have 700+ PRs made to more complex repositories where code is quickly changing and release branches are maintained long-term. We do more cherry-picks to a different repository for our long-term releases for OpenShift which unfortunately are not public. Is there some way that you would want to quantify the cost (in a potentially more complex workflow if the automated |
That's what I'm kind of thinking about right now. And there's the two different perspectives.. prow as a software product, vs how we use it in kubernetes. I think the ~2500 number absolutely justifies it as a part of prow the software product. I'm just.. grappling with what I see in k/k (which currently has over 50 open cherry picks dating as far back as April -- https://github.com/kubernetes/kubernetes/pulls?q=is%3Apr+is%3Aopen+-base%3Amaster) and what kind of contributor experience people are having. I just see this potentially causing a whole lot more headache for both contributors and reviewers then the current system we have. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Is this still alive? Please rebase and/or close |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Follow up to #7345
Fixes up cherrypicker's build to look more like needs-rebase and adds it to the prow deployment bundle.
Fixes #7332
/area prow