Skip to content

Conversation

@wking
Copy link
Contributor

@wking wking commented Oct 6, 2016

In the --version output.

I expect image-tools to support a range of spec versions, not just a single one. For example, once image-spec cuts 2.0, image-tools should still be able to process 1.x images for some reasonable deprecation period. image-spec is setting us up for that possibility by using the v1 package for the Go types that are likely to change. And SemVer means that if we can unpack a 1.3 image, we can also unpack 1.2, 1.1, and 1.0 images. So I think we want this to be printing, uh:

specs: 0.3.0-dev

now. Once we bump our vendored library to catch up with opencontainers/image-spec#354, we should be showing:

specs: 1.0.0-rc1

Once 1.0 is cut we should show:

specs: 1.0.0

Once 1.1 is cut we should show our position in the 1.x series:

specs: 1.1.0

And then when 2.0 is cut we should show our positions in both the 1.x and 2.x series. If 2.0 happened after 1.1 (without a 1.2, etc.), that would be:

specs: 1.1.0, 2.0.0

Spun off from here.

@xiekeyang
Copy link
Contributor

Maybe we had better to announce in README that image tool support downward compatibility for spec, instead of listing series of versions.

specs: 1.1.0, 2.0.0
How can we get many versions? I worry that it will confuse consumers.

@wking
Copy link
Contributor Author

wking commented Nov 9, 2016

On Tue, Nov 08, 2016 at 07:59:59PM -0800, xiekeyang wrote:

Maybe we had better to announce in README that image tool support
downward compatibility for spec
, instead of listing series of
versions.

I don't think we plan on supporting 1.0 forever. I also don't expect
a hard cut-over from 1.x to 2.0. Are there no plans for supporting
both 1.x and 2.0 for some transition period? Or is the plan to never
hit 2.0? ;).

specs: 1.1.0, 2.0.0

How can we get many versions? I worry that it will confuse
consumers.

It doesn't seem that confusing to me. Eventually image-spec makes a
backwards incompatable change and cuts 2.0. I expect folks with 1.x
images to have a gentle migration path. The “specs:” line makes it
clear that that image-tools build continues to support their images.

If, instead, they see:

spec: 2.0.0

it's less clear to me what a user with a 1.x image will do. Do they
optimistically attempt to pull/unpack? Do they take a look in the
README for a backwards compat plan? Neither of those sounds
particularly user-friendly to me.

@vbatts
Copy link
Member

vbatts commented Feb 14, 2017

but it is only the image-spec. This seems confusing. If there are multiple versions covered, it is not different specs per se.

@wking
Copy link
Contributor Author

wking commented Feb 14, 2017 via email

@vbatts
Copy link
Member

vbatts commented Feb 14, 2017 via email

@wking
Copy link
Contributor Author

wking commented Feb 14, 2017 via email

@zhouhao3
Copy link

zhouhao3 commented Jul 11, 2017

version option has benn changed, and spec is no longer used, so closing this.

@zhouhao3 zhouhao3 closed this Jul 11, 2017
@wking
Copy link
Contributor Author

wking commented Jul 11, 2017 via email

@zhouhao3 zhouhao3 reopened this Jul 11, 2017
@zhouhao3
Copy link

@wking I think you can add the spec/specs in version option information, and then we talk about whether it is feasible.

This shows up in the --help output.

I expect image-tools to support a range of image-spec versions, not
just a single one.  For example, once image-spec cuts 2.0, image-tools
should still be able to process 1.x images for some reasonable
deprecation period.  image-spec is setting us up for that possibility
by using the v1 package for the Go types that are likely to change.
And SemVer means that if we can unpack a 1.3 image, we can also unpack
1.2, 1.1, and 1.0 images.  So I think we want this to be printing:

  * OCI Image Format Specification: 1.0.0-rc5

now.  Once 1.0 is cut we should show:

  * OCI Image Format Specification: 1.0.0

Once 1.1 is cut we should show our position in the 1.x series:

  * OCI Image Format Specification: 1.1.0

And then when 2.0 is cut we should show our positions in both the 1.x
and 2.x series.  If 2.0 happened after 1.1 (without a 1.2, etc.), that
would be:

  * OCI Image Format Specification: 1.1.0, 2.0.0

I see less need to support multiple runtime-spec formats, since
they're only used in 'oci-image-tool create ...'.  But the approach I
used for image-spec ports well to runtime-spec, so I've listed a
version for it too.

Signed-off-by: W. Trevor King <[email protected]>
@wking wking force-pushed the plural-versions branch from 5157b15 to aad3305 Compare July 11, 2017 07:58
@wking wking changed the title cmd/*/main.go: Change "spec:" -> "specs:" cmd/oci-image-tool/main.go: Add description with supported versions Jul 11, 2017
@wking
Copy link
Contributor Author

wking commented Jul 11, 2017

Rebased around #103 with 5157b15aad3305, and now output looks like:

$ ./oci-image-tool --help
NAME:
   oci-image-tool - OCI (Open Container Initiative) image tools

USAGE:
   oci-image-tool [global options] command [command options] [arguments...]

VERSION:
   0.2.0-dev commit: aad33053bc134ea29484856c85413a64b01a2583

DESCRIPTION:
   Tools for working with OCI images.  Currently supported specifications are:

   * OCI Image Format Specification: 1.0.0-rc5
   * OCI Runtime Specification: 1.0.0-rc5
…

@wking
Copy link
Contributor Author

wking commented Jul 11, 2017

Travis failed with:

$ make lint
checking lint
WARNING: vet: no files to lint
WARNING: vetshadow: no files to lint
make: *** [lint] Error 2
The command "make lint" exited with 2.

but master is failing the same way, so I expect that failure is orthogonal to this commit.

@Mashimiao
Copy link

@wking restarted CI, seems good. Please rebase your PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants