Skip to content

Normalize policy JSON before diffing - #4

Open
mbarbon wants to merge 3 commits into
uber:masterfrom
mbarbon:normalize-policy-json
Open

Normalize policy JSON before diffing#4
mbarbon wants to merge 3 commits into
uber:masterfrom
mbarbon:normalize-policy-json

Conversation

@mbarbon

@mbarbon mbarbon commented Sep 28, 2018

Copy link
Copy Markdown
Contributor

Currently, Astro uses Indent(), which only changes whitespace:
Unmarshal+Marshal is necessary for keys to be sorted.

To avoid confusion, the case when old and new policies are the same
after normalization still shows the field as modified with an explanatory
message, and there is a command-line switch to disable policy diffing.

Indent() only changes whitespace, Unmarshal+Marshal is necessary
for keys to be sorted.
- display the field name before the diff
- special-case the case when there is no difference
  (for example another attribute change is forcing an object recreation)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant