Skip to content
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

Use commit-sha instead of tag for containerd #35770

Merged
merged 1 commit into from
Dec 13, 2017

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Dec 12, 2017

The docker info command compares the installed version
of containerd using a Git-sha. We currently use a tag for
this, but that tag is not returned by the version-API of
containerd, resulting in the docker info output to show:

containerd version: 89623f28b87a6004d4b785663257362d1658a729 (expected: v1.0.0)

This patch changes the v1.0.0 tag to the commit that
corresponds with the tag, so that the docker info output
does not show the expected: string.

This should be considered a temporary workaround; the check
for the exact version of containerd that's installed was needed
when we still used the 0.2.x branch, because it did not have
stable releases yet.

With containerd reaching 1.0, and using SemVer, we can likely
do a comparison for "Major" version, or make this a "packaging"
issue, and remove the check entirely (we can still print the
version that's installed if we think it's usefule).

I can add a test for this

- How to verify it

run docker info and check that the expected: string is not present

- Description for the changelog

* Fix `docker info` showing "expected: v1.0.0" for containerd [moby/moby#35770](https://github.com/moby/moby/pull/35770)

- A picture of a cute animal (not mandatory but encouraged)

@tianon
Copy link
Member

tianon commented Dec 12, 2017

IMO the tag is superior, and this would be a good case for fixing the version comparison code, but I could be convinced. 😇

@thaJeztah
Copy link
Member Author

Yes the tag is certainly more readable (although mutable). The reason I chose this solution for now, is that fixing the version-comparison is only half the problem; the CLI would need an update as well, in which case it won't be resolved for older versions (was thinking of comparing by SHA, but printing a user-friendly version).

We need to have a look at it in a wider context though; as I mentioned, with containerd reaching 1.0, there may no longer be a need to do this strict comparison.

FWIW, vendor check is failing, due to #34758 (comment) 😂

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 👼

Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

LGTM

@dnephin
Copy link
Member

dnephin commented Dec 12, 2017

I guess #35765 will fix the vendor suite

@thaJeztah
Copy link
Member Author

hmf

17:35:40 golang.org/x/oauth2: Err: exit status 128, out: Cloning into '/go/src/github.com/docker/docker/vendor/golang.org/x/oauth2'...
17:35:40 fatal: remote error: internal server error
17:35:40 Build step 'Execute shell' marked build as failure

The `docker info` command compares the installed version
of containerd using a Git-sha. We currently use a tag for
this, but that tag is not returned by the version-API of
containerd, resulting in the `docker info` output to show:

    containerd version: 89623f28b87a6004d4b785663257362d1658a729 (expected: v1.0.0)

This patch changes the `v1.0.0` tag to the commit that
corresponds with the tag, so that the `docker info` output
does not show the `expected:` string.

This should be considered a temporary workaround; the check
for the exact version of containerd that's installed was needed
when we still used the 0.2.x branch, because it did not have
stable releases yet.

With containerd reaching 1.0, and using SemVer, we can likely
do a comparison for "Major" version, or make this a "packaging"
issue, and remove the check entirely (we can still _print_ the
version that's installed if we think it's usefule).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@yongtang
Copy link
Member

All tests passed. Merging..

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

Successfully merging this pull request may close these issues.

6 participants