Skip to content

Conversation

@thomas-riccardi
Copy link
Contributor

What type of PR is this?
/kind feature
Is it really a feature?

users will notice and come to rely on

Maybe?

What this PR does / why we need it:
Since docker 18.09, the ServerVersion field format changed: the -ce
or -ee suffix disappeared:

  • docker 18.06: 18.06.1-ce
  • docker 18.09: 18.09.0

This was not expected by the docker_validator version regexp, which
assumed newer docker versions ended with -[a-z]{2}.
This made the validator return an error, whereas we expect it to
return only a warning (by recognizing it as a newer but not yet
supported docker version).

This commit relax the version regexp to also recognize 18.09.0.
The docker validator now returns a warning, as tested.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
I did not open or find a related https://github.com/kubernetes/kubernetes issue. Should I open an issue for that?

Initially encountered in minikube: kubernetes/minikube#3323

Special notes for your reviewer:
I am not sure the proposed fix is enough, as the new regexp does not match the whole version: it accepts matches on a substring of the docker version.
This means that it's effectively equivalent to just never check for the -ce/-ee suffixes.

Should I

  1. do nothing more?
  2. simplify the regexp? simply (\d{2}\.\d+\.\d+)
  3. or match the whole version string with ^$? (^\d{2}\.\d+\.\d+(?:-[a-z]{2})?$)

3. would be more strict, but maybe too strict? Maybe some kubernetes deployment rely on the current lax regexp (for example with docker forks identified by an addition version suffix?)?

Does this PR introduce a user-facing change?:

Not sure about the need for a release note or its phrasing.

Recognize newer docker versions without -ce/-ee suffix: 18.09.0

Since docker 18.09, the ServerVersion field format changed: the `-ce`
or `-ee` suffix disappeared:

- docker 18.06: `18.06.1-ce`
- docker 18.09: `18.09.0`

This was not expected by the docker_validator version regexp, which
assumed newer docker versions ended with `-[a-z]{2}`.
This made the validator return an error, whereas we expect it to
return only a warning (by recognizing it as a newer but not yet
supported docker version).

This commit relax the version regexp to also recognize `18.09.0`.
The docker validator now returns a warning, as tested.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 13, 2018
@k8s-ci-robot
Copy link
Contributor

Hi @thomas-riccardi. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 13, 2018
@dims
Copy link
Member

dims commented Nov 13, 2018

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 13, 2018
@neolit123
Copy link
Member

/priority important-soon
/assign
/assign @timothysc

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 13, 2018
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomas-riccardi thank you.
i verified the fix and this should be fine.

/lgtm

// If it's of the new Docker version scheme but didn't match above, it
// must be a newer version than the most recently validated one.
ver := `\d{2}\.\d+\.\d+-[a-z]{2}`
ver := `\d{2}\.\d+\.\d+(?:-[a-z]{2})?`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these checks are not super strict.

i think having this is better than the simplified version \d{2}\.\d+\.\d+
also, we haven't gotten any reports about the previous regexp not being optimal before.
so this change SGTM.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 13, 2018
@neolit123
Copy link
Member

/remove-kind feature
/kind bug

let's call this is a bug.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. and removed kind/feature Categorizes issue or PR as related to a new feature. labels Nov 13, 2018
Copy link
Contributor

@timothysc timothysc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@timothysc timothysc added this to the v1.13 milestone Nov 13, 2018
@timothysc timothysc added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 13, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: thomas-riccardi, timothysc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 48d788d into kubernetes:master Nov 13, 2018
@thomas-riccardi thomas-riccardi deleted the recognize_docker_1809_version branch November 14, 2018 09:17
@thomas-riccardi
Copy link
Contributor Author

Thanks all for the quick responses!

Should this PR be cherry-picked on release branches? Which ones? Who should do that?

I only found https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md which only explains how to do it. Is there more documentation about backports somewhere?

@neolit123
Copy link
Member

neolit123 commented Nov 14, 2018

@thomas-riccardi
hi, we can only backport critical bug fixes and this probably won't be approved by the team.
also, this validation should be currently skippable.

if you have a strong opinion about a cherry pick for 1.12 you can create a proposal in a kubernetes/kubeadm issue.

@thomas-riccardi
Copy link
Contributor Author

@neolit123
OK, it makes sense.
What about kubernetes 1.13? The release-1.13 branch was created a week ago, and I'm not sure about pre-released branches workflow.

@neolit123
Copy link
Member

@thomas-riccardi
currently the branch is synced with master, until the end of code freeze 28th AFAIK.

@thomas-riccardi
Copy link
Contributor Author

@neolit123
OK, I did not see that... (I just discovered that github commit view only list one branch associated with the commit, not all branches containing the commit.)

Thanks for everything!

@luuduchieu
Copy link

This one is fixed on --kubernetes-version="v1.13.0", please enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants