Story #2099
Updated by ipanova@redhat.com about 8 years ago
As a result of this story, Pulp Docker will support both schema versions.
Pulp will request ans store both manifest schema v1 and v2.
To support both schema v1 and v2 we need to:
1. during sync always make 2 requests to the registry and in each request set properly the headers.
2. as a result of 2 requests we will have to save to the DB manifest with both schemas.
3. change Tag model and add schema_version field and include it into the unit_key( having 2 instances of tags will facilitate copy operation)
4. make sure copy operation works with above changes related to Tag model.
5. write a migration for Tag model change
6. in manifest schema v2 version there is a config array that contains a config blob, which is treated as regular layer. In order to have a runnable docker image config layer should also be present. That means that we would need to download it and store in the DB. That means that most likely we would need to change Manifest model and add a config layer blob field to it. That means - another migration should be written
7. change the schema of the crane metadata file to have two manifest lists: one for schema 1, and one for schema 2
8. change publish to create the new crane metadata file
9. change crane to look for a optional header from the client and use that to decide whether to return a schema 1 or schema 2 manifest
Note:
this work will not enable support for manifest list( aka fat manifest)