Skip to content

Feat: Upgrade go version and include vcn native changes #405

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

Closed
wants to merge 9 commits into from

Conversation

sindhusri16
Copy link
Member

What this PR does / why we need it:

PR includes upgrading the go version to v1.22.9 along with vcn-native cni support changes. It also has two old commits which are waiting for promotion in v0.15.4 version.

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

@sindhusri16 sindhusri16 requested a review from joekr April 2, 2025 11:05
@sindhusri16 sindhusri16 self-assigned this Apr 2, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 2, 2025
@sindhusri16
Copy link
Member Author

$ make test
GOBIN=/home/opc/cluster-api-provider-oci/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20230131074648-f5014c077fc3
kube-builder assets: /home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
github.com/oracle/cluster-api-provider-oci coverage: 0.0% of statements
github.com/oracle/cluster-api-provider-oci/cloud/config coverage: 0.0% of statements
github.com/oracle/cluster-api-provider-oci/cloud/metrics coverage: 0.0% 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
github.com/oracle/cluster-api-provider-oci/feature coverage: 0.0% of statements
? github.com/oracle/cluster-api-provider-oci/version [no test files]
ok github.com/oracle/cluster-api-provider-oci/api/v1beta1 87.258s coverage: 23.5% of statements
ok github.com/oracle/cluster-api-provider-oci/api/v1beta2 0.060s coverage: 14.6% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/ociutil 0.015s coverage: 15.9% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/scope 21.091s coverage: 74.5% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/util 0.141s coverage: 45.1% of statements
ok github.com/oracle/cluster-api-provider-oci/controllers 2.221s coverage: 43.2% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1 32.912s coverage: 15.3% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2 0.029s coverage: 4.8% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/controllers 0.612s coverage: 51.8% of statements
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html

Copy link
Member

@joekr joekr left a comment

Choose a reason for hiding this comment

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

add tests please. I'll run e2e

@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Copy link
Member

Choose a reason for hiding this comment

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

All these changes are due to the version bump correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

@sindhusri16
Copy link
Member Author

make test
GOBIN=/home/opc/cluster-api-provider-oci/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20230131074648-f5014c077fc3
kube-builder assets: /home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
github.com/oracle/cluster-api-provider-oci coverage: 0.0% of statements
ok github.com/oracle/cluster-api-provider-oci/api/v1beta1 60.549s coverage: 23.6% of statements
github.com/oracle/cluster-api-provider-oci/cloud/config coverage: 0.0% of statements
github.com/oracle/cluster-api-provider-oci/cloud/metrics coverage: 0.0% of statements
ok github.com/oracle/cluster-api-provider-oci/api/v1beta2 0.039s coverage: 14.6% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/ociutil 0.017s coverage: 15.9% 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/scope 20.506s coverage: 74.8% of statements
ok github.com/oracle/cluster-api-provider-oci/cloud/util 0.092s coverage: 45.1% of statements
ok github.com/oracle/cluster-api-provider-oci/controllers 1.929s coverage: 43.1% 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]
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1 19.966s coverage: 15.3% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2 0.036s coverage: 4.8% of statements
ok github.com/oracle/cluster-api-provider-oci/exp/controllers 0.764s coverage: 51.8% of statements

@@ -1,13 +1,13 @@
module github.com/oracle/cluster-api-provider-oci

go 1.20
go 1.22.9
Copy link
Member

Choose a reason for hiding this comment

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

The root level dockerfile will need to be updated as well

FROM golang:1.21.8 as builder

won't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants