Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structured run output: impose canonical ordering on jsonstate and jsonplan packages #32649

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

liamcervante
Copy link
Member

This is a follow up from a comment left by @apparentlymart on an earlier PR: #32629 (comment)

This PR imposes the "canonical" ordering of addresses on the jsonplan and jsonstate generation packages, so the produced JSON will be ordered according to the Less functions in the addrs package. With this change, the jsonformat package that produces the human readable output from the JSON state and plan outputs does not need to worry about ordering at all as they can simply trust the ordering in the json structures.

I'd be quite happy to close this PR without merging if we don't want to change the public API of the JSON outputs, or I could update the 1.4 changelog with something about the ordering being fixed. I just think if we want to use some kind of canonical ordering it makes sense to do it here, instead of having to convert addresses back into the internal structs after we've already converted them into strings for JSON.

@liamcervante liamcervante force-pushed the liamcervante/json-changes-ordering branch from 26cd87e to fe285de Compare February 9, 2023 08:32
@liamcervante liamcervante added the 1.4-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Feb 9, 2023
@liamcervante liamcervante merged commit d212a72 into main Feb 13, 2023
@liamcervante liamcervante deleted the liamcervante/json-changes-ordering branch February 13, 2023 14:40
@github-actions
Copy link

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
1.4-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants