Skip to content

CNF-23388: mockgen deprecated: use uber-go/mock instead#131

Open
sebrandon1 wants to merge 1 commit into
openshift:mainfrom
sebrandon1:mockgen_deprecation
Open

CNF-23388: mockgen deprecated: use uber-go/mock instead#131
sebrandon1 wants to merge 1 commit into
openshift: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

Copy link
Copy Markdown
Member

@Karthik-K-N Karthik-K-N left a comment

Choose a reason for hiding this comment

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

Thank you for the PR
Test failure is unrelated to this Platform

/lgtm
/approve

@Karthik-K-N
Copy link
Copy Markdown
Member

/test okd-scos-e2e-aws-ovn

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2025
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Karthik-K-N, sebrandon1

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 14, 2025
@Karthik-K-N
Copy link
Copy Markdown
Member

/override okd-scos-e2e-aws-ovn

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 19, 2025

@Karthik-K-N: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • okd-scos-e2e-aws-ovn

Only the following failed contexts/checkruns were expected:

  • ci/prow/generate
  • ci/prow/goimports
  • ci/prow/golint
  • ci/prow/govet
  • ci/prow/images
  • ci/prow/okd-scos-e2e-aws-ovn
  • ci/prow/okd-scos-images
  • ci/prow/security
  • ci/prow/unit
  • ci/prow/verify-deps
  • pull-ci-openshift-machine-api-provider-powervs-main-generate
  • pull-ci-openshift-machine-api-provider-powervs-main-goimports
  • pull-ci-openshift-machine-api-provider-powervs-main-golint
  • pull-ci-openshift-machine-api-provider-powervs-main-govet
  • pull-ci-openshift-machine-api-provider-powervs-main-images
  • pull-ci-openshift-machine-api-provider-powervs-main-okd-scos-e2e-aws-ovn
  • pull-ci-openshift-machine-api-provider-powervs-main-okd-scos-images
  • pull-ci-openshift-machine-api-provider-powervs-main-security
  • pull-ci-openshift-machine-api-provider-powervs-main-unit
  • pull-ci-openshift-machine-api-provider-powervs-main-verify-deps
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

Details

In response to this:

/override okd-scos-e2e-aws-ovn

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.

@Karthik-K-N
Copy link
Copy Markdown
Member

Since the failure is not related to the platform PowerVS

/override ci/prow/okd-scos-e2e-aws-ovn

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Nov 19, 2025

@Karthik-K-N: Overrode contexts on behalf of Karthik-K-N: ci/prow/okd-scos-e2e-aws-ovn

Details

In response to this:

Since the failure is not related to the platform PowerVS

/override ci/prow/okd-scos-e2e-aws-ovn

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.

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 16, 2026

New changes are detected. LGTM label has been removed.

@sebrandon1
Copy link
Copy Markdown
Member Author

/retest

@sebrandon1 sebrandon1 force-pushed the mockgen_deprecation branch from 236f8a5 to 485f24f Compare March 20, 2026 19:44
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 20, 2026

Warning

Rate limit exceeded

@sebrandon1 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 34 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b3689955-0552-4bef-9655-944b5d28fa82

📥 Commits

Reviewing files that changed from the base of the PR and between 485f24f and a69b36f.

⛔ Files ignored due to path filters (4)
  • 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/**
📒 Files selected for processing (7)
  • go.mod
  • pkg/actuators/machine/actuator_test.go
  • pkg/actuators/machine/instances_test.go
  • pkg/actuators/machine/reconciler_test.go
  • pkg/client/client.go
  • pkg/client/mock/client_generated.go
  • tools.go

Walkthrough

This PR migrates the codebase from the deprecated github.com/golang/mock package to go.uber.org/mock v0.6.0. Changes include updating the module dependency declaration, import paths across test files, go:generate directives, and regenerating mock code with modernized type signatures using any instead of interface{}.

Changes

Cohort / File(s) Summary
Dependency and tool declarations
go.mod, tools.go
Updated mockgen tool dependencies from github.com/golang/mock to go.uber.org/mock v0.6.0 across build requirements and module dependencies.
Test file imports
pkg/actuators/machine/actuator_test.go, pkg/actuators/machine/instances_test.go, pkg/actuators/machine/reconciler_test.go
Updated gomock import paths from github.com/golang/mock/gomock to go.uber.org/mock/gomock in test files without altering test logic or control flow.
Mock generation and code
pkg/client/client.go, pkg/client/mock/client_generated.go
Updated go:generate directive to use new mockgen tool path; regenerated mock code with updated gomock import, added isgomock struct{} field to MockClient, and converted interface{} parameters to any type across eleven recorder methods.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

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

Review rate limit: 0/10 reviews remaining, refill in 3 minutes and 34 seconds.

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

@sebrandon1 sebrandon1 force-pushed the mockgen_deprecation branch from 485f24f to a69b36f Compare April 30, 2026 19:04
@sebrandon1 sebrandon1 changed the title mockgen deprecated: use uber-go/mock instead CNF-23388: mockgen deprecated: use uber-go/mock instead Apr 30, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 30, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 30, 2026

@sebrandon1: This pull request references CNF-23388 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

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

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 30, 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/images a69b36f link true /test images
ci/prow/unit a69b36f link true /test unit
ci/prow/govet a69b36f link true /test govet
ci/prow/okd-scos-images a69b36f link true /test okd-scos-images
ci/prow/verify-deps a69b36f link true /test verify-deps
ci/prow/generate a69b36f link true /test generate

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

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants