Skip to content

✨ (deps): import kubernetes-sigs/crdify for performing CRD upgrade safety checks - #2054

Merged
tmshort merged 1 commit into
operator-framework:mainfrom
everettraven:dep/use-crdify-for-crd-checks
Jul 2, 2025
Merged

✨ (deps): import kubernetes-sigs/crdify for performing CRD upgrade safety checks#2054
tmshort merged 1 commit into
operator-framework:mainfrom
everettraven:dep/use-crdify-for-crd-checks

Conversation

@everettraven

Copy link
Copy Markdown
Contributor

Description

Removes all custom CRD upgrade pre-flight check validations in favor of importing validation logic from kubernetes-sigs/crdify.

This allows OLM to stay consistent with what is deemed "safe" by an more formal library that performs validation checks. As was the previous behavior, OLM configures the validation to be as strict as reasonably possible and to continue failing closed on unhandled changes.

While it is still possible to implement custom validations with this approach (by adding them to the registry), it would be awesome to see OLM maintainers get involved in discussions with the maintainers of kubernetes-sigs/crdify and contribute new validations there first and pull them in through dependency updates.

Reviewer Checklist

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

@everettraven
everettraven requested a review from a team as a code ownerJune 26, 2025 17:12
@netlify

netlifyBot commented Jun 26, 2025

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commitfe34799
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/685d89fe3df18a0008cc36e9
😎 Deploy Previewhttps://deploy-preview-2054--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.

Comment threadgo.mod Outdated
@codecov

codecovBot commented Jun 26, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 72.47%. Comparing base (a449fc4) to head (fe34799).
Report is 15 commits behind head on main.

Files with missing linesPatch %Lines
...ak/preflights/crdupgradesafety/crdupgradesafety.go75.00%14 Missing and 4 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #2054 +/- ##
==========================================
- Coverage 73.82% 72.47% -1.35% 
==========================================
Files 81 77 -4 Lines 7365 7056 -309 ==========================================
- Hits 5437 5114 -323 - Misses 1588 1600 +12 - Partials 340 342 +2 
FlagCoverage Δ
e2e45.03% <31.94%> (+0.96%)⬆️
unit58.27% <75.00%> (-1.97%)⬇️

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.

@everettraven
everettravenforce-pushed the dep/use-crdify-for-crd-checks branch from 390e72a to d486316CompareJune 26, 2025 17:55
@openshift-merge-robotopenshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2025
…ty checks
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
@everettraven
everettravenforce-pushed the dep/use-crdify-for-crd-checks branch from d486316 to fe34799CompareJune 26, 2025 17:57
@openshift-merge-robotopenshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2025
@tmshort

Copy link
Copy Markdown
Contributor

/approve
Looks OK to me, but I'm not too familiar with the code in question.

The primary purpose seems to replace github.com/openshift/crd-schema-checker with k8s-sigs/crdify?

@openshift-ci

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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 Jun 26, 2025
@grokspawn

Copy link
Copy Markdown
Contributor

Hi @everettraven !
This looks like it supplants #2010. Confirm/deny?

@everettraven

Copy link
Copy Markdown
ContributorAuthor

Hi @everettraven ! This looks like it supplants #2010. Confirm/deny?

Deny. #2010 is for the check in CI that runs against the OLMv1 APIs. This PR imports it for use within OLMv1 for OLMv1's CRD upgrade safety check validations

@everettraven

Copy link
Copy Markdown
ContributorAuthor

The primary purpose seems to replace github.com/openshift/crd-schema-checker with k8s-sigs/crdify?

@tmshort The removal of github.com/openshift/crd-schema-checker is a side effect of removing the internal validation checks that we had that imported that library. k8s-sigs/crdify is a new sig-api-machinery subproject that got created to centralize the work that a few folks were doing related to CRD schema change validations.

The primary purpose is to have OLM stop using its own checks and instead use this centralized place where there is active development and discussion with sig-api-machinery folks on what rules should be codified when evaluating CRD schema changes for compatibility.

@dtfranz

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Jul 1, 2025
@tmshort

Copy link
Copy Markdown
Contributor

Clicking the button to override codecov/project...

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.

5 participants

@everettraven@tmshort@grokspawn@dtfranz@openshift-merge-robot