Project

Profile

Help

Story #2099

Updated by mhrivnak over 7 years ago

As a result of this story, Pulp Docker will support both schema versions, 1 versions. 
 Pulp will request ans store both manifest schema v1 and 2 for sync, publish and copy. v2. 


 To support both schema 1 v1 and 2 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. likely change the Manifest model to include a schema, and any other appropriate changes 
 5. make sure copy operation works with above changes related to Tag model. 
 6. 5. write a migration for Tag model change 
 7. 6. in manifest schema 2 v2 version there is a config array that contains a config blob, which is treated as regular layer. In order to have a runable 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 
 8. change the schema of the crane metadata file to have two manifest lists: one for schema 1, and one for schema 2 
 9. change publish to create the new crane metadata file 

 Note: 
 this work will not enable support for manifest list( aka fat manifest)

Back