Skip to content

🌱 Add CheckObjectSupport bundle validator - #2523

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:other-object-bundle-validation
Feb 26, 2026
Merged

🌱 Add CheckObjectSupport bundle validator#2523
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:other-object-bundle-validation

Conversation

@perdasilva

Copy link
Copy Markdown
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

CopilotAI review requested due to automatic review settings February 24, 2026 14:52
@netlify

netlifyBot commented Feb 24, 2026

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commit784e40b
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/699dbe56724fb30008eb2c5b
😎 Deploy Previewhttps://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.

@perdasilva
perdasilvaforce-pushed the other-object-bundle-validation branch from 122451c to 95bcd69CompareFebruary 24, 2026 14:55
@perdasilvaperdasilva changed the title feat: Add CheckObjectSupport bundle validator🌱 Add CheckObjectSupport bundle validatorFeb 24, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

FileDescription
internal/operator-controller/rukpak/render/registryv1/validators/validator.goImplements the CheckObjectSupport validator that rejects unsupported object kinds
internal/operator-controller/rukpak/render/registryv1/validators/validator_test.goAdds 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
perdasilvaforce-pushed the other-object-bundle-validation branch 2 times, most recently from 252a69b to 2088abdCompareFebruary 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
perdasilvaforce-pushed the other-object-bundle-validation branch from 2088abd to 784e40bCompareFebruary 24, 2026 15:05
@codecov

codecovBot commented Feb 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.10%. Comparing base (4121321) to head (784e40b).
⚠️ Report is 4 commits behind head on main.

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 
FlagCoverage Δ
e2e45.38% <71.42%> (+0.05%)⬆️
experimental-e2e53.71% <71.42%> (-0.20%)⬇️
unit57.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.

@camilamacedo86camilamacedo86 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very small I think it is good to fly

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2026
@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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

The pull request process is described 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

@openshift-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 26, 2026
@openshift-merge-bot
openshift-merge-botBot merged commit 0d5ab2c into operator-framework:mainFeb 26, 2026
28 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@perdasilva@camilamacedo86