content: change Writer/ReaderAt to take OCI descriptor#2135
content: change Writer/ReaderAt to take OCI descriptor#2135crosbymichael merged 1 commit intocontainerd:masterfrom
Conversation
f290420 to
c9a252a
Compare
There was a problem hiding this comment.
This PR has no impact on gRPC API but changes this behavior.
I believe the previous behavior was bug.
There was a problem hiding this comment.
Does size need to be updated in this case then? The section reader uses the reader at interface which may cause a seek to be performed beyond the size.
There was a problem hiding this comment.
c9a252a to
d4a1dc8
Compare
Codecov Report
@@ Coverage Diff @@
## master #2135 +/- ##
=========================================
- Coverage 45.11% 41.2% -3.91%
=========================================
Files 92 66 -26
Lines 9358 7809 -1549
=========================================
- Hits 4222 3218 -1004
+ Misses 4457 4086 -371
+ Partials 679 505 -174
Continue to review full report at Codecov.
|
|
Can we split out the registry test and contib into a separate PR and focus on the interface change. Feel free to point at that work for justification. |
d4a1dc8 to
e43e873
Compare
There was a problem hiding this comment.
This should take the descriptor as a parameter instead. All cases that I found where this was called it already took a digest from a descriptor before calling.
There was a problem hiding this comment.
This does not look like a correct assumption as a reader is supposed to track previous reads. Likely doesn't appear atm because tests use small blobs.
e43e873 to
32164da
Compare
|
@tonistiigi updated. I changed WriteBlob as well accordingly. |
There was a problem hiding this comment.
Please, no oci descriptor on write.
There was a problem hiding this comment.
See this is wrong: the Descriptor is not for passing optional arguments.
|
In general, this is a problematic change. The content store is supposed to be purely content addressed with no understanding of types. The resolver/fetcher layer is the system to use for handling type aware content operations. |
That does not change. It doesn't change the store but the interface. Types are not stored and are not part of the interface guarantees. It is just a hint that an implementation can take. Data written with a specific digest will always return back for the same digest. It would be problematic if
That's the problem. There are duplicate stacks implemented atm that can't be used together for a lot of useful use-cases nor extended with new implementations. Code for copying content needs to be specific for the implementations and has a separate set of helper functions. Alternatively, this could be implemented with new fetcher/pusher interfaces that bring them to the same functionality of |
3e037b0 to
c878493
Compare
|
Closing temporarily, until we can reach consensus on #2129 |
c878493 to
e7b4553
Compare
|
reopened PR |
There was a problem hiding this comment.
I believe the correct way is to update it in a fork and point the vendor to your fork. We should never do a merge into master without validated vendors.
4178699 to
4d409bf
Compare
4d409bf to
184a351
Compare
There was a problem hiding this comment.
Should we handle the empty ref case now? This looks dangerous with an empty ref and could easily be omitted now.
There was a problem hiding this comment.
updated to require non-empty ref
Signed-off-by: Akihiro Suda <[email protected]>
184a351 to
0f29852
Compare
0f29852 to
533229a
Compare
|
rebased |
|
@stevvooe PTAL? |
533229a to
1f8c612
Compare
|
rebased again |
1f8c612 to
c3ddc1e
Compare
This change allows implementations to resolve the location of the actual data using OCI descriptor fields such as MediaType. No OCI descriptor field is written to the store. No change on gRPC API. Signed-off-by: Akihiro Suda <[email protected]>
c3ddc1e to
d88de4a
Compare
|
rererebased |
|
re-LGTM, let's get this merged because rebasing vendors like that is not fun |
|
LGTM |
| # cri dependencies | ||
| github.com/containerd/cri b68fb075d49aa1c2885f45f2467142666c244f4a | ||
| # #2135: cri is temporarily forked because of circular dependency. will be fixed immediately in a follow-up PR. | ||
| github.com/containerd/cri 6e975823be192ad19f2ce7afcf6c57b88a991c30 https://github.com/AkihiroSuda/cri-containerd.git |
There was a problem hiding this comment.
@AkihiroSuda I spotted this one, but couldn't fine an associated PR in https://github.com/containerd/cri - are you working on this?
There was a problem hiding this comment.
oh! never mind; I see that this was just merged; I looked at the commit-date.
For containerd/containerd#2135 Signed-off-by: Akihiro Suda <[email protected]>
|
opened containerd/cri#799 |
For containerd/containerd#2135 Signed-off-by: Akihiro Suda <[email protected]>
For containerd/containerd#2135 Signed-off-by: Akihiro Suda <[email protected]>
This change allows implementations to resolve the location of the actual
data using OCI descriptor fields such as MediaType.
No OCI descriptor field is written to the store.
No change on gRPC API.
contrib/registrycontentstore is added as an example usecase of this.(EDIT: will be a separate PR)Signed-off-by: Akihiro Suda [email protected]
Close #2129
@tonistiigi @dmcgowan