Skip to content

Conversation

@joekr
Copy link
Member

@joekr joekr commented Nov 26, 2025

What this PR does / why we need it:
Adds more nil checks, updates the PTR package to have a ToBool() and removes some panics to allow the control loop to better handle errors.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
NA

@joekr joekr requested review from chetan79 and vladcristi November 26, 2025 15:04
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 26, 2025
@joekr joekr requested a review from HaoyL666 November 26, 2025 15:10
@joekr joekr self-assigned this Nov 26, 2025
@joekr joekr added the bug Something isn't working label Nov 26, 2025
@joekr
Copy link
Member Author

joekr commented Nov 26, 2025

unit tests

        github.com/oracle/cluster-api-provider-oci              coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta1  30.202s coverage: 23.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta2  2.318s  coverage: 18.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/config 1.110s  coverage: 86.1% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/metrics                coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil        0.727s  coverage: 15.9% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil/ptr    2.964s  coverage: 100.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/scope  23.034s coverage: 74.4% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks            coverage: 0.0% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/services/base          coverage: 0.0% of statements
        github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base                coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/compute       [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement     [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement              coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine       [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/identity      [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity                coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer  [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer   [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/vcn   [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn          coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests  [no test files]
        github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests/mock_workrequests                coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/util   1.688s  coverage: 60.9% of statements
ok      github.com/oracle/cluster-api-provider-oci/controllers  3.766s  coverage: 59.2% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1      8.683s  coverage: 15.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2      1.206s  coverage: 5.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/controllers      2.454s  coverage: 56.3% of statements
        github.com/oracle/cluster-api-provider-oci/feature              coverage: 0.0% of statements
?       github.com/oracle/cluster-api-provider-oci/version      [no test files]

e2e tests

Ran 9 of 31 Specs in 3824.072 seconds
SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 22 Skipped

@joekr joekr force-pushed the nill-pointer-fixes branch 2 times, most recently from 08f3ae1 to b8114cc Compare November 26, 2025 15:52
@HaoyL666
Copy link
Member

LGTM

@joekr joekr force-pushed the nill-pointer-fixes branch from b8114cc to 7c3350a Compare November 26, 2025 19:56
@joekr joekr force-pushed the nill-pointer-fixes branch from 7c3350a to 0599ea5 Compare November 27, 2025 00:02
@joekr joekr requested a review from HaoyL666 November 27, 2025 00:04
@HaoyL666
Copy link
Member

HaoyL666 commented Dec 1, 2025

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants