Skip to content

Conversation

@perdasilva
Copy link
Contributor

@perdasilva perdasilva commented Oct 28, 2025

Description

The current BundleValidator is implemented almost as a framework, its a singleton that always exists in memory, and it feels a bit awkward to me. I was thinking it might be better to have it as a concrete thing that can be instantiated independently and at the point of use, if necessary.

In this PR we move BundleValidator to a concrete struct with the validation functions hanging off that.

I'm wondering whether:

  • people agree that a concrete struct might be better in general
  • whether I should make the Check* methods private, and
  • whether we should just have a single big tabular test that exercises all of the Check* functions, or if its better to test them individually and have a test that checks whether all check functions are being exercised by the Validate method.

Note: the changes are currently implemented under a v2 directory. The final form of this PR would replace the current implementation in validators with this. Maybe even moving it to the top level of the render package.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 28, 2025
@netlify
Copy link

netlify bot commented Oct 28, 2025

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 8acd651
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/690103d267957c0008220812
😎 Deploy Preview https://deploy-preview-2291--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci
Copy link

openshift-ci bot commented Oct 28, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thetechnick for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

❌ Patch coverage is 98.90110% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.10%. Comparing base (3c2fcb4) to head (8acd651).

Files with missing lines Patch % Lines
...ukpak/render/registryv1/validators/v2/validator.go 98.90% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2291      +/-   ##
==========================================
+ Coverage   71.38%   72.10%   +0.72%     
==========================================
  Files          90       91       +1     
  Lines        7003     7185     +182     
==========================================
+ Hits         4999     5181     +182     
  Misses       1592     1592              
  Partials      412      412              
Flag Coverage Δ
e2e 47.66% <ø> (+0.03%) ⬆️
experimental-e2e 14.59% <ø> (?)
unit 59.88% <98.90%> (+1.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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant