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

Definitions & terms #9

Merged
merged 6 commits into from
Feb 24, 2020
Merged

Definitions & terms #9

merged 6 commits into from
Feb 24, 2020

Conversation

SteveLasker
Copy link
Contributor

A set of definitions & terms to be used across repos. References can be made as [fingerprint](./definitions-terms.md/#fingerprint)

@SteveLasker
Copy link
Contributor Author

@samuelkarp, an extraction of terms from #6

Copy link

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together. I have a few suggestions, then hopefully we can get this merged and iterate from there.

definitions-terms.md Outdated Show resolved Hide resolved

## Artifact / Image

Artifacts are a generalization of how images are stored in an instance of the [OCI Distribution Spec][oci-distribution-spec]. An [OCI Image][oci-image] is a type of [OCI Artifact][oci-artifact]. When referencing artifacts, within a [fully qualified reference](#registry-fully-qualified-reference), the artifact is right most element of the namespace, combined with the `:tag`.

Choose a reason for hiding this comment

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

the artifact is right most element of the namespace

This isn't really accurate. The right-most element of the name is still just part of the name, and can resolve to anything the registry stores. This could be an index, an image manifest, or an artifact.

We should probably include a definition for a name, referencing the distribution spec:

The rules for a repository name are as follows:

  1. A repository name is broken up into path components. A component of a repository name MUST begin with one or more lowercase alpha-numeric characters. Subsequent lowercase alpha-numeric characters are OPTIONAL and MAY be separated by periods, dashes or underscores. More strictly, it MUST match the regular expression [a-z0-9]+(?:[._-][a-z0-9]+)*.
  2. If a repository name has two or more path components, they MUST be separated by a forward slash ("/").
  3. The total length of a repository name, including slashes, MUST be less than 256 characters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This looks like the definition I wrote for repo, below.

Choose a reason for hiding this comment

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

Can you remove this sentence?

When referencing artifacts, within a fully qualified reference, the artifact is right most element of the namespace, combined with the :tag.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets have this conversation on Monday.

definitions-terms.md Outdated Show resolved Hide resolved
definitions-terms.md Outdated Show resolved Hide resolved
## Registry

A registry is a collection of [OCI Indexes][oci-index] and [OCI Manifestes][oci-manifest] for a specific org or entity.
A unique registry may be uniquely identified with a domain

Choose a reason for hiding this comment

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

Same comment as above about naming; should be broken out into a separate definition that comes from the distribution spec.

![](./media/unique-registry-namespace-ref.png)


## Registry Namespace

Choose a reason for hiding this comment

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

I'd remove this as namespaces are not a specific part of the definition of a name. You could include a definition of a "path component", since that's the term used in the distribution spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are you suggesting we use the term path, instead of namespace? That makes sense. Although, I'd still want to separate the element that doesn't include the artifact name.
Here's the larger post that goes into more detail:
Registry Names, Namespaces, Images, Artifacts & Tags

Choose a reason for hiding this comment

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

"path component" is the terminology used in the distribution spec, so I would bias toward that. I don't really see that we need to describe all of the components of a name, though. It's not clear to me that we need a distinction between "namespaces" and "images", for example. One of the goals of this project is for the signatures to be independent of the location of the images/artifacts, and right now the name is synonymous with the location.

Copy link
Contributor Author

@SteveLasker SteveLasker Feb 24, 2020

Choose a reason for hiding this comment

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

A good conversation for Monday as well.
The issue is what I describe here: https://stevelasker.blog/2020/02/17/registry-namespace-repo-names/

Potential life cycle of the web:v1.0 artifact. In the following example, the same web:v1.0 artifact is copied across several repos, using different namespaces, as it makes it way through production, to an archived state.

  1. org.example.com/dev/blue-team/web:v1.0
  2. org.example.com/staging/marketing/web:v1.0
  3. org.example.com/prod/marketing/web:v1.0
  4. org.example.com/archive/marketing/web:v1.0

We need a way for the web:1.0 artifact to move between repos, while maintaining the same signature.
We've already discussed moving across registries:
org-archive.example.com/marketing/web:v1.0

What I'd like to accomplish is defining the path as a separate element of the artifact. An artifact can move between paths without changing.

I've made some changes to refer to path as the named element, with namespace/sub-namespace as the elements of a path. It just seemed weird to call it path/sub-path and we use namespace quite frequently.

@SteveLasker SteveLasker merged commit 32fa1d3 into notaryproject:master Feb 24, 2020
@SteveLasker SteveLasker deleted the Definitions-&-Terms branch February 24, 2020 02:29
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.

2 participants