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

Remove bool ptr #625

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Conversation

adrianchiris
Copy link
Collaborator

Change boolean attribute in SriovOperatorConfig from pointer to concrete.
Main motivation is to simplify code a bit

We dont really need these fields to be pointers,
change to concrete type to simplify code.

Signed-off-by: adrianc <[email protected]>
run `make generate` to update deepcopy functions

Signed-off-by: adrianc <[email protected]>
Copy link

github-actions bot commented Feb 7, 2024

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7816545048

  • -2 of 4 (50.0%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 25.785%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/sriovoperatorconfig_controller.go 2 4 50.0%
Files with Coverage Reduction New Missed Lines %
controllers/sriovoperatorconfig_controller.go 6 54.89%
Totals Coverage Status
Change from base Build 7801115751: -0.08%
Covered Lines: 2898
Relevant Lines: 11239

💛 - Coveralls

Copy link
Collaborator

@e0ne e0ne left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for making our code more simple

@adrianchiris
Copy link
Collaborator Author

@SchSeba could you take a look, this is a short one.

Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

general question this will mean that it will be false by default so if someone create the sriovOperatorConfig without this fields it will be false and in case of a pointer it will not exist no?

@adrianchiris
Copy link
Collaborator Author

general question this will mean that it will be false by default so if someone create the sriovOperatorConfig without this fields it will be false and in case of a pointer it will not exist no?

yes, but we have no use-case for a "missing" value.
moreover we always create the default config with values set today.

Copy link
Collaborator

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

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

yep you are right I have no problem moving this one out of a pointer and if in the future this is needed we can revert it. from the CRD point of view there is no change so it's transparent to the user

@SchSeba SchSeba merged commit 1163ef9 into k8snetworkplumbingwg:master Feb 12, 2024
11 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
Development

Successfully merging this pull request may close these issues.

4 participants