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

NDEV-17738 sort before chunking - 1.9 #57

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

pns-nirmata
Copy link

@pns-nirmata pns-nirmata commented Oct 17, 2023

Explanation

Previously, large kyverno reports needed to be split into chunks, used to be refreshed frequently, generally once or so every minute.

Related issue

https://nirmata.atlassian.net/browse/NDEV-17738, and the original issue on Kyverno, kyverno#8520 (that has reproduce steps)

Milestone of this PR

1.95-n4k-nirmata.3

What type of PR is this

/kind bug

Proposed Changes

Earlier, we were sorting report results before creating the policyreport. This change sorts the results before chunking, so that we have a predictable sort order,

Proof Manifests

Tested this by first reproducing this defect on a kwok cluster as described in the original Kyverno ticket. And after fix, ensured that the kubectl -n ns-1 get polr -w does not continuously update.

Checklist

  • I have read the contributing guidelines.
  • I have read the PR documentation guide and followed the process including adding proof manifests to this PR.
  • This is a bug fix and I have added unit tests that prove my fix is effective.
  • This is a feature and I have added CLI tests that are applicable.
  • My PR needs to be cherry picked to a specific release branch which is .
  • My PR contains new or altered behavior to Kyverno and
    • CLI support should be added and my PR doesn't contain that functionality.
    • I have added or changed the documentation myself in an existing PR and the link is:
    • I have raised an issue in kyverno/website to track the documentation update and the link is:

Further Comments

@pns-nirmata pns-nirmata changed the title NDEV-17738 sort before chunking NDEV-17738 sort before chunking - 1.9 Oct 17, 2023
@pns-nirmata
Copy link
Author

pns-nirmata commented Oct 17, 2023

There are some test-cli failures, but these exist on the base release-1.9-n4k branch too. The 1.10 branch has no such failures. The changes are identical. (ref: #58)

Copy link

@JimBugwadia JimBugwadia left a comment

Choose a reason for hiding this comment

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

Should we remove the sort here?

SortReportResults(results)

@pns-nirmata pns-nirmata merged commit 5ecf45f into release-1.9-n4k Oct 18, 2023
6 of 8 checks passed
@anushkamittal2001 anushkamittal2001 deleted the NDEV-17738-large-reports-1.9 branch August 27, 2024 09:27
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.

3 participants