Skip to content

Commit

Permalink
🐛 Implement sorting on structs when marshaling (#431)
Browse files Browse the repository at this point in the history
Fixes #418 

`demo-output.yaml`'s diff looks really ugly, but all this PR does is
shuffle some stuff around.

With this, we may not the `sed` and `yq` stuff in this workflow anymore:


https://github.com/konveyor/analyzer-lsp/blob/740142ea98dbd39b22a63e2da7bfa2374b86be29/.github/workflows/demo-testing.yml#L20-L25

---------

Signed-off-by: JonahSussman <[email protected]>
  • Loading branch information
JonahSussman authored Nov 17, 2023
1 parent e057ef0 commit fbb596e
Show file tree
Hide file tree
Showing 4 changed files with 1,170 additions and 899 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/demo-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ jobs:
run: |
podman run -v $(pwd)/demo-output.yaml:/analyzer-lsp/output.yaml:Z localhost/testing:latest
diff \
<(sort <(sed 's/incidents\.[0-9]\+/incidents\.x/g' <(yq -P 'sort_keys(..)' -o=props <(git show HEAD:demo-output.yaml)))) \
<(sort <(sed 's/incidents\.[0-9]\+/incidents\.x/g' <(yq -P 'sort_keys(..)' -o=props <(cat demo-output.yaml))))
<(yq -P 'sort_keys(..)' -o=props <(git show HEAD:demo-output.yaml)) \
<(yq -P 'sort_keys(..)' -o=props <(cat demo-output.yaml))
- name: run demo image and ensure dependency output unchanged
run: |
podman run --entrypoint /usr/bin/konveyor-analyzer-dep -v $(pwd)/demo-dep-output.yaml:/analyzer-lsp/demo-dep-output.yaml:Z localhost/testing:latest --output-file=demo-dep-output.yaml
podman run -v $(pwd)/demo-output.yaml:/analyzer-lsp/output.yaml:Z localhost/testing:latest
diff \
<(sort <(sed 's/incidents\.[0-9]\+/incidents\.x/g' <(yq -P 'sort_keys(..)' -o=props <(git show HEAD:demo-dep-output.yaml)))) \
<(sort <(sed 's/incidents\.[0-9]\+/incidents\.x/g' <(yq -P 'sort_keys(..)' -o=props <(cat demo-dep-output.yaml))))
<(yq -P 'sort_keys(..)' -o=props <(git show HEAD:demo-dep-output.yaml)) \
<(yq -P 'sort_keys(..)' -o=props <(cat demo-dep-output.yaml))
- uses: actions/checkout@v3
with:
Expand Down
Loading

0 comments on commit fbb596e

Please sign in to comment.