Skip to content

HIVE-2998: mockgen deprecated: use uber-go/mock instead#2781

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

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

Conversation

@sebrandon1
Copy link
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 openshift-ci bot requested review from 2uasimojo and jstuever November 13, 2025 17:47
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 13, 2025

[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 suhanime 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

@2uasimojo 2uasimojo changed the title mockgen deprecated: use uber-go/mock instead HIVE-2998: mockgen deprecated: use uber-go/mock instead Nov 13, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 13, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Nov 13, 2025

@sebrandon1: This pull request references HIVE-2998 which is a valid jira issue.

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-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2026
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.30%. Comparing base (3ea8a7f) to head (9df3aaa).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2781   +/-   ##
=======================================
  Coverage   50.30%   50.30%           
=======================================
  Files         280      280           
  Lines       34309    34309           
=======================================
  Hits        17258    17258           
  Misses      15690    15690           
  Partials     1361     1361           
Files with missing lines Coverage Δ
pkg/awsclient/mock/client_generated.go 68.76% <ø> (ø)
pkg/azureclient/mock/client_generated.go 69.66% <ø> (ø)
...ler/dnsendpoint/nameserver/mock/query_generated.go 100.00% <ø> (ø)
pkg/controller/dnszone/test_helpers.go 100.00% <ø> (ø)
...ontroller/hibernation/mock/csr_helper_generated.go 100.00% <ø> (ø)
...hibernation/mock/hibernation_actuator_generated.go 76.92% <ø> (ø)
.../controller/machinepool/mock/actuator_generated.go 100.00% <ø> (ø)
...er/privatelink/actuator/mock/actuator_generated.go 100.00% <ø> (ø)
pkg/gcpclient/mock/client_generated.go 85.56% <ø> (ø)
pkg/ibmclient/mock/client_generated.go 36.94% <ø> (ø)
... and 3 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sebrandon1
Copy link
Member Author

/retest

@red-hat-konflux
Copy link
Contributor

Caution

There are some errors in your PipelineRun template.

PipelineRun Error
hive-mce-210-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-211-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-26-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-27-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-28-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-mce-29-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request
hive-on-pull-request CEL expression evaluation error: expression "event == \"pull_request\" && !body.pull_request.draft && target_branch == \"master\" && !files.all.all(x, x.matches('^docs/|\\\\.md$|^(?:.*/)?(?:\\\\.gitignore|OWNERS|PROJECT|LICENSE)$'))\n" failed to evaluate: no such key: pull_request

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 9, 2026
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 18, 2026
https://github.com/golang/mock is marked as archived as of June 27, 2023.
They recommend using go.uber.org/mock.

This PR changes the dependency to one that is maintained.

Changes:
- Updated Makefile to install uber-go/mock mockgen
- Updated go.mod/go.sum to use go.uber.org/mock v0.6.0
- Updated all test files to import go.uber.org/mock/gomock
- Updated all generated mock files
- Fixed gomock.InOrder calls to use []any instead of []*gomock.Call
- Re-vendored dependencies

Tracking issue: redhat-best-practices-for-k8s/telco-bot#45
@sebrandon1 sebrandon1 force-pushed the mockgen_deprecation branch from 0745186 to 9df3aaa Compare March 2, 2026 20:15
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 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/e2e-vsphere e3aff7f link true /test e2e-vsphere
ci/prow/e2e-openstack e3aff7f link true /test e2e-openstack
ci/prow/e2e-azure 9df3aaa link true /test e2e-azure
ci/prow/verify 9df3aaa link true /test verify
ci/prow/security 9df3aaa link true /test security

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

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