CMP-4115: Fix ARF report PVC checker timeout in e2e test#1093
Conversation
9a9a4b2 to
00c12f9
Compare
The AssertARFReportExistsInPVC helper used a hardcoded 10-second timeout which is insufficient for the checker pod to schedule, pull its image, mount the PVC (which may still be releasing from the result server scale-down), and run. Increase the timeout to 2 minutes with the standard RetryInterval to match other polling operations in the framework. Also add diagnostic logging throughout TestSingleScanWithStorageSucceeds and AssertARFReportExistsInPVC to make future timeout failures easier to diagnose, including the checker pod's phase at each poll iteration and a verbose ls command in the checker container.
00c12f9 to
44d0657
Compare
|
🤖 To deploy this PR, run the following command: |
|
🤖 To deploy this PR, run the following command: |
|
🤖 To deploy this PR, run the following command: |
|
/retest |
|
@Vincent056: This pull request references CMP-4115 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.22.0" version, but no target version was set. DetailsIn response to this:
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. |
| t.Parallel() | ||
| f := framework.Global | ||
| scanName := framework.GetObjNameFromTest(t) | ||
| t.Logf("Creating ComplianceScan %s with storage size 2Gi", scanName) |
There was a problem hiding this comment.
Nice - this should get logged with TestSingleScanWithStorageSucceeds when running the test in verbose mode.
Go's testing framework already prefixes log output with the test name in verbose mode, so the hardcoded function-name prefix is redundant. Made-with: Cursor
|
🤖 To deploy this PR, run the following command: |
|
@Vincent056: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
rhmdnd
left a comment
There was a problem hiding this comment.
The serial failure looks unrelated and this fixes the issues in the parallel test.
| Image: "registry.access.redhat.com/ubi8/ubi-minimal", | ||
| Command: []string{"/bin/bash", "-c", "ls /scan-results/0 2>/dev/null | grep -q '.xml.bzip2' && exit 0 || exit 1"}, | ||
| Image: "registry.access.redhat.com/ubi9/ubi-minimal", | ||
| Command: []string{"/bin/bash", "-c", "ls -la /scan-results/0 2>&1 || echo 'directory /scan-results/0 not found'; ls /scan-results/0 2>/dev/null | grep -q '.xml.bzip2' && exit 0 || exit 1"}, |
There was a problem hiding this comment.
nit: could trade this long line for a script that's easier to read, but we can do that in a follow up since getting this in fixes issues with CI.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhmdnd, Vincent056 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
/docs-approved since this is a e2e testing stability fix. |
The serial test failure appears to be caused by a race condition in the profile parsing while testing the update path for switching profile bundle images. I think we should investigate this in a separate PR, and would be good to understand what's happening there so we can make the tests more stable. |
Summary
AssertARFReportExistsInPVCpoll timeout from 10 seconds to 2 minutes (withRetryInterval), aligning it with other framework polling operations. The 10s timeout was insufficient for the checker pod to schedule, pull its image, and mount the PVC — especially when the result-server pod is still terminating after scale-down.AssertARFReportExistsInPVC(pod phase on each poll, timeout details) andTestSingleScanWithStorageSucceeds(step-by-stept.Logfmessages) to make future failures easier to triage.ls -labefore the grep, so pod logs show the actual PVC contents on failure.ubi8/ubi-minimaltoubi9/ubi-minimal.