Skip to content

ROX-19064: Scanner V4 Automated Tests (Groovy Foundation)#19640

Open
dcaravel wants to merge 3 commits intomasterfrom
dc/scanv4-base-groovy
Open

ROX-19064: Scanner V4 Automated Tests (Groovy Foundation)#19640
dcaravel wants to merge 3 commits intomasterfrom
dc/scanv4-base-groovy

Conversation

@dcaravel
Copy link
Contributor

@dcaravel dcaravel commented Mar 26, 2026

Description

First in a series of changes that modify groovy tests to work with both StackRox Scanner and Scanner V4.

Scanner V4 is not enabled yet, this is prep work so that it can be enabled in a future PR.

This PR includes 'foundational' changes that will be the base for future stacked PRs that modify tests.

  • The scannerV4Enabled flag is added so that tests can react accordingly, it's populated by querying Feature Flags from Central's API
  • The new ScannerV4Integration type will be used by various tests in future PRs.
  • Fixes a NullPointerException bug in waitForVulnerabilitiesForImage() that was leading to flakes because retires were not occuring (observed while testing).

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • modified existing tests

How I validated my change

Against StackROX Scanner these changes will be tested by CI as part of this and subsequent PRs

Against Scanner V4 these changes were validated in #19236

Add null guard to found checks so that it actually retries when image
not found yet vs. failing with NullPointerException. This was causing
CI flakes during testing.
…y flag

- Creates a ScannerV4Integration type for tests to use (will be part of future commits)
- The Scanner V4 integration cannot be deleted in Central by design, the new isDeletable() method allows tests to act accordingly.
- Makes isTestable() for StackRoxScannerIntegration conditional on Scanner V4 being enabled. When Scanner V4 is enabled StackRox Scanner is not reachable for image scans (exception: delegated scanning, but that is not tested in groovy tests)
@openshift-ci
Copy link

openshift-ci bot commented Mar 26, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@dcaravel
Copy link
Contributor Author

/test all

@rhacs-bot
Copy link
Contributor

Images are ready for the commit at 07257dc.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-463-g07257dc4a5.

@codecov
Copy link

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.37%. Comparing base (699eeed) to head (07257dc).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19640      +/-   ##
==========================================
- Coverage   49.37%   49.37%   -0.01%     
==========================================
  Files        2742     2742              
  Lines      206921   206921              
==========================================
- Hits       102165   102159       -6     
- Misses      97172    97176       +4     
- Partials     7584     7586       +2     
Flag Coverage Δ
go-unit-tests 49.37% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dcaravel
Copy link
Contributor Author

dcaravel commented Mar 27, 2026

Test name Commit Details Required Rerun command
ci/prow/gke-qa-e2e-tests 07257dc link false /test gke-qa-e2e-tests

Appears to be a flake unrelated to this PRs changes, image scan failed: error processing image \\\"quay.io/rhacs-eng/qa:struts-app\\\": could not advance in the tar archive: unexpected EOF.

Additionally the previous run succeeded when PR was in draft w/o any changes.

@dcaravel
Copy link
Contributor Author

/test gke-qa-e2e-tests

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.

2 participants