kubevirt / hyperconverged-cluster-operator

Operator pattern for managing multi-operator products
Apache License 2.0
153 stars 152 forks source link

Use standard lib instead of self baked functions. #3015

Closed nunnatsa closed 3 months ago

nunnatsa commented 3 months ago

What this PR does / why we need it:

There are currently two different implementations for searching string in a slice. golang now have the slices.Contains standard library function to do the same thing.

This PR removes the private implementation, replacing them with calls to the standard library.

Release note:

None
coveralls commented 3 months ago

Pull Request Test Coverage Report for Build 9730348215

Details


Totals Coverage Status
Change from base Build 9713902076: 0.03%
Covered Lines: 5211
Relevant Lines: 6068

💛 - Coveralls
openshift-ci[bot] commented 3 months ago

@nunnatsa: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws c04b7da91efdae9c6f22dc5f1128b67317f52af4 link true /test hco-e2e-upgrade-prev-operator-sdk-aws
ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws c04b7da91efdae9c6f22dc5f1128b67317f52af4 link false /test hco-e2e-upgrade-operator-sdk-sno-aws
ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws c04b7da91efdae9c6f22dc5f1128b67317f52af4 link false /test hco-e2e-upgrade-prev-operator-sdk-sno-aws
ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure c04b7da91efdae9c6f22dc5f1128b67317f52af4 link true /test hco-e2e-consecutive-operator-sdk-upgrades-azure
ci/prow/hco-e2e-operator-sdk-azure c04b7da91efdae9c6f22dc5f1128b67317f52af4 link true /test hco-e2e-operator-sdk-azure

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
nunnatsa commented 3 months ago

/override-bot

hco-bot commented 3 months ago

hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-aws lanes succeeded. /override ci/prow/hco-e2e-operator-sdk-azure hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. /override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure hco-e2e-upgrade-prev-operator-sdk-azure lane succeeded. /override ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded. /override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded. /override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws

kubevirt-bot commented 3 months ago

@hco-bot: Overrode contexts on behalf of hco-bot: ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure, ci/prow/hco-e2e-operator-sdk-azure, ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws, ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws

In response to [this](https://github.com/kubevirt/hyperconverged-cluster-operator/pull/3015#issuecomment-2198514686): >hco-e2e-operator-sdk-gcp, hco-e2e-operator-sdk-aws lanes succeeded. >/override ci/prow/hco-e2e-operator-sdk-azure >hco-e2e-consecutive-operator-sdk-upgrades-aws lane succeeded. >/override ci/prow/hco-e2e-consecutive-operator-sdk-upgrades-azure >hco-e2e-upgrade-prev-operator-sdk-azure lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-aws >hco-e2e-upgrade-prev-operator-sdk-sno-azure lane succeeded. >/override ci/prow/hco-e2e-upgrade-prev-operator-sdk-sno-aws >hco-e2e-upgrade-operator-sdk-sno-azure lane succeeded. >/override ci/prow/hco-e2e-upgrade-operator-sdk-sno-aws > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
nunnatsa commented 3 months ago

/retest

tiraboschi commented 3 months ago

/approve

kubevirt-bot commented 3 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tiraboschi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubevirt/hyperconverged-cluster-operator/blob/main/OWNERS)~~ [tiraboschi] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment