Skip to content

mockgen deprecated: use uber-go/mock instead#125

Open
sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
sebrandon1:mockgen_deprecation
Open

mockgen deprecated: use uber-go/mock instead#125
sebrandon1 wants to merge 1 commit intoopenshift:mainfrom
sebrandon1:mockgen_deprecation

Conversation

@sebrandon1
Copy link
Copy Markdown
Member

https://github.com/golang/mock is marked as archived as of June 27, 2023. They recommend using go.uber.org/mock.

This PR attempts to change the dependency to one that is maintained.

Tracking issue: redhat-best-practices-for-k8s/telco-bot#45

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Nov 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

@sebrandon1
Copy link
Copy Markdown
Member Author

/retest

@sebrandon1 sebrandon1 force-pushed the mockgen_deprecation branch from 1b706cf to c21c427 Compare March 20, 2026 19:44
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f69c99c8-2dbb-4404-9e0f-3568feb713c3

📥 Commits

Reviewing files that changed from the base of the PR and between e00a719 and c21c427.

⛔ Files ignored due to path filters (17)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/golang/mock/CONTRIBUTORS is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/golang/mock/mockgen/reflect.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/golang/mock/mockgen/version.1.11.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/AUTHORS is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/archive.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/deprecated.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/generic.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/gob.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/mockgen.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/model/model.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/model/model_gotypes.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/package_mode.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/parse.go is excluded by !vendor/**, !**/vendor/**
  • vendor/go.uber.org/mock/mockgen/version.go is excluded by !vendor/**, !**/vendor/**
  • vendor/modules.txt is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (2)
  • go.mod
  • tools/tools.go

Walkthrough

The pull request migrates the mock library dependency from golang/mock to go.uber.org/mock, updating both the direct module requirement in go.mod and the corresponding tool import reference in tools/tools.go.

Changes

Cohort / File(s) Summary
Mock library migration
go.mod, tools/tools.go
Replaced github.com/golang/mock v1.6.0 with go.uber.org/mock v0.6.0 as the primary mocking dependency; updated tool import to reference the new package location.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 20, 2026

@sebrandon1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn 1b7522d link false /test okd-scos-e2e-aws-ovn
ci/prow/regression-clusterinfra-nutanix-ipi-mapi c21c427 link false /test regression-clusterinfra-nutanix-ipi-mapi
ci/prow/e2e-aws c21c427 link true /test e2e-aws

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

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.

1 participant