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

experimental changes for referrers API, ORAS artifact manifest support #5

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

aviral26
Copy link

@aviral26 aviral26 commented Aug 20, 2021

This PR addresses a subset of tasks mentioned in #4 and adds experimental changes that support:

  • PUT ORAS Artifact Manifest
  • GET ORAS Artifact Manifest
  • listing referrers (pagination not implemented yet)

Further reading on usage is available at README.md and implementation at docs/referrers.md.

aviral26 and others added 4 commits August 19, 2021 03:00
Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
CI: add oras-project/registry image release
Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
@sajayantony
Copy link

/cc @michaelb990

Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
@SteveLasker
Copy link

@aviral26

Note: this PR will be updated to reference the ORAS artifact manifest spec once oras-project/artifacts-spec#17 is merged.

Can you update the PR text to reflect #17 is merged?

│ └── link
└── 333ic0c33ebc4a74a0a554c86ac2b28ddf3454a5ad9cf90ea8cea9f9e75c333i
└── link
```
Copy link

@sajayantony sajayantony Aug 31, 2021

Choose a reason for hiding this comment

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

Can we support up a configuration that would enable this API?

Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
@sajayantony
Copy link

Draft guidance for submitting changes to upstream -

https://hackmd.io/batGDY9cSnetgdrAmbVm6g

Branches

This follows guidelines similar to Kubernetes changes gets pushed to upstream.

Source Description
oras-project/distribution#main Cut releases through tags
oras-project/distribution#feature_oras_cherrypick Send this to upstream distribution/distribution#main
  1. Actions and other workflow for release will exist in main .
    • oras-release.yaml is an example that will be in the main.
  2. main will have all changes that can be upstreamed to distribution through cherry picking to feature_oras_cherrypick

PR hygiene

  1. PRs to upstream should have a chronological set of commits.
  2. Each commit to upstream MAY squash changes from main to logical reviewable commits
  3. feature_oras_cherrypick should have commits that might be sent to upstream as single or multiple PRs and could be rebased of distribution/distribution#main
  4. Workflow commits should be easily excludable from main to enable easy cherry picking into feature_oras_cherrypick

Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
│ ├── digest(application/vnd.example.artifact)
│ │ └── sha256
│ │ └── 222ibbf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cb222i
│ │ └── link

Choose a reason for hiding this comment

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

Another thought is to have a separate folder for references

v<root>
└── v2
  └── repositories
      └── nginx
          ├── _manifests
          │   └── revisions
          │    └── sha256
          │        ├── 111ma2d22ae5ef400769fa51c84717264cd1520ac8d93dc071374c1be49a111m
          │        │   ├── link
          │        ├── 222ibbf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cb222i
          │        │   └── link
          │        └── 333ic0c33ebc4a74a0a554c86ac2b28ddf3454a5ad9cf90ea8cea9f9e75c333i
          │            └── link
          └── _references			
  	      └── subjects
  		     └── sha256
  	    	         └── 111ma2d22ae5ef400769fa51c84717264cd1520ac8d93dc071374c1be49a111m
  			     ├── digest(application/vnd.example.artifact)
  			     │   └── sha256
  			     │       └── 222ibbf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cb222i
  			     │           └── link <to manifest in _manifests>
  			     └── digest(application/vnd.another.example.artifact)
  				 └── sha256
  				     └── 333ic0c33ebc4a74a0a554c86ac2b28ddf3454a5ad9cf90ea8cea9f9e75c333i
  					└── link <to manifest in _manifests>

Couple of benefits are, it aligns with the current model where separate folder exists for entity type like manifests, tags, layers etc. In the similar fashion references will represent index for all referrers. In addition , if we extend references to layers, this model can still be used except for that the link refers to _layers blob and doesn't need any change to the _layers folder. Also, there will be no change to the existing folders and hence existing systems need not be checked for any unexpected behaviors with this new structure under _manifests.

}

// Validate subject manifest.
subject := dm.SubjectManifest()

Choose a reason for hiding this comment

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

subject is optional, so you may want to check only if it is present

Signed-off-by: Aviral Takkar <aviral26@users.noreply.github.com>
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