stackrox icon indicating copy to clipboard operation
stackrox copied to clipboard

ROX-28879: Update ScannerV2&Collector Konflux image checks/4.7

Open msugakov opened this issue 9 months ago • 5 comments

Description

Cherry-picked from 7ea688772e26babd81c57709942dd043b88656e9 (https://github.com/stackrox/stackrox/pull/14827) to release-4.7.

Trying to figure when it's comfortable to merge the change in https://redhat-internal.slack.com/archives/C08CG1N8HBP/p1744214856614999

User-facing documentation

  • [x] CHANGELOG is updated OR update is not needed
  • [x] documentation PR is created and is linked above OR is not needed

Testing and quality

  • [x] 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

No change.

How I validated my change

Only looking at CI.

Summary by Sourcery

Consolidate and improve GitHub Actions workflows for checking Collector and Scanner image availability

CI:

  • Refactored image existence checks for Collector and Scanner images in GitHub Actions workflows
  • Combined separate image existence check jobs into a single, more comprehensive workflow job

Chores:

  • Updated GitHub Actions workflow configuration to streamline image verification process

msugakov avatar Apr 09 '25 15:04 msugakov

Reviewer's Guide by Sourcery

This PR consolidates the image existence checks for Collector and Scanner into a single workflow in style.yaml. The previous checks in build.yaml were removed. The new workflow verifies the existence of both GHA-built and Konflux-built images for the specified components.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Consolidated image existence checks for Collector and Scanner into a single workflow.
  • Removed the check-collector-images-exist job from build.yaml.
  • Removed the check-scanner-images-exist job from build.yaml.
  • Added a new job check-collector-and-scanner-images-exist to style.yaml.
  • The new job checks for the existence of both GHA-built and Konflux-built images for collector and scanner.
  • The new job uses a matrix strategy to check for collector, scanner, scanner-slim, scanner-db, and scanner-db-slim images.
  • The new job retrieves the image tag from the COLLECTOR_VERSION or SCANNER_VERSION file.
  • The new job checks for the existence of images with and without the -fast suffix.
.github/workflows/build.yaml
.github/workflows/style.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it. You can also reply to a review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull request title to generate a title at any time. You can also comment @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment @sourcery-ai summary on the pull request to (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

  • Contact our support team for questions or feedback.
  • Visit our documentation for detailed guides and information.
  • Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.

sourcery-ai[bot] avatar Apr 09 '25 15:04 sourcery-ai[bot]

Having to backport collector 3.21.0 as 3.21.1 (technically it's the same commit) due to the absence of the latter:

$ podman pull quay.io/rhacs-eng/collector:3.21.0-fast
$ podman tag quay.io/rhacs-eng/collector:3.21.0-fast quay.io/rhacs-eng/collector:3.21.1-fast
$ podman push quay.io/rhacs-eng/collector:3.21.1-fast

msugakov avatar Apr 09 '25 16:04 msugakov

/retest retag-collector

msugakov avatar Apr 09 '25 16:04 msugakov

Images are ready for the commit at de3ecf5.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.7.2-rc.3-1-gde3ecf57ce.

rhacs-bot avatar Apr 09 '25 16:04 rhacs-bot

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 49.07%. Comparing base (1ad9c47) to head (de3ecf5). Report is 2 commits behind head on release-4.7.

Additional details and impacted files
@@             Coverage Diff              @@
##           release-4.7   #14941   +/-   ##
============================================
  Coverage        49.07%   49.07%           
============================================
  Files             2515     2515           
  Lines           182893   182893           
============================================
+ Hits             89746    89747    +1     
+ Misses           86027    86025    -2     
- Partials          7120     7121    +1     
Flag Coverage Δ
go-unit-tests 49.07% <ø> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Apr 09 '25 17:04 codecov[bot]

@dcaravel please merge this one for 4.7.3.

msugakov avatar Apr 23 '25 17:04 msugakov