From 9474fb783340abac43e58dbab4f77554762c142c Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 13 Nov 2018 16:50:13 +0200 Subject: [PATCH] Fix bug with `json.dumps` changing the order of keys We write the literal received JSON string into the image data, to ensure the checksums computed will always match --- data/registry_model/manifestbuilder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/registry_model/manifestbuilder.py b/data/registry_model/manifestbuilder.py index ce8d6d95b..065093d72 100644 --- a/data/registry_model/manifestbuilder.py +++ b/data/registry_model/manifestbuilder.py @@ -122,7 +122,7 @@ class _ManifestBuilder(object): model.image.set_image_metadata(layer_id, namespace_name, repo_name, v1_metadata.get('created'), v1_metadata.get('comment'), - command, json.dumps(v1_metadata), + command, v1_metadata_string, parent=parent_image) # Save the changes to the builder.