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

Move GetDefaultRouteAnnotations to SpecCore #405

Conversation

bshephar
Copy link
Contributor

The GetDefaultRouteAnnotations function needs to be a method of the OctaviaSpecCore struct rather than OctaviaSpec. This will resolve the issue seen in: openstack-k8s-operators/openstack-operator#1071

The GetDefaultRouteAnnotations function needs to be a method of
the OctaviaSpecCore struct rather than OctaviaSpec. This will resolve the issue
seen in: openstack-k8s-operators/openstack-operator#1071

Signed-off-by: Brendan Shephard <[email protected]>
@openshift-ci openshift-ci bot requested review from slawqo and weinimo October 29, 2024 02:23
Copy link
Contributor

openshift-ci bot commented Oct 29, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: bshephar
Once this PR has been reviewed and has the lgtm label, please assign dprince for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bshephar
Copy link
Contributor Author

Verifying that this does indeed resolve the problem with the openstack-operator PR:

❯ go list -m -json github.com/bshephar/octavia-operator/api@move-annotation-to-spec-core | jq '.|"\(.Path) \(.Version)"'
"github.com/bshephar/octavia-operator/api v0.0.0-20241029022303-7c1a09fbebbe"

❯ tail -n1 go.mod apis/go.mod
==> go.mod <==
replace github.com/openstack-k8s-operators/octavia-operator/api => github.com/bshephar/octavia-operator/api v0.0.0-20241029022303-7c1a09fbebbe

==> apis/go.mod <==
replace github.com/openstack-k8s-operators/octavia-operator/api => github.com/bshephar/octavia-operator/api v0.0.0-20241029022303-7c1a09fbebbe

We can see that no errors are returned from go vet after this change.

❯ go vet ./...

@fernandoroyosanchez
Copy link
Contributor

Thanks @bshephar for this, I already added those lines (or similar ones in this another PR https://github.com/openstack-k8s-operators/octavia-operator/pull/403/files#diff-d85dfd4f9255eccbf67bef3351764d06d3770a1e4366b602d8324480705acd14R201) but feel free to continue with this one.

@bshephar
Copy link
Contributor Author

Thanks @bshephar for this, I already added those lines (or similar ones in this another PR https://github.com/openstack-k8s-operators/octavia-operator/pull/403/files#diff-d85dfd4f9255eccbf67bef3351764d06d3770a1e4366b602d8324480705acd14R201) but feel free to continue with this one.

Ah, cool. Yeah, we can go with your one then. I was just looking at why the openstack-operator PR was failing, so I was only really focused on that single problem when I sent this.

@bshephar bshephar closed this Oct 29, 2024
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.

2 participants