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
Support OCI artifacts #1574
Support OCI artifacts #1574
Commits on Jun 16, 2022
-
Clean up PreserveOriginal comments
One of the is fine, but better placed closer to the reference. The other doesn't relate to that code path at all, and is already documented in types.BlobInfo. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 5e86eb8 - Browse repository at this point
Copy the full SHA 5e86eb8View commit details -
Reformat TestSupported*MediaType
Having each test case streched across four lines doesn't make it any more readable; seeing the test cases on the same screen as the test body is more valuable. Should not change (test) behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for ef4d0e2 - Browse repository at this point
Copy the full SHA ef4d0e2View commit details -
Simplify repetitive code in manifest tests
Add manifestSchema2FromFixture and manifestOCI1FromFixture instead of open-coding the read+decode steps over and over. The tests also fail immediately if they can't use the fixture, instead of somehow trying to continue (and probably crashing). Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 38b1d74 - Browse repository at this point
Copy the full SHA 38b1d74View commit details -
Move getEncryptedMediaType and getDecryptedMediaType closer to the on…
…ly caller ... to make the code a tiny bit easier to follow. Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for bf597f6 - Browse repository at this point
Copy the full SHA bf597f6View commit details -
Reject OCI artifacts in manifest.OCI1.ImageID
... and add tests for the ImageID implementations. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 83aee8f - Browse repository at this point
Copy the full SHA 83aee8fView commit details -
Reject OCI artifacts in manifest.OCI1.Inspect
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for ec3d50b - Browse repository at this point
Copy the full SHA ec3d50bView commit details -
Refuse to convert non-image OCI artifacts to Docker formats
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for e6e1a4f - Browse repository at this point
Copy the full SHA e6e1a4fView commit details -
Reject OCI artifacts in image.manifestOCI1.OCIConfig
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for d24d259 - Browse repository at this point
Copy the full SHA d24d259View commit details -
Pass imageCopier to copyBlobFromStream and blobPipelineCompressionStep
This will allow us to refer to ic.c.cannotModifyManifestReason and image-specific properties; it just replaces the objects without changing the logic. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 2e6896f - Browse repository at this point
Copy the full SHA 2e6896fView commit details -
Move the canModifyBlob decision inside copyBlobFromStream
... to eliminate at least one of the many parameters. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 59bc35e - Browse repository at this point
Copy the full SHA 59bc35eView commit details -
Reorganize copyBlobFromStream a bit
Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 00e7d0f - Browse repository at this point
Copy the full SHA 00e7d0fView commit details -
Add a srcInfo parameter to blobPipelineCompressionStep
We will use it for debug logs. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 83034b5 - Browse repository at this point
Copy the full SHA 83034b5View commit details -
Split findCompressionMIMETypeSet from compressionVariantMIMEType
We will add another user of the lookup code. Erorr messages now use mimeType instead of mt, which were required required to be equal on that code path, now that mt is not visible. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for af70b53 - Browse repository at this point
Copy the full SHA af70b53View commit details -
Introduce SourcedImage.CanChangeLayerCompression, use it in copy.Image
- Don't compress/decompress layers with unknown MIME types, and layers in OCI artifacts. - Don't even change manifest MIME types in these situations, whatever happens. - Don't substitute compressed/uncompressed variants (via TryReusingBlobWithOptions) for OCI artifacts, if we discover the same variants when copying images that refer to the same blobs. Note that this does _not_ restrict compression to algorithms supported by the SourcedImage, because that would prohibit a single-pass conversion from v2s2 to OCI while compressing to zstd [1], and that's a feature we currently exercise in tests. So, this prevents us from failing to copy OCI artifacts, but users of zstd still need to be careful about choosing OCI manually. [1] We would need to ask the _destination_ format handler about zstd, not the source-format SourcedImage, and we don't currently have that infrastructure. It's also not immediately clear how to combine this with the sequence of alternative manifest formats returned by determineManifestConversion. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Configuration menu - View commit details
-
Copy full SHA for 6d458ba - Browse repository at this point
Copy the full SHA 6d458baView commit details