Merge branch 'newchanges' into python-registry-v2
This commit is contained in:
		
						commit
						7efa6265bf
					
				
					 6 changed files with 26 additions and 44 deletions
				
			
		|  | @ -154,10 +154,7 @@ class RepositoryTagImages(RepositoryParamResource): | |||
|       image_map[str(image.id)] = image | ||||
| 
 | ||||
|     image_map_all = dict(image_map) | ||||
| 
 | ||||
|     parents = list(parent_images) | ||||
|     parents.reverse() | ||||
|     all_images = [tag_image] + parents | ||||
|     all_images = [tag_image] + list(parent_images) | ||||
| 
 | ||||
|     # Filter the images returned to those not found in the ancestry of any of the other tags in | ||||
|     # the repository. | ||||
|  |  | |||
|  | @ -396,7 +396,7 @@ def get_image_ancestry(namespace, repository, image_id, headers): | |||
|   parents = model.image.get_parent_images(namespace, repository, image) | ||||
| 
 | ||||
|   ancestry_docker_ids = [image.docker_image_id] | ||||
|   ancestry_docker_ids.extend([parent.docker_image_id for parent in reversed(parents)]) | ||||
|   ancestry_docker_ids.extend([parent.docker_image_id for parent in parents]) | ||||
| 
 | ||||
|   # We can not use jsonify here because we are returning a list not an object | ||||
|   response = make_response(json.dumps(ancestry_docker_ids), 200) | ||||
|  | @ -519,7 +519,7 @@ def process_image_changes(namespace, repository, image_id): | |||
|   parent_trie_path = None | ||||
|   if parents: | ||||
|     parent_trie_path, parent_locations = process_image_changes(namespace, repository, | ||||
|                                                                parents[-1].docker_image_id) | ||||
|                                                                parents[0].docker_image_id) | ||||
| 
 | ||||
|   # Read in the collapsed layer state of the filesystem for the parent | ||||
|   parent_trie = changes.empty_fs() | ||||
|  |  | |||
|  | @ -29,11 +29,7 @@ def _open_stream(formatter, namespace, repository, tag, synthetic_image_id, imag | |||
|   # the database. | ||||
|   with database.UseThenDisconnect(app.config): | ||||
|     image_list = list(model.image.get_parent_images(namespace, repository, repo_image)) | ||||
|     image_list.append(repo_image) | ||||
| 
 | ||||
|     # Note: The image list ordering must be from top-level image, downward, so we reverse the order | ||||
|     # here. | ||||
|     image_list.reverse() | ||||
|     image_list.insert(0, repo_image) | ||||
| 
 | ||||
|   def get_next_image(): | ||||
|     for current_image in image_list: | ||||
|  |  | |||
		Reference in a new issue