Skip to content

Commit 66e8bd7

Browse files
committed
[redhat] scripts: sort dumped keys in uki_create_json.py
JIRA: INTERNAL The order of the keys in the json output may change causing unnecessary churn in the dist-git diffs. Fix this by setting sort_keys=True in the json.dump() call. Outside of locale sorting differences this should provide a more stable experience. Signed-off-by: Patrick Talbert <ptalbert@redhat.com> (cherry picked from commit 4fcf24df7f4ed4a55c5e51f9f631f1ebb07c86f6) Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
1 parent df37740 commit 66e8bd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redhat/scripts/uki_addons/uki_create_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def create_json(addons):
8686

8787
def write_json(obj, dest_file):
8888
with open(dest_file, 'w') as f:
89-
json.dump(obj , f, indent=4)
89+
json.dump(obj , f, indent=4, sort_keys=True)
9090
print(f'Processed addons files are in {dest_file}')
9191

9292
if __name__ == "__main__":

0 commit comments

Comments
 (0)