Skip to content

Commit d8a22cb

Browse files
author
CKI KWF Bot
committed
Merge: [redhat] scripts: sort dumped keys in uki_create_json.py
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7540 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> Approved-by: Vitaly Kuznetsov <vkuznets@redhat.com> Approved-by: Jan Stancek <jstancek@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 6076e8d + 66e8bd7 commit d8a22cb

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)