Skip to content

Conversation

trgeiger
Copy link
Contributor

@trgeiger trgeiger commented Aug 29, 2024

New preflight check that checks for either the presence of the "Webhook" conversion strategy to pass, or checks for any incompatible changes between served versions in the new CRD which, if found, causes failure..

Closes #1091

Description

Adds a new preflight check, ServedVersionValidator, which checks for breaking changes between served versions in the new CRD when upgrading.

Happy to change up any naming or error messages.

Existing test data had to be edited so it wouldn't trigger the new check--the empty v1 in all the test data has just been filled in to match the test data v2.

Reviewer Checklist

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

@trgeiger trgeiger requested a review from a team as a code owner August 29, 2024 15:59
Copy link

netlify bot commented Aug 29, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 2716b3b
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/66d1da88fc37470008d537f3
😎 Deploy Preview https://deploy-preview-1191--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 site configuration.

Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 95.91837% with 2 lines in your changes missing coverage. Please review.

Project coverage is 77.56%. Comparing base (37c64bd) to head (2716b3b).
Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
...ernal/rukpak/preflights/crdupgradesafety/checks.go 94.28% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1191      +/-   ##
==========================================
+ Coverage   75.45%   77.56%   +2.10%     
==========================================
  Files          35       36       +1     
  Lines        1919     1979      +60     
==========================================
+ Hits         1448     1535      +87     
+ Misses        329      309      -20     
+ Partials      142      135       -7     
Flag Coverage Δ
e2e 57.65% <28.57%> (-0.56%) ⬇️
unit 55.53% <95.91%> (+4.67%) ⬆️

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.

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

Overall the changes look really good! Great work @trgeiger !

I have a couple minor comments, but ones I think are worth addressing

New preflight check that checks for either the presence of the "Webhook"
conversion strategy to pass, or checks for any incompatible changes
between served versions in the new CRD which, if found, causes failure..

Closes operator-framework#1091

Signed-off-by: Tayler Geiger <[email protected]>
@trgeiger
Copy link
Contributor Author

Thanks for the review and suggestions. All ready to go again.

Copy link
Contributor

@everettraven everettraven left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@everettraven everettraven added this pull request to the merge queue Aug 30, 2024
Merged via the queue into operator-framework:main with commit 0e728b3 Aug 30, 2024
18 checks passed
@skattoju skattoju mentioned this pull request Sep 25, 2024
4 tasks
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.

CRD Upgrade Safety preflight checks should check for incompatibility between served versions
2 participants