Skip to content

Comments

🌱 Add CheckObjectSupport bundle validator#2523

Open
perdasilva wants to merge 1 commit intooperator-framework:mainfrom
perdasilva:other-object-bundle-validation
Open

🌱 Add CheckObjectSupport bundle validator#2523
perdasilva wants to merge 1 commit intooperator-framework:mainfrom
perdasilva:other-object-bundle-validation

Conversation

@perdasilva
Copy link
Contributor

Summary

  • Adds a CheckObjectSupport validator that rejects non-CRD/non-CSV bundle objects whose kind is not in the registry+v1 supported resources list (via operator-registry's IsSupported)
  • Adds unit tests covering empty bundles, supported kinds, unsupported kinds, multiple errors, and mixed bundles

Test plan

  • Unit tests added and passing for CheckObjectSupport
  • Full existing validator test suite passes
  • CI passes

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 24, 2026 14:52
@netlify
Copy link

netlify bot commented Feb 24, 2026

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 784e40b
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/699dbe56724fb30008eb2c5b
😎 Deploy Preview https://deploy-preview-2523--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 Feb 24, 2026

[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 perdasilva for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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

@perdasilva perdasilva force-pushed the other-object-bundle-validation branch from 122451c to 95bcd69 Compare February 24, 2026 14:55
@perdasilva perdasilva changed the title feat: Add CheckObjectSupport bundle validator 🌱 Add CheckObjectSupport bundle validator Feb 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new bundle validator CheckObjectSupport to ensure that non-CRD and non-CSV bundle objects use only supported Kubernetes resource kinds according to the registry+v1 standard. The validator leverages the existing IsSupported function from operator-registry to check each object kind, providing early validation feedback before bundle generation.

Changes:

  • Added CheckObjectSupport validator function that validates bundle objects against the registry+v1 supported resources list
  • Added comprehensive unit tests covering empty bundles, supported kinds, unsupported kinds, multiple errors, and mixed scenarios
  • Added helper function newUnstructuredObject to simplify test object creation

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
internal/operator-controller/rukpak/render/registryv1/validators/validator.go Implements the CheckObjectSupport validator that rejects unsupported object kinds
internal/operator-controller/rukpak/render/registryv1/validators/validator_test.go Adds comprehensive unit tests and test helper for the new validator

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@perdasilva perdasilva force-pushed the other-object-bundle-validation branch 2 times, most recently from 252a69b to 2088abd Compare February 24, 2026 15:05
Add a validator that checks non-CRD and non-CSV bundle objects are of
kinds supported by the registry+v1 standard, using operator-registry's

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@perdasilva perdasilva force-pushed the other-object-bundle-validation branch from 2088abd to 784e40b Compare February 24, 2026 15:05
@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.10%. Comparing base (4121321) to head (784e40b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2523      +/-   ##
==========================================
- Coverage   72.15%   72.10%   -0.05%     
==========================================
  Files         103      103              
  Lines        8686     8693       +7     
==========================================
+ Hits         6267     6268       +1     
- Misses       1937     1944       +7     
+ Partials      482      481       -1     
Flag Coverage Δ
e2e 45.38% <71.42%> (+0.05%) ⬆️
experimental-e2e 53.71% <71.42%> (-0.20%) ⬇️
unit 57.16% <100.00%> (+0.03%) ⬆️

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant