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

feat: Deduplicate exceptions workflow #332

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

doronkg
Copy link
Contributor

@doronkg doronkg commented Jul 24, 2024

What this PR does / why we need it?

This PR removes exception duplications found in JSONs under pkg/kor/exceptions.
In addition, it enhances the CI workflow to discover exceptions and dedup them.

Examples:

$ make validate-exception-duplications
The following JSON files contain duplications:
        pkg/kor/exceptions/clusterroles/clusterroles.json
        pkg/kor/exceptions/storageclasses/storageclasses.json
        pkg/kor/exceptions/configmaps/configmaps.json
        pkg/kor/exceptions/crds/crds.json
Run the following command to deduplicate all files recursively: make dedup-exception-files

PR Checklist

  • This PR adds K8s exceptions (false positives)
  • This PR adds new code
  • This PR includes tests for new/existing code
  • This PR adds docs

GitHub Issue

Closes #309

Notes for your reviewers

Renamed exceptions-json-sort.yml to validate-exception-jsons to be more generic for future related actions.

@doronkg doronkg changed the title Feat/dedup exceptions feat: Deduplicate exceptions workflow Jul 24, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.39%. Comparing base (01ce4a6) to head (4997aa0).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #332   +/-   ##
=======================================
  Coverage   42.39%   42.39%           
=======================================
  Files          61       61           
  Lines        3236     3236           
=======================================
  Hits         1372     1372           
  Misses       1644     1644           
  Partials      220      220           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good
One suggestion to test

Makefile Outdated Show resolved Hide resolved
@yonahd
Copy link
Owner

yonahd commented Jul 25, 2024

Lgtm

@yonahd yonahd merged commit 93e7d80 into yonahd:main Jul 25, 2024
2 checks passed
@doronkg doronkg deleted the feat/dedup-exceptions branch July 25, 2024 17:58
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.

chore: Remove exception duplications
3 participants