Skip to content

Commit 9b9ccd9

Browse files
author
CKI Backport Bot
committed
[redhat] scripts: sort dumped keys in uki_create_json.py
JIRA: https://issues.redhat.com/browse/RHEL-91668 commit 1abe0b0e2c15654556a506a6cd82d887673436ac Author: Patrick Talbert <[email protected]> Date: Fri Apr 4 16:24:22 2025 +0200 [redhat] scripts: sort dumped keys in uki_create_json.py 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 <[email protected]> Signed-off-by: CKI Backport Bot <[email protected]>
1 parent 3162dd5 commit 9b9ccd9

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)