Skip to content

🌱 Migrate from deprecated golang/mock to go.uber.org/mock #1282

Open
MaxRink wants to merge 1 commit intometal3-io:mainfrom
MaxRink:fix/migrate-to-uber-mock
Open

🌱 Migrate from deprecated golang/mock to go.uber.org/mock #1282
MaxRink wants to merge 1 commit intometal3-io:mainfrom
MaxRink:fix/migrate-to-uber-mock

Conversation

@MaxRink
Copy link

@MaxRink MaxRink commented Jan 26, 2026

The github.com/golang/mock package is deprecated and archived. Migrate to the actively maintained go.uber.org/mock fork.

Changes:

  • Update go.mod to use go.uber.org/mock v0.6.0
  • Update hack/tools/go.mod and tools.go for mockgen
  • Update Makefile mockgen build target
  • Regenerate all mock files with new mockgen
  • Update controller test imports

Checklist:

  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • E2E tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@metal3-io-bot metal3-io-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 26, 2026
@metal3-io-bot
Copy link
Contributor

Hi @MaxRink. Thanks for your PR.

I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@metal3-io-bot metal3-io-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 26, 2026
@tuminoid
Copy link
Member

/ok-to-test

@metal3-io-bot metal3-io-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 28, 2026
Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

Fix the DCO please.

The github.com/golang/mock package is deprecated and archived. Migrate to the
actively maintained go.uber.org/mock fork.

Changes:
- Update go.mod to use go.uber.org/mock v0.6.0
- Update hack/tools/go.mod and tools.go for mockgen
- Update Makefile mockgen build target
- Regenerate all mock files with new mockgen
- Update controller test imports

Signed-off-by: Maximilian Rink <maximilian.rink@telekom.de>
@MaxRink MaxRink force-pushed the fix/migrate-to-uber-mock branch from 50616ee to 1744b75 Compare January 28, 2026 10:50
@tuminoid
Copy link
Member

/test metal3-centos-e2e-integration-test-main metal3-ubuntu-e2e-integration-test-main

Copy link
Member

@tuminoid tuminoid left a comment

Choose a reason for hiding this comment

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

This is follow-up to metal3-io/cluster-api-provider-metal3#3109 which was merged in CAPM3.

/approve

Thanks for the contribution!

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tuminoid

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

The pull request process is described here

Details 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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 28, 2026
@tuminoid
Copy link
Member

/retest

@metal3-io-bot
Copy link
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@metal3-io-bot metal3-io-bot added the needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. label Feb 2, 2026
@peppi-lotta
Copy link
Member

@MaxRink This looks good! Thank you for the contribution. Please rebase and I will LGTM :)

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates that a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants