Use client, not server version for server dry run flag #793
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish with this PR?
Perf testing a new 1.18 core cluster exposed a sleeping error inside the logic we use to determine the appropriate
kubectl
flag for specifying server-side dry-running. Prior to this PR, the server version is checked against 1.18+, when it should be the client version. Unfortunately this issue didn't appear in CI (since client/server are locked together there) and was missed on the 2.1.4 release.How is this accomplished?
![Screen Shot 2021-01-26 at 7 40 48 PM](https://user-images.githubusercontent.com/31742287/105925571-6548a380-600e-11eb-8246-71651ff14fee.png)
I verified the client/server error by attempting a deploy using various configurations of kubectl client and server versions
As expected, the client version determines (somewhat obviously) the format of the flag we should pass in.
What could go wrong?
It already went wrong, unfortunately.