Skip to content

Conversation

@yashoza19
Copy link
Contributor

Description

Reviewer Checklist

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

@yashoza19 yashoza19 requested a review from a team as a code owner August 21, 2024 15:18
@netlify
Copy link

netlify bot commented Aug 21, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 5ea4e98
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/66c63060dcf03b00084df7d8
😎 Deploy Preview https://deploy-preview-1159--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.

@codecov
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 75.45%. Comparing base (1fb6bd2) to head (5ea4e98).
Report is 2 commits behind head on main.

Files Patch % Lines
internal/applier/helm.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1159   +/-   ##
=======================================
  Coverage   75.45%   75.45%           
=======================================
  Files          35       35           
  Lines        1919     1919           
=======================================
  Hits         1448     1448           
  Misses        329      329           
  Partials      142      142           
Flag Coverage Δ
e2e 58.10% <0.00%> (-0.11%) ⬇️
unit 50.85% <0.00%> (ø)

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.

@yashoza19
Copy link
Contributor Author

@everettraven Do you know why this is failing the apidiff check? Is there something I'm missing?

@everettraven
Copy link
Contributor

@everettraven Do you know why this is failing the apidiff check? Is there something I'm missing?

@yashoza19 this is a breaking change to the API surface. I would expect that check to fail in this case. It is not a required check, but one that is in place to grab our attention when API changes are being made. Once we cut our stable v1.0.0 release, we will likely convert it to a required check

//+kubebuilder:Required
// Disabled represents the state of the CRD upgrade safety preflight check being disabled/enabled.
Disabled bool `json:"disabled,omitempty"`
// +kubebuilder:validation:Enum:="Enabled,Disabled"
Copy link
Contributor

Choose a reason for hiding this comment

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

This would make the only allowed value the exact string Enabled,Disabled. I think we are looking for:

Suggested change
// +kubebuilder:validation:Enum:="Enabled,Disabled"
// +kubebuilder:validation:Enum:="Enabled","Disabled"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. I've updated this in the new commit. Thanks

Disabled bool `json:"disabled,omitempty"`
// +kubebuilder:validation:Enum:="Enabled,Disabled"
// policy represents the state of the CRD upgrade safety preflight check. Allowed values are "Enabled", and Disabled".
Policy CRDUpgradeSafetyPolicy `json:"policy,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a required field so we should be good to remove the omitempty here.

safety preflight check. Allowed values are "Enabled", and
Disabled".
enum:
- Enabled,Disabled
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to regenerate the CRD to get the distinct allowed values here

Signed-off-by: yashoza19 <yoza@redhat.com>
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.

Changes look good to me! Thanks @yashoza19 !

@everettraven everettraven added this pull request to the merge queue Aug 21, 2024
Merged via the queue into operator-framework:main with commit 6008832 Aug 21, 2024
@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.

Convert boolean fields to enums

2 participants