-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Match both old and new kubectl version for a while in e2e #119251
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: soltysh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/triage accepted |
@@ -1676,7 +1676,12 @@ metadata: | |||
// we expect following values for: Major -> digit, Minor -> numeric followed by an optional '+', GitCommit -> alphanumeric | |||
requiredItems := []string{"Client Version: ", "Server Version: "} | |||
for _, item := range requiredItems { | |||
if matched, _ := regexp.MatchString(item+`v\d\.\d+\.[\d\w\-\.\+]+`, versionString); !matched { | |||
// prior to 1.28 we printed long version information | |||
oldMatched, _ := regexp.MatchString(item+`version.Info\{Major:"\d", Minor:"\d+\+?", GitVersion:"v\d\.\d+\.[\d\w\-\.\+]+", GitCommit:"[0-9a-f]+"`, versionString) |
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.
We can not run kubectl version -ojson
because kubectl is still old and will fail?.
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.
we could, but I don't want that, I want the bare kubectl version
output here, only
/lgtm |
LGTM label has been added. Git tree hash: 13b2c05268e9de4447469a8a406341d4ba55d03c
|
/test pull-kubernetes-conformance-kind-ga-only-parallel |
What type of PR is this?
/kind failing-test
/kind flake
/sig cli
/sig testing
What this PR does / why we need it:
In #116720 I dropped the deprecated long version, but our release informing jobs are using an older version of kubectl which still prints the long version.
Based on that, given our compatibility guarantees I'll match either the new or the old version until 1.30.
Which issue(s) this PR fixes:
Fixes #119230
Special notes for your reviewer:
/assign @ardaguclu
Does this PR introduce a user-facing change?