-
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
Regression: Kubelet fails on older distro Dockers #20827
Conversation
Labelling this PR as size/M |
GCE e2e test build/test passed for commit 423303d6209b3479c6fb7d22fd6e7340244131ed. |
if strings.Count(version, ".") > 2 { | ||
switch parts := strings.Split(version, "."); { | ||
case len(parts) >= 3: | ||
version = strings.Join(parts[:3], ".") + "-" + strings.Join(parts[3:], ".") |
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.
It seems like that It would change prerelease versions like1.0.0-beta.2 to 1.0.0-beta-2 and might break them, although haven't tested 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.
Agreed. Should we use regexp instead?
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.
See the test cases, it does not change those.
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.
May be I am misunderstanding something, but doesn't it mutate a correct string x.y.z-prerelease.n to something x.y.z-prerelease-n?
For example, I tested it with {value: "1.8.1-beta.12", out: "1.8.1-beta.12"} and it failed because the out form was 1.8.1-beta-12.
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.
You're right, let me make this prefer the shorter of the first block.
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.
Updated, PTAL
423303d
to
83b9d02
Compare
GCE e2e test build/test passed for commit 83b9d0266359efc0ed83572d91954fe590e8b679. |
{value: "1.8.1", out: "1.8.1"}, | ||
{value: "1.8.1.fc21", out: "1.8.1-fc21"}, | ||
{value: "1.8.1.fc21.other", out: "1.8.1-fc21.other"}, | ||
{value: "1.8.1-fc21.other", out: "1.8.1-fc21.other"}, |
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.
nit: @aveshagarwal's test case should be added here:
{value: "1.8.1-beta.12", out: "1.8.1-beta.12"}
LGTM with a nit. |
Changes broke compatibility with released versions of Docker on some distributions like Fedora and RHEL (value 1.8.1.fc21 is in the wild).
83b9d02
to
5aca495
Compare
Nit fixed, applying lgtm |
GCE e2e build/test failed for commit 5aca495. |
docker crashing:
|
This might be #20798
|
GCE e2e test build/test passed for commit 5aca495. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e test build/test passed for commit 5aca495. |
Automatic merge from submit-queue |
Auto commit by PR queue bot
Automatic merge from submit-queue Kubelet: Add the docker semver back. Fixes #28221. This PR: 1) Add the semver back #20020 2) Remove the code in #20827, because docker 1.8 is not officially supported now, and we want to deprecate it. #27208 3) Add a test for docker version comparison. XRef #28223 @yujuhong /cc @ingvagabund [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
Changes broke compatibility with released versions of Docker on some
distributions like Fedora and RHEL (value 1.8.1.fc21 is in the wild).