Commit graph

14 commits

Author SHA1 Message Date
Joseph Schorr
bacf074219 Fix backfills of super large manifests by stripping metadata from all but the final layer
This is semantically valid because Docker only uses the leaf layer as the image config when reading a V2_1 manifest

Fixes https://jira.coreos.com/browse/QUAY-1351
2019-02-20 12:08:20 -05:00
Joseph Schorr
097311f360 Handle additional error cases in the manifest schema 1 implementation 2019-02-06 11:41:50 -05:00
Joseph Schorr
c1ac12ff8d Some small cleanup to the tag backfill worker 2019-01-21 13:37:11 -05:00
Joseph Schorr
eb9ca8e8a8 Fix handling of four byte utf8 manifests
- Adds the charset: utf-8 to all the manifest responses
- Makes sure we connect to MySQL in utf8mb4 mode, to ensure we can properly read and write 4-byte utf8 strings
- Adds tests for all of the above
2019-01-10 16:34:56 -05:00
Joseph Schorr
171c7e5238 Further fixes for unicode handling in manifests
We were occasionally trying to compute schema 2 version 1 signatures on the *unicode* representation, which was failing the signature check. This PR adds a new wrapper type called `Bytes`, which all manifests must take in, and which handles the unicodes vs encoded utf-8 stuff in a central location. This PR also adds a test for the manifest that was breaking in production.
2019-01-09 15:14:41 -05:00
Joseph Schorr
feee49be9e Ensure we encode the config in manifest schema 2 via the canonical JSON format 2018-12-18 14:52:19 -05:00
Joseph Schorr
48e584905a Make sure to decode manifests into utf-8 when necessary
This fixes a decoding error
2018-12-17 16:31:24 -05:00
Joseph Schorr
4e1ff90cb2 Unify the get_layers calls across all implements of manifest schemas to ensure we have a common type returned
Also renames some methods to make it more clear what kind of information they return
2018-11-26 17:58:48 +02:00
Joseph Schorr
e344d4a5cf Enhancements for Docker schema implementations in preparing for supporting schema 2 in the OCI model
This adds additional required properties and methods to the Docker schema interface to allow us to treat both schema1 and schema2 manifests and lists logically equivalent from the OCI mode perspective
2018-11-12 23:27:01 +02:00
Joseph Schorr
c92294c218 Add compressed_size to both schema formats on their layers 2018-08-29 16:38:54 -04:00
Joseph Schorr
7fa3506723 Add created_datetime to schema1 format 2018-08-27 18:03:58 -04:00
Joseph Schorr
fa58f3b1d2 Fix handling of manifests with unicode in the backfill
Also adds a bunch of tests around manifests to ensure we get the same information in and out
2018-08-15 11:41:15 -04:00
Joseph Schorr
a73cd9170a Add schema2 list support 2018-06-15 16:00:39 -04:00
Joseph Schorr
4bd70eab3c Add basic tests for schema1 2018-06-15 16:00:39 -04:00