Add architecture validation to manifest lists that contain schema 1 manifests
Fixes https://jira.coreos.com/browse/QUAY-1266
This commit is contained in:
		
							parent
							
								
									b5a5ce7c43
								
							
						
					
					
						commit
						f0f2d9cdf4
					
				
					 9 changed files with 110 additions and 6 deletions
				
			
		|  | @ -74,8 +74,15 @@ def get_or_create_manifest(repository_id, manifest_interface_instance, storage): | |||
| 
 | ||||
| 
 | ||||
| def _create_manifest(repository_id, manifest_interface_instance, storage): | ||||
|   # Load, parse and get/create the child manifests, if any. | ||||
|   # Validate the manifest. | ||||
|   retriever = RepositoryContentRetriever.for_repository(repository_id, storage) | ||||
|   try: | ||||
|     manifest_interface_instance.validate(retriever) | ||||
|   except (ManifestException, MalformedSchema2ManifestList, BlobDoesNotExist, IOError): | ||||
|     logger.exception('Could not validate manifest `%s`', manifest_interface_instance.digest) | ||||
|     return None | ||||
| 
 | ||||
|   # Load, parse and get/create the child manifests, if any. | ||||
|   child_manifest_refs = manifest_interface_instance.child_manifests(retriever) | ||||
|   child_manifest_rows = {} | ||||
|   child_manifest_label_dicts = [] | ||||
|  |  | |||
		Reference in a new issue