Skip to content

feat: adding MVO to structural tests#34

Merged
SequeI merged 1 commit intomainfrom
MVO
Sep 22, 2025
Merged

feat: adding MVO to structural tests#34
SequeI merged 1 commit intomainfrom
MVO

Conversation

@SequeI
Copy link
Member

@SequeI SequeI commented Sep 22, 2025

Summary by Sourcery

Add support for Model Validation Operator to structural tests by extending parsing utilities, adding new image keys and constants, updating snapshot logic, and introducing dedicated acceptance test suites (operator images, file-based catalogs, and release validations) with accompanying README instructions.

New Features:

  • Introduce acceptance tests for Model Validation Operator images, file-based catalog bundles, and release snapshots

Enhancements:

  • Extend support package with ParseMVOperatorImages, MandatoryMvoOperatorImageKeys, and update imageRegexp to include mvo-fbc prefixes
  • Add model-validation-operator image keys and ClusterServiceVersion file paths in test constants

Documentation:

  • Update README with Model Validation Operator repository link and test execution commands

Tests:

  • Add new acceptance test suites for model validation operator: operator_images_test, fbc_images_test, releases_images_test, and test suite initialization

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 22, 2025

Reviewer's Guide

This PR integrates Model Validation Operator (MVO) support into structural tests by adding parsing logic, constants, regex updates, documentation tweaks, and a full suite of acceptance tests under test/acceptance/model_transparency.

File-Level Changes

Change Details Files
Introduce MVO image parsing and key management
  • Add ParseMVOperatorImages function with regex-based extraction and string builder
  • Define ModelValidationOperatorImageKey and bundle key constants
  • Implement MandatoryMvoOperatorImageKeys returning mandatory image keys
test/support/acceptance.go
test/support/test_constants.go
Extend snapshot mapping to recognize MVO FBC images
  • Update imageRegexp to include mvo-fbc- prefix
test/support/snapshot_map_type.go
Document MVO in README
  • Add Model Validation operator link
  • Add test command instructions for model_transparency directory
README.md
Add acceptance tests for Model Validation Operator
  • Create operator_images_test.go validating registry presence and hash matching
  • Create fbc_images_test.go for file-based catalog extraction and verification
  • Create releases_images_test.go for snapshot file validations
  • Create mvo_acceptance_suite_test.go to bootstrap the MVO test suite
test/acceptance/model_transparency/operator_images_test.go
test/acceptance/model_transparency/fbc_images_test.go
test/acceptance/model_transparency/releases_images_test.go
test/acceptance/model_transparency/mvo_acceptance_suite_test.go

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!

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • ParseMVOperatorImages duplicates much of the PC parsing logic—consider extracting a common helper or parameterizing ParsePCOperatorImages to avoid code duplication.
  • The regex-based image extraction in ParseMVOperatorImages is brittle; using a YAML parser or reusing the existing image‐parsing utilities would be more robust and maintainable.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- ParseMVOperatorImages duplicates much of the PC parsing logic—consider extracting a common helper or parameterizing ParsePCOperatorImages to avoid code duplication.
- The regex-based image extraction in ParseMVOperatorImages is brittle; using a YAML parser or reusing the existing image‐parsing utilities would be more robust and maintainable.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Signed-off-by: SequeI <asiek@redhat.com>
@SequeI SequeI merged commit 4847f51 into main Sep 22, 2025
5 checks passed
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