feat: Add simple output to allow consitent machine readable output - #531
feat: Add simple output to allow consitent machine readable output#531tonur wants to merge 45 commits into
Conversation
…ce it was used everywhere else
…angedEntriesReport
|
Waiting for #527 to be completed before this is implemented. |
…es in a multi document file
…: true" in compareAgainstExpectedHuman
…o add-simple-output
…o add-simple-output
….T with Ginkgo and improving output normalization
…o add-simple-output
|
After #527 was completed, this would also be an immense help to me. This change will close #525 Would this be something you'd be willing to accept? @HeavyWombat |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #531 +/- ##
==========================================
+ Coverage 82.32% 84.10% +1.77%
==========================================
Files 17 18 +1
Lines 1765 2019 +254
==========================================
+ Hits 1453 1698 +245
- Misses 236 248 +12
+ Partials 76 73 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2123c94 to
10bd969
Compare
|
Any chance you'd be accepting this @HeavyWombat? :D |
Hi @tonur, I am coming back to some of the pending PRs of |
|
@HeavyWombat thanks for following up on this! Take fx the files from assets/issues/issue-525/: What I want is to specify a flag, which I have called "--simple-list-diff --changed-entries", and then make dyff only output the changed entries on that list. (Note that it should probably just be a singular flag called "--output pure-yaml" or stuff like that.) name: a-type-of-file
allowed:
- digest: "sha256:1111111111111111111111111111111111111111111111111111111111111111"
image: name/container
registry: ghcr.io
tag: 1.2.4
field:
- test
- digest: "sha256:22222222222222222222222222222222222222222222222222222222222222222"
image: yes/i-am-an-image
registry: docker.io
tag: 1.2.4-test_with.symbols
- digest: "sha256:4444444444444444444444444444444444444444444444444444444444444444"
image: oh-look/another-flaky
registry: quay.io
tag: 3.1.2-test-with-dashes
- digest: "sha256:0000000000000000000000000000000000000000000000000000000000000000"
image: you-would-not/guess
registry: docker.io
tag: 1.3.2
- digest: "sha256:6666666666666666666666666666666666666666666666666666666666666666"
image: additional/image
registry: new.io
tag: 9.8.7The important part is that the output is machine readable, so that I can use it for automation and run a CI/CD pipeline that handles only the modified entries. Does that explain it? |




Closes #525
This pull request introduces a new option for generating simplified list diffs and refactors the comparison logic for named lists to improve determinism and flexibility. It also adds a utility for comparing YAML nodes, and makes some targeted improvements to output formatting and CLI options.
Feature: Simple List Diff Option
--simple-list-diff(and corresponding field inreportConfig) to allow users to toggle between detailed per-entry diffs and a simple overview (added/removed) for named lists. The flag is wired through the CLI, configuration, and core comparison logic. [1] [2] [3] [4] [5] [6]Output: Diff Formatting Enhancements