-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Make Descriptor an alias for oci.Descriptor #3888
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
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #3888 +/- ##
==========================================
- Coverage 56.63% 56.55% -0.08%
==========================================
Files 106 106
Lines 10674 10689 +15
==========================================
Hits 6045 6045
- Misses 3955 3967 +12
- Partials 674 677 +3
☔ View full report in Codecov by Sentry. |
6025946
to
e04a320
Compare
This should be ok to work on now since the dependant PRs have been merged @thaJeztah 😄 |
db42d58
to
8f58718
Compare
One failure;
I went looking where that originated from, and looks to be because the old type had an Lines 70 to 71 in 2314320
Whereas the OCI type does not distribution/vendor/github.com/opencontainers/image-spec/specs-go/v1/descriptor.go Lines 29 to 30 in 2314320
The test creates a manifest; distribution/registry/proxy/proxymanifeststore_test.go Lines 156 to 163 in 2314320
Before this PR that would produce (serialised); {"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.v2+json","config":{"mediaType":"foo/bar","digest":"sha256:96cc58f39ca8bde60ed58ccd0c72538939622537ec53181019f72360ccd0a0c8"},"layers":null} After it produces; {"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.v2+json","config":{"mediaType":"foo/bar","digest":"sha256:96cc58f39ca8bde60ed58ccd0c72538939622537ec53181019f72360ccd0a0c8","size":0},"layers":null} The extra |
Ugh. well. LOL no the different is not 9 characters, but 17 😂 - Let me dig further |
Ah! LOL, well, it helps if you use the right JSON output; this is the one I was looking for;
That's a Before: (length: 257) {
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "foo/bar",
"digest": "sha256:96cc58f39ca8bde60ed58ccd0c72538939622537ec53181019f72360ccd0a0c8"
},
"layers": null
} After: (length: 274) {
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "foo/bar",
"digest": "sha256:96cc58f39ca8bde60ed58ccd0c72538939622537ec53181019f72360ccd0a0c8",
"size": 0
},
"layers": null
} |
8f58718
to
d23f24f
Compare
d23f24f
to
3b4cc0c
Compare
All green now, but moved the first commit to a separate PR; |
Ok #4467 has now been merged. Might wanna open this now I suppose. |
With the removal of the Describable interface from this type, and deprecation of the Versioned type, the Descriptor is now an exact equivalent of the oci.Descriptor. This patch makes Descriptor an alias for oci.Descriptor. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
3b4cc0c
to
92b483e
Compare
Rebased! We should probably look carefully if the omitempty (therefore different length of digest) is something that could cause issues, or if that's OK to ignore within context of these changes. |
Good idea, yeah. We have integration tests set up for S3 driver at least so if the tests pass that should give us confidence this change is 👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Size is required in the spec, so as long as the tests pass I think this is good.
With the removal of the Describable interface from this type, and
deprecation of the Versioned type, the Descriptor is now an exact
equivalent of the oci.Descriptor.
This patch makes Descriptor an alias for oci.Descriptor.