-
Notifications
You must be signed in to change notification settings - Fork 671
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
Introduce a script to compare ComplianceAsCode versions #10768
Conversation
Skipping CI for Draft Pull Request. |
I suggest decoupling the difference representation and the text interpretation of thereof. That way, not only will it be possible to test the code, but tweaks to the output won't interfere with the code doing other things. |
0ac6757
to
5a1886f
Compare
I have rebased this PR on the top of the latest upstream master branch. |
This commit introduces a new script compare_versions.py which can show differences between two ComplianceAsCode versions. Lists added or removed rules, profiles, changes in profile composition and changes in remediations and platforms. For comparison, you can use git tags or ComplianceAsCode JSON manifest files directly. This new feature leverages the ComplianceAsCode JSON manifests, which have been introduced by ComplianceAsCode#10761
By refactoring the code into smaller methods we try to reply to CodeClimate warnings.
969073a
to
59d7280
Compare
I have resolved remaining CodeClimate problem and I have rebased this on the top of the latest upstream master branch. |
Code Climate has analyzed commit 59d7280 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 53.5% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the improvements.
The script works, and is able to demonstrate the potential of manifests. If the concept gains serious traction, it can be improved accordingly, but expending excess resources in this direction wouldn't be smart.
Description:
This PR is blocked by #10761 and will be rebased after it will be merged.
This commit introduces a new script compare_versions.py which can show differences between two ComplianceAsCode versions. Lists added or removed rules, profiles, changes in profile composition and changes in remediations and platforms. For comparison, you can use git tags or ComplianceAsCode JSON manifest files directly. This new feature leverages the ComplianceAsCode JSON manifests, which have been introduced by #10761
Rationale:
Helps track changes between content and product.
Review Hints:
To compare 2 ComplianceAsCode JSON manifests, provide the manifest files.
To compare 2 upstream versions, you need to specify the version git tags and a product ID.