-
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
update_kubernetes_version: standalone script v2 #9384
update_kubernetes_version: standalone script v2 #9384
Conversation
sync-2020.10.02
polls GitHub for the current Kubernetes Stable release and latest RC or Beta pre-release, then automatically updates local repo and/or creates a unique PR in kubernetes/minikube repo
Hi @prezha. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: prezha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Can one of the admins verify this patch? |
when there are changes that has been made in the local filesystem repo and make the issue mentioned in the PR message ("fixes: ") a parameter
"github.com/golang/glog" | ||
"golang.org/x/oauth2" | ||
|
||
"k8s.io/klog/v2" |
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 recommend keep using glog till we deprecate glog (that is a WIP PR it is better to let that PR handle migration from glog to klog)
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.
ok, thanks @medyagh for your review and comment - i've switched back from using klog to glog
Codecov Report
@@ Coverage Diff @@
## master #9384 +/- ##
=========================================
Coverage ? 29.20%
=========================================
Files ? 171
Lines ? 10447
Branches ? 0
=========================================
Hits ? 3051
Misses ? 6972
Partials ? 424
|
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.
thank you
@medyagh you are most welcome, thank you for your review! |
fixes #4392 (iteration 1 & 2)
notes:
UPDATE_TARGET
env var controlles what will be updated - options:= unset/absent,
fs
, orall
: local filesystem repo will be updated - similarly to the old behaviour=
gh
orall
: a pr against origin (kubernetes/minikube
) github repo would be automatically created, but only if the same one does not exist already, and will also 'mention' the issue Write a script to automatically propose PR's due to a new Kubernetes release #4392GITHUB_TOKEN
is required forgh
orall
UPDATE_TARGET
desired changes are defined as
plan
, which is flexible (ie, supports regex and go text templates) and placed at the top of the script - easy to amend and extend; parseability checks in placeaob:
= used
github.com/google/go-github/v32/github
: pure go code ;) - no need to callgit
orgh
cli from the script= used
k8s.io/klog/v2
instead ofglog
=
go.mod
&go.sum
amended accordingly (for klog/v2 and github/v32)= cron job script could contain something like:
rm -rf ~/minikube && git clone https://github.com/kubernetes/minikube.git ~/minikube && cd ~/minikube/hack/kubernetes_version && go run update_kubernetes_version.go
all
make test
passedtesting & example output:
for unset
UPDATE_TARGET
:1st run:
git diff:
2nd run:
for
UPDATE_TARGET
set togh
and w/GITHUB_TOKEN
set:1st run:
2nd run: