cluster-api-provider-openstack icon indicating copy to clipboard operation
cluster-api-provider-openstack copied to clipboard

Dependency on deprecated github.com/golang/mock

Open mdbooth opened this issue 2 years ago • 4 comments

/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.

mdbooth avatar Oct 05 '23 16:10 mdbooth

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 ?

jichenjc avatar Oct 12 '23 08:10 jichenjc

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"

EmilienM avatar Nov 01 '23 17:11 EmilienM

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-triage-robot avatar Jan 31 '24 15:01 k8s-triage-robot

/remove-lifecycle stale

mdbooth avatar Feb 02 '24 09:02 mdbooth

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.

MykolaRodin avatar May 01 '24 13:05 MykolaRodin

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

mdbooth avatar May 01 '24 16:05 mdbooth

Hi @mdbooth

Thank you for the explanation. I have created https://github.com/kubernetes-sigs/cluster-api-provider-openstack/pull/2048

MykolaRodin avatar May 01 '24 17:05 MykolaRodin