openshift / compliance-operator

Operator providing OpenShift cluster compliance checks
Apache License 2.0
110 stars 110 forks source link

Bug 2040282: Fix missing checkType on some rules #774

Closed Vincent056 closed 2 years ago

Vincent056 commented 2 years ago

Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2040282

We had issues where some rules have checkType of None instead of the correct type.

We only set checkType to None if the rule does not have any OVAL test, and we check if the rule has OVAL check by looking up the test definition tables. When we created the rule test definition table, those test definitions that have extended definitions are not included. For rules that have multiple checks, they usually have extended definitions, and therefore the checkType of those rules were set to None instead of Node/Platform

openshift-ci[bot] commented 2 years ago

@Vincent056: This pull request references Bugzilla bug 2040282, which is invalid:

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to [this](https://github.com/openshift/compliance-operator/pull/774): >Bug 2040282: Fix missing checkType on some rules Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Vincent056 commented 2 years ago

/retest

Vincent056 commented 2 years ago

The code looks good and thank you for the quick reply, but could you also extend the existing e2e test with coverage of some rule that was previously broken?

Sorry for the late reply, just added the e2e test to it

jhrozek commented 2 years ago

/test e2e-aws

jhrozek commented 2 years ago

/retest

openshift-bot commented 2 years ago

/retest-required

Please review the full test history for this PR and help us cut down flakes.

openshift-bot commented 2 years ago

/retest-required

Please review the full test history for this PR and help us cut down flakes.

Vincent056 commented 2 years ago

@jhrozek I set the expected checkType wrong, just corrected to Node instead.

openshift-ci[bot] commented 2 years ago

@Vincent056: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci[bot] commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhrozek, Vincent056

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: - ~~[OWNERS](https://github.com/openshift/compliance-operator/blob/master/OWNERS)~~ [Vincent056,jhrozek] 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] commented 2 years ago

@Vincent056: All pull requests linked via external trackers have merged:

Bugzilla bug 2040282 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/compliance-operator/pull/774): >Bug 2040282: Fix missing checkType on some rules Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.