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

ref file name identical to tag #327

Merged
merged 1 commit into from
Sep 27, 2016
Merged

ref file name identical to tag #327

merged 1 commit into from
Sep 27, 2016

Conversation

xiekeyang
Copy link
Contributor

The ref file name should be identical to tag it presents, from implementation side. And this had better to be amended in Implementor's Note section.

Signed-off-by: xiekeyang xiekeyang@huawei.com

@wking
Copy link
Contributor

wking commented Sep 19, 2016

On Mon, Sep 19, 2016 at 03:50:21AM -0700, xiekeyang wrote:

The ref file name should be identical to tag it presents, from
implementation side.

This is not true. See moby/moby#25779, which currently defaults
to “have the ref match the tag” but lets you override that default to
use any tag you like. If you require the ref to match the tag,
storing multiple images in a single oci-layout becomes confusing
(always) or impossible (when both images use the same tag).

@xiekeyang
Copy link
Contributor Author

@wking

If you require the ref to match the tag,
storing multiple images in a single oci-layout becomes confusing
(always) or impossible (when both images use the same tag).

Here I'm unclear to both images use the same tag. Can you present a example?
Normally the layout is like:

.
├── blobs
│   └── sha256
│       ├── 2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749
│       ├── 8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f
│       └── cf51ed98e7bdfd2a0dcd8dba91947e409b015a7582d0ac4703cf6338021e83b9
└── refs
    ├── latest
    └── v2.0

What is the layout for same tag case? Do you mean a layout includes images: hello-world:latest and busybox:latest ?

@wking
Copy link
Contributor

wking commented Sep 20, 2016

On Tue, Sep 20, 2016 at 02:09:19AM -0700, xiekeyang wrote:

What is the layout for same tag case? Do you mean a layout includes
images: hello-world:latest and busybox:latest ?

Yeah. The example @stevvooe gives in moby/moby#25779 is to have
refs for both redis:latest and alpine:latest in the same image-layout
tarball.

@stevvooe
Copy link
Contributor

@wking I think we can add language to this effect that makes the common ref-tag mapping clear but allows for other mappings.

@wking
Copy link
Contributor

wking commented Sep 20, 2016

On Tue, Sep 20, 2016 at 12:06:28PM -0700, Stephen Day wrote:

@wking I think we can add language to this effect that makes the
common ref-tag mapping clear but allows for other mappings.

I think the “In the wild…” line below already makes this use case
pretty clear, and would rather avoid “are identical to” for clarifying
a common use case when tags/refs are not identical in general. But
I'm open to other rewordings of this line. How about:

A common use case is to use “tag” names as refs.

which repaces the current “representing” with “use… as”.

@xiekeyang
Copy link
Contributor Author

@wking @stevvooe
Fix it. How about new languages?
with using "tag" as ref file names is just A common use case.
which is(not MUST) identical to ref file names is in the case of you often see.
Consumers can be clear how to use it, and regard it as common case.

For example, an image may have a tag for different versions or builds of the software.
In the wild you often see "tags" like "v1.0.0-vendor.0", "2.0.0-debug", etc.
In the wild you often see "tags" like "v1.0.0-vendor.0", "2.0.0-debug", etc which is(not MUST) identical to ref file names.
Copy link
Contributor

@wking wking Sep 24, 2016

Choose a reason for hiding this comment

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

This still seems a bit awkward to me. This this suggestion is too brief, how about leaving the current there lines as they stand in master to convey (by sentence):

  1. Refs are often used for tags.
  2. Images are often tagged by version or build.
  3. Tags look like {examples}.

Then add an additional sentence to cover your additional point:

Those tags will often be represented in an image-layout repository with matching refs like "v1.0.0-vendor.0”, “2.0.0-debug”, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Signed-off-by: xiekeyang <xiekeyang@huawei.com>
@wking
Copy link
Contributor

wking commented Sep 24, 2016 via email

@xiekeyang
Copy link
Contributor Author

PTAL.

@vbatts
Copy link
Member

vbatts commented Sep 27, 2016

LGTM

Approved with PullApprove

1 similar comment
@stevvooe
Copy link
Contributor

stevvooe commented Sep 27, 2016

LGTM

Approved with PullApprove

@stevvooe stevvooe merged commit 0e2b3f1 into opencontainers:master Sep 27, 2016
@xiekeyang xiekeyang deleted the ref-tag branch November 4, 2016 06:44
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.

4 participants