compliance-operator icon indicating copy to clipboard operation
compliance-operator copied to clipboard

CMP-3777: Enhance TestManualRulesTailoredProfile to cover 61342 logic

Open xiaojiey opened this issue 1 month ago • 3 comments

  1. Functions already have:
  • Create a TailoredProfile with ManualRules and set kubelet-eviction-thresholds-set-soft-imagefs-available as a manual rule
  • Runs a scan via ScanSettingBinding
  • Verifies the check result shows as MANUAL and should NOT have any associated remediation
  1. Functions added in this PR:
  • Creates a second TailoredProfile with EnableRules
  • Runs a scan via ScanSettingBinding
  • Verifies it shows FAIL (not MANUAL)
  • Verifies remediation should be created
  1. The Added function is optional. We can close this PR if reviewers think it is not needed to add.

xiaojiey avatar Nov 25 '25 07:11 xiaojiey

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xiaojiey

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

openshift-ci[bot] avatar Nov 25 '25 07:11 openshift-ci[bot]

:robot: To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:998-ce963eb1a66c85b4264b312536b7a204c032f260

github-actions[bot] avatar Nov 25 '25 07:11 github-actions[bot]

@xiaojiey: This pull request references CMP-3777 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set.

In response to this:

  1. Functions already have:
  • Create a TailoredProfile with ManualRules and set kubelet-eviction-thresholds-set-soft-imagefs-available as a manual rule
  • Runs a scan via ScanSettingBinding
  • Verifies the check result shows as MANUAL and should NOT have any associated remediation
  1. Functions added in this PR:
  • Creates a second TailoredProfile with EnableRules
  • Runs a scan via ScanSettingBinding
  • Verifies it shows FAIL (not MANUAL)
  • Verifies remediation should be created
  1. The Added function is optional. We can close this PR if reviewers think it is not needed to add.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

openshift-ci-robot avatar Nov 25 '25 08:11 openshift-ci-robot

:robot: To deploy this PR, run the following command:

make catalog-deploy CATALOG_IMG=ghcr.io/complianceascode/compliance-operator-catalog:998-ab96d0e28a5291342c42938d61f1d4fc1ab1395e

github-actions[bot] avatar Dec 03 '25 06:12 github-actions[bot]

/retest

xiaojiey avatar Dec 03 '25 08:12 xiaojiey

/retest

xiaojiey avatar Dec 03 '25 12:12 xiaojiey

@xiaojiey: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-rosa ab96d0e28a5291342c42938d61f1d4fc1ab1395e link true /test e2e-rosa
ci/prow/e2e-aws-serial ab96d0e28a5291342c42938d61f1d4fc1ab1395e link true /test e2e-aws-serial

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Dec 03 '25 16:12 openshift-ci[bot]

LGTM. I have run the original test case without your enhancement and it took 82.38s for the test case to PASS and with this fix it is taking 134.50s to PASS in my cluster. I think that is not much of a time difference so I would vote to merge this PR (if we are voting :slightly_smiling_face: )

Anna-Koudelkova avatar Dec 10 '25 16:12 Anna-Koudelkova