Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add field to Extension API to skip crd safety checks #699

Conversation

everettraven
Copy link
Contributor

Description

Adds an optional Extension.spec.skipCRDUpgradeSafetyChecks field that when set to true will be used to disable the CRD upgrade safety checks when attempting to install an extension.

No logic included in this PR as the CRD Upgrade Safety preflight check hasn't been fully implemented in carvel-dev/kapp yet.

I figured it doesn't hurt to go ahead and add the field and have it do nothing for now, but I'm also happy for this PR to be put on hold until the underlying logic to enable/disable the check is able to be put in place.

fixes #658

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 owner March 14, 2024 20:19
Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 66e614a
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/660416ba780ee80008535dbc
😎 Deploy Preview https://deploy-preview-699--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 Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.01%. Comparing base (01eff91) to head (66e614a).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #699   +/-   ##
=======================================
  Coverage   64.01%   64.01%           
=======================================
  Files          22       22           
  Lines        1370     1370           
=======================================
  Hits          877      877           
  Misses        442      442           
  Partials       51       51           
Flag Coverage Δ
e2e 47.37% <ø> (ø)
unit 58.41% <ø> (ø)

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.

perdasilva
perdasilva previously approved these changes Mar 19, 2024
Copy link
Contributor

@perdasilva perdasilva left a comment

Choose a reason for hiding this comment

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

lgtm

//+kubebuilder:Optional
//
// skipCRDUpgradeSafetyCheck specifies whether or not the CRD upgrade safety checks should be skipped when attempting to install the extension
SkipCRDUpgradeSafetyCheck bool `json:"skipCRDUpgradeSafetyCheck,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in the past we identified that bool fields are problematic over time since quite frequently an additional value would slip in, so for maximum flexibility we've been using enum/string for this role, like so.
Is there any reason not to do so here?

Copy link
Contributor Author

@everettraven everettraven Mar 22, 2024

Choose a reason for hiding this comment

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

I don't disagree, but I recall us having also gone back and forth on our feelings on that. I'm happy to make a change to this, but I do think we should make sure we come up with a consistent approach as a project and that we (maintainers) all agree to prevent flip-flopping.

Copy link
Member

Choose a reason for hiding this comment

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

IMO, let's go ahead and get this merged to unblock further development. We'll separately plan for a full API review once we have all of the MVP functionality complete, and do any necessary refactoring at that point.

joelanford
joelanford previously approved these changes Mar 27, 2024
@joelanford
Copy link
Member

I'm surprised I don't see one of:

  • a failing sanity test
  • an updated CRD YAML

@everettraven
Copy link
Contributor Author

I'm surprised I don't see one of:

  • a failing sanity test

  • an updated CRD YAML

That's a good point, I totally forgot to run make generate to update the CRD YAML

@joelanford
Copy link
Member

It's make manifests, and I think we need to add manifests to the dependency list for verify

Signed-off-by: everettraven <everettraven@gmail.com>
@everettraven everettraven dismissed stale reviews from joelanford and perdasilva via 66e614a March 27, 2024 12:53
@everettraven everettraven force-pushed the feature/crd-upgrade-safety-field branch from 0b56e4f to 66e614a Compare March 27, 2024 12:53
@everettraven
Copy link
Contributor Author

@joelanford I just pushed some updates to fix what you pointed out was missing. Great catch!

@joelanford joelanford added this pull request to the merge queue Mar 27, 2024
Merged via the queue into operator-framework:main with commit d4bffc4 Mar 27, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants