-
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: automate the update of DefaultKubernetesVersion #9298
update_kubernetes_version: automate the update of DefaultKubernetesVersion #9298
Conversation
…GitHub for the latest Kubernetes release
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? |
/assign @tstromberg |
@@ -77,7 +128,7 @@ func main() { | |||
return err | |||
} | |||
re = regexp.MustCompile(`kubernetesVersion: .*`) | |||
cf = []byte(re.ReplaceAllString(string(cf), "kubernetesVersion: "+v)) | |||
cf = []byte(re.ReplaceAllString(string(cf), "kubernetesVersion: "+vDefaultMM+".0")) // TODO: let <PATCH> version to be the latest one instead of "0" |
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.
Can you clarify this TODO? I think it may be removable.
It's intentional that the tests are using .0
to avoid unnecessary testdata updates for every minor release.
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 thought it could be needed sometimes later, but if we would stick always to the .0
patch release, then yes, that TODO is not needed
then also, do we need the testData update section here at all if it is static (ie, the version is always <major>.<minor>.0.
) or shall we remove it altogether?
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.
@tstromberg i've submitted a new pr where i removed the 'todo' and left testData
update section as-is until we clarify it
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.
PR looks good and about ready to merge.
- add context.WithTimeout - limit the time spent on quering GitHub APIs - extract Kubernetes GitHub Releases API quering into a separate fetchKubernetesReleases func - extract Kubernetes Version Update logic into a separate updateKubernetesVersions func - extract file patching instructions into a separate replaceAllString func - patch '../../site/content/en/docs/commands/start.md' => remove the need to run 'make generate-docs' before 'make test' - resolve 'ERROR: logging before flag.Parse' - consolidate and add more verbose logging - add more descriptive code comments - removed TODO - will stick to the '0' patch version for all testData sets - ensure 'make test' completes w/o any issues
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
fixes #4392 (iteration 0)
description:
existing
hack/kubernetes_version/update_kubernetes_version.go
script was modified to automate the update ofDefaultKubernetesVersion
andNewestKubernetesVersion
- it now polls GitHub Releases (usinggithub.com/google/go-github
) for the latest Kubernetes [pre-]releases and updates thepkg/minikube/constants/constants.go
accordingly, whereas:DefaultKubernetesVersion
is updated to the latest release versionNewestKubernetesVersion
is updated to the latest-rc
or-beta
pre-release versionNewestKubernetesVersion
is less thanDefaultKubernetesVersion
, thenDefaultKubernetesVersion
would be used for bothmake test
passes (note:- this dependency/requirement was removed in commit 1444ce3)make generate-docs
must be run beforemake test
, orTestGenerateDocs
test will fail