-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Write a script to automatically propose PR's due to a new Kubernetes release #4392
Comments
@tstromberg do we want the latest stable release ? or the latest tag of any kind (release, pre-release...) ? |
|
/assign medyagh |
@medyagh: GitHub didn't allow me to assign the following users: to, me. Note that only kubernetes members and repo collaborators can be assigned and that issues/PRs can only have 10 assignees at the same time. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hey, I would like to work on this! |
@sjortiz - If you are still interested, let me know how I can help. |
hey, Sorry for the late response, I honestly forgot about this as it has been a couple of months since I first asked. Yeah, I'd love to work on this! |
Could you provide me any insights on where to start? |
@sjortiz - sure! Initial iterationI would start by implementing a standalone program that polls GitHub for the latest Kubernetes release, and if differs the current value used by minikube, run or import
This first iteration should filter out -beta and -rc releases. We will then take this script and set it to run on a periodic basis on our test servers. Further iteration
Documentationhttps://godoc.org/github.com/google/go-github/github has the Go API documentation for the github library that we tend to use. Thank you for volunteering! |
@sjortiz - Does this issue still seem reasonable to resolve? Feel free to reach out for help here or on the #minikube Slack channel. |
@tstromberg regarding the filter of release version, is it enough to filter out pre-releases? |
@sjortiz any feedback on progress would be appreciated, else I would
suggest to drop the assignment and allow others to work on this.
|
@sjortiz @tstromberg could i take this issue? |
@anorek - please do! Filtering out pre-releases for the CurrentVersion sounds good. |
Increasing the priority as we really would like to end the year with this roadmap item fixed. |
will try :) might need some assist like the authentication key and so |
@anorek - I'll be happy to help with any credential issues. |
@anorek are you still working this ? |
@medyagh been busy for a while but I have most of the code ready. Will draft pr within 2 weeks |
@anorek are you still woking on this? |
@anorek I haven't heard from you, are you still interested in finishing this? |
@tstromberg is github action acceptable for this? |
Github actions seem perfectly acceptable for this usecase. |
This should be added to one of our automation tasks in q4 |
@tstromberg, @medyagh, @sharifelgamal: q4 is nearing, so i'd like to give it a try, if you don't mind :) just three things to clarify/confirm:
c) script should update all respective <major>.<minor> versions in testData folder (in respective default.yaml ), not just the latest one?
if you agree, i'd work on a PR for iteration 0: "implementing a standalone program that polls GitHub for the latest Kubernetes release", which would improve on the existing "interactive use and does not know how to look for new Kubernetes releases" (ie, next iteration would be checking and automatically creating a new PR)? |
@prezha - Thanks for the questions! a) I suggest ignoring alphas for NewestKubernetesVersion initially. We can always add them back in once we are confident in the workflow. The important thing is to iterate the version in constants.go and verify that |
thank you @tstromberg for your responses! in summary: conclusion: we'll focus on updating the version(s) in pkg/minikube/constants/constants.go and verify that |
/assign |
@tstromberg i've just created a pr for this first iteration - please have a look and let me know your thoughts; thanks! |
thank you @medyagh for the review and approval/merge shall i continue working on this according to the original scope - ie, automatically propose a pr for any release newer than current *KubernetesVersions values (ideally one/unique pr per each detected versions mismatch)? if so: if the script would also run periodically and independently of (isolated from) the rest of the code - what would be the reference minikube release (and *KubernetesVersions) to check and send pr against: eg, latest stable minikube release or ? |
@prezha - Sounds good. Here's how I see this working, please let me know if you have any alternative suggestions:
I have no idea how to suggest proposing a PR, unfortunately. I understand there is at least a GitHub command-line we could use now. Sound OK? |
@tstromberg - sounds great and in line with my thoughts: follows the details, and i've created a pr #9384 with changes in the script: notes:
for unset
|
@tstromberg now that pr #9384 (related to this issue) is approved, i would propose to reuse the same approach also for issues eg, #9264 [ the idea is that we just need to define what we want to update and with which values, and leave implementation details to available functions i have restructured the code accordingly and also expanded to include functionalities for above-mentioned issues so, currently, with this, we can: track new kubernetes stable & latest versions, new goland stable versions, update any local fs files, update any files on github, automatically create pr for those changes (if one does not exists already), update all three remote container registries we use here (ie, gcr, docker, and github) i've created a new pr #9464 here with these changes and additions (it would create a separate thanks! examples of automatically created (test) PRs:
example command outputs:
|
btw, Kubernetes released v1.19.3 yesterday, so maybe we could give the script a go? |
I would love a script that we can run from a cronjob or Jenkins that monitors https://github.com/kubernetes/kubernetes/releases for new releases.
The script should propose a PR for any release newer than NewestKubernetesVersion:
minikube/pkg/minikube/constants/constants.go
Line 168 in f8fa074
If the release is a non-beta release, it should also change DefaultKubernetesVersion in the same PR:
minikube/pkg/minikube/constants/constants.go
Line 165 in f8fa074
This script should either build upon or replace https://github.com/kubernetes/minikube/blob/master/hack/kubernetes_version/update_kubernetes_version.go - which makes the changes necessary in our code base, but is designed for interactive use and does not know how to look for new Kubernetes releases.
We can provide a github token via an environment variable.
The text was updated successfully, but these errors were encountered: