stolostron / multicloud-operators-foundation

Apache License 2.0
51 stars 35 forks source link

Update using err not `obj == nil` to determine get result. #775

Closed xuezhaojun closed 2 months ago

xuezhaojun commented 2 months ago

In latest version of controller-runtime pkgs, when obj is not found, the result obj is not nil, so change to using err to determine the result to be more accurate.

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

xuezhaojun commented 2 months ago

/assign @zhiweiyin318

zhiweiyin318 commented 2 months ago

/approve /lgtm

openshift-ci[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xuezhaojun, zhiweiyin318

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/stolostron/multicloud-operators-foundation/blob/main/OWNERS)~~ [zhiweiyin318] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment