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

common: bump wrangler v3 #7

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

Vicente-Cheng
Copy link
Contributor

@Vicente-Cheng Vicente-Cheng commented Oct 3, 2024

If we already use the wrangler v3 controller, the new added webhook sometimes might encounter the following build error:

# github.com/harvester/webhook/pkg/server
vendor/github.com/harvester/webhook/pkg/server/server.go:147:18: cannot use clients.Core.Secret() (value of type "github.com/rancher/wrangler/pkg/generated/controllers/core/v1".SecretController) as "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1".SecretController value in struct literal: "github.com/rancher/wrangler/pkg/generated/controllers/core/v1".SecretController does not implement "github.com/rancher/wrangler/v3/pkg/generated/controllers/core/v1".SecretController (wrong type for method AddGenericHandler)
                have AddGenericHandler(context.Context, string, "github.com/rancher/wrangler/pkg/generic".Handler)
                want AddGenericHandler(context.Context, string, "github.com/rancher/wrangler/v3/pkg/generic".Handler)
FATA[0015] exit status 1                                
make: *** [Makefile:11: default] Error 1

That is because the github.com/rancher/dynamiclistener did not use the corresponding version.
The harvester/webhook v0.1.4 should use the rancher/dynamiclistener v0.3.x
If we already bump wrangler to v3, the dynamiclistener will also bump to v0.6.0.
If that is, using the harvester/webhook v0.1.4 will get the above error.

Signed-off-by: Vicente Cheng <[email protected]>
@Vicente-Cheng Vicente-Cheng requested review from bk201 and Yu-Jack October 3, 2024 13:01
@bk201 bk201 requested a review from mingshuoqiu October 4, 2024 02:02
@bk201
Copy link
Member

bk201 commented Oct 4, 2024

cc @mingshuoqiu, the network-controller also uses webhook

@Yu-Jack Yu-Jack self-requested a review October 7, 2024 07:39
Copy link

@mingshuoqiu mingshuoqiu left a comment

Choose a reason for hiding this comment

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

LGTM.

@bk201 bk201 merged commit d603eba into harvester:main Oct 8, 2024
1 of 2 checks passed
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.

4 participants