Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency on deprecated github.com/golang/mock #1711

Closed
mdbooth opened this issue Oct 5, 2023 · 7 comments · Fixed by #2048
Closed

Dependency on deprecated github.com/golang/mock #1711

mdbooth opened this issue Oct 5, 2023 · 7 comments · Fixed by #2048
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@mdbooth
Copy link
Contributor

mdbooth commented Oct 5, 2023

/kind bug

We currently use golang/mock, but according to their GitHub page the project is archived and we should switch to https://github.com/uber-go/mock.

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 5, 2023
@jichenjc
Copy link
Contributor

I only see

import mock "github.com/stretchr/testify/mock"

and

# grep 'golang/mock' * -r
go.sum:github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
go.sum:github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
go.sum:github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
go.sum:github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
go.sum:github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
go.sum:github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
go.sum:github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
go.sum:github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=

where do we use golang/mock ?

@EmilienM
Copy link
Contributor

EmilienM commented Nov 1, 2023

controllers/openstackcluster_controller_test.go:	"github.com/golang/mock/gomock"
controllers/suite_test.go:	"github.com/golang/mock/gomock"
pkg/clients/mock/compute.go:	gomock "github.com/golang/mock/gomock"
pkg/clients/mock/image.go:	gomock "github.com/golang/mock/gomock"
pkg/clients/mock/loadbalancer.go:	gomock "github.com/golang/mock/gomock"
pkg/clients/mock/network.go:	gomock "github.com/golang/mock/gomock"
pkg/clients/mock/volume.go:	gomock "github.com/golang/mock/gomock"
pkg/cloud/services/compute/instance_test.go:	"github.com/golang/mock/gomock"
pkg/cloud/services/loadbalancer/loadbalancer_test.go:	"github.com/golang/mock/gomock"
pkg/cloud/services/networking/floatingip_test.go:	"github.com/golang/mock/gomock"
pkg/cloud/services/networking/trunk_test.go:	"github.com/golang/mock/gomock"
pkg/cloud/services/networking/port_test.go:	"github.com/golang/mock/gomock"
pkg/cloud/services/networking/network_test.go:	"github.com/golang/mock/gomock"
pkg/scope/mock.go:	"github.com/golang/mock/gomock"

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2024
@mdbooth
Copy link
Contributor Author

mdbooth commented Feb 2, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 2, 2024
@MykolaRodin
Copy link
Contributor

Hi everyone,

I have prepared the commit for this ticket. I have an SSH key in my profile settings yet I cannot push my changes:

git push --set-upstream origin m.rodin/issue-1711
ERROR: Permission to kubernetes-sigs/cluster-api-provider-openstack.git denied to MykolaRodin.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

If someone is interested in the commit for this ticket, please provide me with the required access rights or clarify what I am missing.

@mdbooth
Copy link
Contributor Author

mdbooth commented May 1, 2024

Hello, @MykolaRodin ! The way this works in GitHub is that you create your own fork of cluster-api-provider-openstack and push your change to a branch on your own fork. It will then prompt you to create a pull request against this repo to merge the change.

The process is documented here: https://docs.github.com/en/get-started/using-github/github-flow

@MykolaRodin
Copy link
Contributor

Hi @mdbooth

Thank you for the explanation. I have created #2048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants