Skip to content

Conversation

@rhmdnd
Copy link
Contributor

@rhmdnd rhmdnd commented Sep 19, 2025

We recently refactored the ocp4e2e testing to support more test cases,
in particular for running all node and platform rules. This means just
running all go tests can have adverse side-effects if we only want to
test a specific profile.

This commit removes unused variables or variables that are redundant
with the defaults, and adjusts the test filtering so that profile tests
only run TestProfileRemediation, maintaining the older behavior of just
running a single profile on a cluster to assess it's compliance posture.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2025
@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 19, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@yuumasato
Copy link
Contributor

@rhmdnd What do you think of waiting to see how #69120 goes before merging this one?

Otherwise /lgtm

@rhmdnd rhmdnd force-pushed the update-cac-content-profile-testing-command branch from 3e10065 to b845c65 Compare September 23, 2025 21:23
@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 23, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 24, 2025

Rebasing to pull in #69499

@rhmdnd rhmdnd force-pushed the update-cac-content-profile-testing-command branch from b845c65 to 46971ed Compare September 24, 2025 13:19
@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 24, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 27, 2025

ComplianceAsCode/ocp4e2e#61 will need to land before this will pass rehearsals since it has the make file target to install jq - which some of the manual remediations need.

@rhmdnd rhmdnd force-pushed the update-cac-content-profile-testing-command branch from 53a2dee to 7fe0b16 Compare September 29, 2025 18:14
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2025
@rhmdnd rhmdnd force-pushed the update-cac-content-profile-testing-command branch from 7fe0b16 to 66a2b1b Compare September 29, 2025 18:20
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2025
@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 29, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot
Copy link
Contributor

@rhmdnd, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

could not load configuration from base revision of release repo: could not checkout worktree: '[git checkout 77685c88ef9a3e3f666ce43ad922a044410661d5]' failed with out:  and error exec: Stdout already set
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 29, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot
Copy link
Contributor

@rhmdnd, pj-rehearse: unable to determine affected jobs. This could be due to a branch that needs to be rebased. ERROR:

could not load configuration from base revision of release repo: could not checkout worktree: '[git checkout 77685c88ef9a3e3f666ce43ad922a044410661d5]' failed with out:  and error exec: Stdout already set
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

pushd ocp4e2e
go test . -run=^TestPlatformCompliance$ -test-type="platform" -content-image="$CONTENT_IMAGE" -content-directory=$PWD
pushd ocp4e2e; make install-jq
PATH=$PATH:/tmp/bin go test . -run=^TestPlatformCompliance$ -test-type="platform" -content-image="$CONTENT_IMAGE" -content-directory=$PWD
Copy link
Contributor Author

Choose a reason for hiding this comment

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

missed these ones.

@rhmdnd rhmdnd force-pushed the update-cac-content-profile-testing-command branch from 66a2b1b to 864d7fd Compare September 29, 2025 21:59
export ROOT_DIR=$PWD
git clone https://github.com/ComplianceAsCode/ocp4e2e.git ocp4e2e
pushd ocp4e2e
go test -v -timeout 120m github.com/ComplianceAsCode/ocp4e2e -profile="$PROFILE" -product="$PRODUCT" -content-image="$CONTENT_IMAGE"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I might not need to rip out the content image here... that might be fine to leave.

@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 29, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 30, 2025

Need to revert the content ds variable change - that obviously didn't work the way I thought it did:

2025/09/29 23:16:24 Using content image for testing: ocp4-content-ds
2025/09/29 23:16:24 ProfileBundle e2e-rhcos4 created/updated successfully
2025/09/29 23:16:24 ProfileBundle e2e-ocp4 created/updated successfully
2025/09/29 23:16:24 waiting for ProfileBundle e2e-ocp4 to parse: e2e-ocp4 ProfileBundle is in  state
2025/09/29 23:16:29 waiting for ProfileBundle e2e-ocp4 to parse: e2e-ocp4 ProfileBundle is in  state
2025/09/29 23:16:34 waiting for ProfileBundle e2e-ocp4 to parse: e2e-ocp4 ProfileBundle is in  state
2025/09/29 23:16:39 waiting for ProfileBundle e2e-ocp4 to parse: e2e-ocp4 ProfileBundle is in INVALID state
2025/09/29 23:16:44 waiting for ProfileBundle e2e-ocp4 to parse: e2e-ocp4 ProfileBundle is in INVALID state

We recently refactored the ocp4e2e testing to support more test cases,
in particular for running all node and platform rules. This means just
running all go tests can have adverse side-effects if we only want to
test a specific profile.

This commit removes unused variables or variables that are redundant
with the defaults, and adjusts the test filtering so that profile tests
only run TestProfileRemediation, maintaining the older behavior of just
running a single profile on a cluster to assess it's compliance posture.
It also ensure jq is installed and available for the test suite to use,
since some of the tests require manual remediations, and use jq to parse
information from the openshift client.

Remove 4.13 and 4.15 CI since those versions are no longer supported.
@rhmdnd rhmdnd force-pushed the update-cac-content-profile-testing-command branch from 864d7fd to a662455 Compare September 30, 2025 01:05
@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 30, 2025

/pj-rehearse

@openshift-ci-robot
Copy link
Contributor

@rhmdnd: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot
Copy link
Contributor

[REHEARSALNOTIFIER]
@rhmdnd: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-bsi ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-bsi-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-cis ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-cis-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-e8 ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-high ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-high-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-moderate ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-moderate-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-pci-dss ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-pci-dss-4-0 ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-pci-dss-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-pci-dss-node-4-0 ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-stig ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-stig-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-rhcos4-bsi ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-rhcos4-e8 ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-rhcos4-high ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-rhcos4-moderate ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-rhcos4-stig ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-rosa-ocp4-cis-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.19-e2e-rosa-ocp4-pci-dss-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.14-e2e-aws-ocp4-bsi ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.14-e2e-aws-ocp4-bsi-node ComplianceAsCode/content presubmit Ci-operator config changed
pull-ci-ComplianceAsCode-content-master-4.14-e2e-aws-ocp4-pci-dss-4-0 ComplianceAsCode/content presubmit Ci-operator config changed

A total of 155 jobs have been affected by this change. The above listing is non-exhaustive and limited to 25 jobs.

A full list of affected jobs can be found here

Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 30, 2025

@rhmdnd: 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/rehearse/ComplianceAsCode/content/master/4.16-e2e-aws-ocp4-cis 3e10065 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.16-e2e-aws-ocp4-cis
ci/rehearse/ComplianceAsCode/content/master/4.16-e2e-aws-ocp4-bsi 3e10065 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.16-e2e-aws-ocp4-bsi
ci/rehearse/ComplianceAsCode/content/master/4.16-e2e-aws-ocp4-cis-node 3e10065 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.16-e2e-aws-ocp4-cis-node
ci/rehearse/ComplianceAsCode/content/master/4.16-e2e-aws-ocp4-e8 3e10065 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.16-e2e-aws-ocp4-e8
ci/rehearse/ComplianceAsCode/content/master/4.16-e2e-aws-ocp4-bsi-node 3e10065 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.16-e2e-aws-ocp4-bsi-node
ci/rehearse/ComplianceAsCode/content/master/4.15-e2e-aws-ocp4-cis b845c65 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.15-e2e-aws-ocp4-cis
ci/rehearse/ComplianceAsCode/content/master/4.13-e2e-aws-ocp4-cis 46971ed link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.13-e2e-aws-ocp4-cis
ci/rehearse/ComplianceAsCode/content/master/4.15-e2e-aws-ocp4-e8 b845c65 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.15-e2e-aws-ocp4-e8
ci/rehearse/ComplianceAsCode/content/master/4.13-e2e-aws-ocp4-bsi-node 46971ed link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.13-e2e-aws-ocp4-bsi-node
ci/rehearse/ComplianceAsCode/content/master/4.13-e2e-aws-ocp4-cis-node 46971ed link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.13-e2e-aws-ocp4-cis-node
ci/rehearse/ComplianceAsCode/content/master/4.15-e2e-aws-ocp4-bsi b845c65 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.15-e2e-aws-ocp4-bsi
ci/rehearse/ComplianceAsCode/content/master/4.15-e2e-aws-ocp4-cis-node b845c65 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.15-e2e-aws-ocp4-cis-node
ci/rehearse/ComplianceAsCode/content/master/4.13-e2e-aws-ocp4-e8 46971ed link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.13-e2e-aws-ocp4-e8
ci/rehearse/ComplianceAsCode/content/master/4.15-e2e-aws-ocp4-bsi-node b845c65 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.15-e2e-aws-ocp4-bsi-node
ci/rehearse/ComplianceAsCode/content/master/4.13-e2e-aws-ocp4-bsi 46971ed link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.13-e2e-aws-ocp4-bsi
ci/rehearse/ComplianceAsCode/content/master/e2e-aws-ocp4-cis-arm a662455 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-e2e-aws-ocp4-cis-arm
ci/rehearse/ComplianceAsCode/content/master/4.18-e2e-aws-ocp4-cis-node 864d7fd link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.18-e2e-aws-ocp4-cis-node
ci/rehearse/ComplianceAsCode/content/master/4.19-e2e-aws-ocp4-bsi 66a2b1b link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-bsi
ci/rehearse/ComplianceAsCode/content/master/4.18-e2e-aws-ocp4-cis 864d7fd link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.18-e2e-aws-ocp4-cis
ci/rehearse/ComplianceAsCode/content/master/e2e-aws-ocp4-cis-node a662455 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-e2e-aws-ocp4-cis-node
ci/rehearse/ComplianceAsCode/content/master/4.19-e2e-aws-ocp4-e8 66a2b1b link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-e8
ci/rehearse/ComplianceAsCode/content/master/e2e-aws-ocp4-cis a662455 link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-e2e-aws-ocp4-cis
ci/rehearse/ComplianceAsCode/content/master/4.19-e2e-aws-ocp4-bsi-node 66a2b1b link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-bsi-node
ci/rehearse/ComplianceAsCode/content/master/4.19-e2e-aws-ocp4-cis 66a2b1b link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-cis
ci/rehearse/ComplianceAsCode/content/master/4.18-e2e-aws-ocp4-bsi 864d7fd link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.18-e2e-aws-ocp4-bsi
ci/rehearse/ComplianceAsCode/content/master/4.19-e2e-aws-ocp4-cis-node 66a2b1b link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.19-e2e-aws-ocp4-cis-node
ci/rehearse/ComplianceAsCode/content/master/4.18-e2e-aws-ocp4-bsi-node 864d7fd link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.18-e2e-aws-ocp4-bsi-node
ci/rehearse/ComplianceAsCode/content/master/4.18-e2e-aws-ocp4-e8 864d7fd link unknown /pj-rehearse pull-ci-ComplianceAsCode-content-master-4.18-e2e-aws-ocp4-e8

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.

Copy link
Contributor

@yuumasato yuumasato left a comment

Choose a reason for hiding this comment

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

/lgtm

Nice, scans are running now.
I just noticed this in the logs:

=== RUN   TestProfileRemediations
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
Detected at:
	>  goroutine 31 [running]:
	>  runtime/debug.Stack()
	>  	/usr/lib/golang/src/runtime/debug/stack.go:26 +0x5e
	>  sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go:60 +0xcd
	>  sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0xc00006b9c0, {0x18ac3b2, 0x14})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go:147 +0x3e
	>  github.com/go-logr/logr.Logger.WithName({{0x1b3dcd0, 0xc00006b9c0}, 0x0}, {0x18ac3b2?, 0xc000695ca8?})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/github.com/go-logr/logr/logr.go:345 +0x36
	>  sigs.k8s.io/controller-runtime/pkg/client.newClient(0xc000137ea0?, {0x0, 0xc000137ea0, {0x0, 0x0}, 0x0, 0x0})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go:118 +0xdb
	>  sigs.k8s.io/controller-runtime/pkg/client.New(0xc000137ea0?, {0x0, 0xc000137ea0, {0x0, 0x0}, 0x0, 0x0})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go:98 +0x55
	>  github.com/ComplianceAsCode/ocp4e2e/helpers.GenerateKubeConfig()
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/helpers/utilities.go:149 +0x23a
	>  github.com/ComplianceAsCode/ocp4e2e.TestProfileRemediations(0xc000246d00)
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/e2e_test.go:377 +0xb8
	>  testing.tRunner(0xc000246d00, 0x19b9180)
	>  	/usr/lib/golang/src/testing/testing.go:1690 +0xf4
	>  created by testing.(*T).Run in goroutine 1
	>  	/usr/lib/golang/src/testing/testing.go:1743 +0x390
2025/09/30 02:45:32 Found profile ocp4-cis-node

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 30, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 30, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rhmdnd, yuumasato

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

@rhmdnd
Copy link
Contributor Author

rhmdnd commented Sep 30, 2025

/lgtm

Nice, scans are running now. I just noticed this in the logs:

=== RUN   TestProfileRemediations
[controller-runtime] log.SetLogger(...) was never called; logs will not be displayed.
Detected at:
	>  goroutine 31 [running]:
	>  runtime/debug.Stack()
	>  	/usr/lib/golang/src/runtime/debug/stack.go:26 +0x5e
	>  sigs.k8s.io/controller-runtime/pkg/log.eventuallyFulfillRoot()
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/log/log.go:60 +0xcd
	>  sigs.k8s.io/controller-runtime/pkg/log.(*delegatingLogSink).WithName(0xc00006b9c0, {0x18ac3b2, 0x14})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/log/deleg.go:147 +0x3e
	>  github.com/go-logr/logr.Logger.WithName({{0x1b3dcd0, 0xc00006b9c0}, 0x0}, {0x18ac3b2?, 0xc000695ca8?})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/github.com/go-logr/logr/logr.go:345 +0x36
	>  sigs.k8s.io/controller-runtime/pkg/client.newClient(0xc000137ea0?, {0x0, 0xc000137ea0, {0x0, 0x0}, 0x0, 0x0})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go:118 +0xdb
	>  sigs.k8s.io/controller-runtime/pkg/client.New(0xc000137ea0?, {0x0, 0xc000137ea0, {0x0, 0x0}, 0x0, 0x0})
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/vendor/sigs.k8s.io/controller-runtime/pkg/client/client.go:98 +0x55
	>  github.com/ComplianceAsCode/ocp4e2e/helpers.GenerateKubeConfig()
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/helpers/utilities.go:149 +0x23a
	>  github.com/ComplianceAsCode/ocp4e2e.TestProfileRemediations(0xc000246d00)
	>  	/go/src/github.com/ComplianceAsCode/content/ocp4e2e/e2e_test.go:377 +0xb8
	>  testing.tRunner(0xc000246d00, 0x19b9180)
	>  	/usr/lib/golang/src/testing/testing.go:1690 +0xf4
	>  created by testing.(*T).Run in goroutine 1
	>  	/usr/lib/golang/src/testing/testing.go:1743 +0x390
2025/09/30 02:45:32 Found profile ocp4-cis-node

Fixing in ComplianceAsCode/ocp4e2e#65

@yuumasato
Copy link
Contributor

/pj-rehearse ack

@openshift-ci-robot
Copy link
Contributor

@yuumasato: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-ci-robot openshift-ci-robot added the rehearsals-ack Signifies that rehearsal jobs have been acknowledged label Oct 1, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit f8a026a into openshift:master Oct 1, 2025
17 of 20 checks passed
tbuskey pushed a commit to tbuskey/release that referenced this pull request Oct 2, 2025
We recently refactored the ocp4e2e testing to support more test cases,
in particular for running all node and platform rules. This means just
running all go tests can have adverse side-effects if we only want to
test a specific profile.

This commit removes unused variables or variables that are redundant
with the defaults, and adjusts the test filtering so that profile tests
only run TestProfileRemediation, maintaining the older behavior of just
running a single profile on a cluster to assess it's compliance posture.
It also ensure jq is installed and available for the test suite to use,
since some of the tests require manual remediations, and use jq to parse
information from the openshift client.

Remove 4.13 and 4.15 CI since those versions are no longer supported.
abhay-nutanix pushed a commit to abhay-nutanix/release that referenced this pull request Oct 16, 2025
We recently refactored the ocp4e2e testing to support more test cases,
in particular for running all node and platform rules. This means just
running all go tests can have adverse side-effects if we only want to
test a specific profile.

This commit removes unused variables or variables that are redundant
with the defaults, and adjusts the test filtering so that profile tests
only run TestProfileRemediation, maintaining the older behavior of just
running a single profile on a cluster to assess it's compliance posture.
It also ensure jq is installed and available for the test suite to use,
since some of the tests require manual remediations, and use jq to parse
information from the openshift client.

Remove 4.13 and 4.15 CI since those versions are no longer supported.
wangke19 pushed a commit to wangke19/release that referenced this pull request Oct 16, 2025
We recently refactored the ocp4e2e testing to support more test cases,
in particular for running all node and platform rules. This means just
running all go tests can have adverse side-effects if we only want to
test a specific profile.

This commit removes unused variables or variables that are redundant
with the defaults, and adjusts the test filtering so that profile tests
only run TestProfileRemediation, maintaining the older behavior of just
running a single profile on a cluster to assess it's compliance posture.
It also ensure jq is installed and available for the test suite to use,
since some of the tests require manual remediations, and use jq to parse
information from the openshift client.

Remove 4.13 and 4.15 CI since those versions are no longer supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. rehearsals-ack Signifies that rehearsal jobs have been acknowledged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants