Skip to content

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

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

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

Conversation

@sebrandon1
Copy link
Member

@sebrandon1 sebrandon1 commented Nov 13, 2025

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 openshift-ci bot requested review from a7vicky and bmeng November 13, 2025 20:50
@codecov-commenter
Copy link

codecov-commenter commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.25%. Comparing base (feeca5a) to head (028fb07).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #214   +/-   ##
=======================================
  Coverage   66.25%   66.25%           
=======================================
  Files          23       23           
  Lines        1544     1544           
=======================================
  Hits         1023     1023           
  Misses        445      445           
  Partials       76       76           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tkong-redhat
Copy link
Contributor

/retest

@tkong-redhat
Copy link
Contributor

validation failed. Need update the base image

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 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: 5cdbc255-2c25-486f-aa1e-9a08b962bf34

📥 Commits

Reviewing files that changed from the base of the PR and between 814e018 and 028fb07.

⛔ Files ignored due to path filters (1)
  • go.sum is excluded by !**/*.sum
📒 Files selected for processing (4)
  • docs/testing.md
  • go.mod
  • pkg/util/test/mockgenerator/client/client.go
  • tools.go
✅ Files skipped from review due to trivial changes (3)
  • docs/testing.md
  • pkg/util/test/mockgenerator/client/client.go
  • tools.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • go.mod

Walkthrough

Replaces GoMock references with Uber's fork go.uber.org/mock across docs, tooling, and code imports; updates go.mod to remove github.com/golang/mock and bump several transitive golang.org/x/... modules.

Changes

Cohort / File(s) Summary
Documentation
docs/testing.md
Updated GoMock repository link from https://github.com/golang/mock to https://github.com/uber-go/mock.
Module file
go.mod
Removed direct github.com/golang/mock requirement; upgraded go.uber.org/mock and multiple golang.org/x/... indirect dependencies; added golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated as indirect.
Tooling & code imports
tools.go, pkg/util/test/mockgenerator/client/client.go
Replaced blank imports referencing github.com/golang/mock/... with go.uber.org/mock/... for mockgen tooling and model types.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'mockgen deprecated: use uber-go/mock instead' accurately and clearly summarizes the main change: migrating from golang/mock to uber-go/mock due to deprecation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed This pull request makes no changes to test files or test code, limiting modifications to dependency declarations, build tool configurations, import paths in a utility file, and documentation.
Test Structure And Quality ✅ Passed This PR does not modify test files (*_test.go), only dependency management and documentation, making the test structure check not applicable.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

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

@sebrandon1
Copy link
Member Author

/retest

@sebrandon1 sebrandon1 force-pushed the mockgen_deprecation branch from 814e018 to 028fb07 Compare March 20, 2026 19:44
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sebrandon1
Once this PR has been reviewed and has the lgtm label, please assign rbhilare 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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 20, 2026

@sebrandon1: The following test 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/validate 028fb07 link true /test validate

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.

3 participants