From c74d937280c2ec707936a72d07dc2a5dd252c5d2 Mon Sep 17 00:00:00 2001 From: Dmitriy Matrenichev Date: Fri, 9 Jun 2023 17:53:08 -0400 Subject: [PATCH] chore: bump github.com/cosi-project/runtime Replace resource.Resource with meta.ResourceWithRD where possible. Signed-off-by: Dmitriy Matrenichev --- go.mod | 2 +- go.sum | 4 ++-- internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go | 4 ++-- pkg/machinery/go.mod | 2 +- pkg/machinery/go.sum | 4 ++-- pkg/machinery/resources/cluster/cluster_test.go | 4 ++-- pkg/machinery/resources/config/config_test.go | 4 ++-- pkg/machinery/resources/cri/cri_test.go | 4 ++-- pkg/machinery/resources/etcd/etcd_test.go | 4 ++-- pkg/machinery/resources/files/files_test.go | 4 ++-- pkg/machinery/resources/hardware/hardware_test.go | 4 ++-- pkg/machinery/resources/k8s/k8s_test.go | 4 ++-- pkg/machinery/resources/kubeaccess/kubeaccess_test.go | 4 ++-- pkg/machinery/resources/kubespan/kubespan_test.go | 4 ++-- pkg/machinery/resources/network/network_test.go | 4 ++-- pkg/machinery/resources/perf/perf_test.go | 4 ++-- pkg/machinery/resources/runtime/runtime_test.go | 4 ++-- pkg/machinery/resources/secrets/secrets_test.go | 4 ++-- pkg/machinery/resources/time/time_test.go | 4 ++-- pkg/machinery/resources/v1alpha1/v1alpha1_test.go | 4 ++-- 20 files changed, 38 insertions(+), 38 deletions(-) diff --git a/go.mod b/go.mod index f8b0259e7..e6ff974de 100644 --- a/go.mod +++ b/go.mod @@ -37,7 +37,7 @@ require ( github.com/containernetworking/plugins v1.3.0 github.com/coreos/go-iptables v0.6.0 github.com/coreos/go-semver v0.3.1 - github.com/cosi-project/runtime v0.3.1-alpha.4 + github.com/cosi-project/runtime v0.3.1-alpha.5 github.com/docker/distribution v2.8.2+incompatible github.com/docker/docker v24.0.2+incompatible github.com/docker/go-connections v0.4.0 diff --git a/go.sum b/go.sum index 63adf14b9..7050ecf84 100644 --- a/go.sum +++ b/go.sum @@ -458,8 +458,8 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cosi-project/runtime v0.3.1-alpha.4 h1:TXrn1ka+pw2YeywKZjA9b4mNoz4a9HBX9ovR4YtkDGc= -github.com/cosi-project/runtime v0.3.1-alpha.4/go.mod h1:GubXzK7vQFe4VyrWL/eXaMU4T1pXBx9KoDj0GJz6miw= +github.com/cosi-project/runtime v0.3.1-alpha.5 h1:HhL/lf2Jd+xEqHkIIeMqEkVuAGctR3h/2F0mmCtq8Zc= +github.com/cosi-project/runtime v0.3.1-alpha.5/go.mod h1:GubXzK7vQFe4VyrWL/eXaMU4T1pXBx9KoDj0GJz6miw= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= diff --git a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go index 97e057999..44b8fb7e3 100644 --- a/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go +++ b/internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_state.go @@ -7,7 +7,7 @@ package v1alpha2 import ( "context" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -93,7 +93,7 @@ func NewState() (*State, error) { } // register Talos resources - for _, r := range []resource.Resource{ + for _, r := range []meta.ResourceWithRD{ &v1alpha1.Service{}, &cluster.Affiliate{}, &cluster.Config{}, diff --git a/pkg/machinery/go.mod b/pkg/machinery/go.mod index 54862a655..11d4ac6b9 100644 --- a/pkg/machinery/go.mod +++ b/pkg/machinery/go.mod @@ -8,7 +8,7 @@ replace gopkg.in/yaml.v3 => github.com/unix4ever/yaml v0.0.0-20220527175918-f17b require ( github.com/containerd/go-cni v1.1.9 - github.com/cosi-project/runtime v0.3.1-alpha.4 + github.com/cosi-project/runtime v0.3.1-alpha.5 github.com/dustin/go-humanize v1.0.1 github.com/evanphx/json-patch v5.6.0+incompatible github.com/ghodss/yaml v1.0.0 diff --git a/pkg/machinery/go.sum b/pkg/machinery/go.sum index 7b968bd4f..c0c66a5cc 100644 --- a/pkg/machinery/go.sum +++ b/pkg/machinery/go.sum @@ -21,8 +21,8 @@ github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9 github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= -github.com/cosi-project/runtime v0.3.1-alpha.4 h1:TXrn1ka+pw2YeywKZjA9b4mNoz4a9HBX9ovR4YtkDGc= -github.com/cosi-project/runtime v0.3.1-alpha.4/go.mod h1:GubXzK7vQFe4VyrWL/eXaMU4T1pXBx9KoDj0GJz6miw= +github.com/cosi-project/runtime v0.3.1-alpha.5 h1:HhL/lf2Jd+xEqHkIIeMqEkVuAGctR3h/2F0mmCtq8Zc= +github.com/cosi-project/runtime v0.3.1-alpha.5/go.mod h1:GubXzK7vQFe4VyrWL/eXaMU4T1pXBx9KoDj0GJz6miw= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/pkg/machinery/resources/cluster/cluster_test.go b/pkg/machinery/resources/cluster/cluster_test.go index 1c9a89263..1b8aa6941 100644 --- a/pkg/machinery/resources/cluster/cluster_test.go +++ b/pkg/machinery/resources/cluster/cluster_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -25,7 +25,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &cluster.Affiliate{}, &cluster.Config{}, &k8s.APIServerEndpoints{}, diff --git a/pkg/machinery/resources/config/config_test.go b/pkg/machinery/resources/config/config_test.go index e868887d5..f12935941 100644 --- a/pkg/machinery/resources/config/config_test.go +++ b/pkg/machinery/resources/config/config_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &config.MachineType{}, &config.MachineConfig{}, } { diff --git a/pkg/machinery/resources/cri/cri_test.go b/pkg/machinery/resources/cri/cri_test.go index 8f3d63da5..91905bf17 100644 --- a/pkg/machinery/resources/cri/cri_test.go +++ b/pkg/machinery/resources/cri/cri_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &cri.SeccompProfile{}, } { assert.NoError(t, resourceRegistry.Register(ctx, resource)) diff --git a/pkg/machinery/resources/etcd/etcd_test.go b/pkg/machinery/resources/etcd/etcd_test.go index 9fc2917bc..2d7f3b43b 100644 --- a/pkg/machinery/resources/etcd/etcd_test.go +++ b/pkg/machinery/resources/etcd/etcd_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -25,7 +25,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &etcd.PKIStatus{}, } { assert.NoError(t, resourceRegistry.Register(ctx, resource)) diff --git a/pkg/machinery/resources/files/files_test.go b/pkg/machinery/resources/files/files_test.go index ab0802e20..4eb25b01e 100644 --- a/pkg/machinery/resources/files/files_test.go +++ b/pkg/machinery/resources/files/files_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &files.EtcFileSpec{}, &files.EtcFileStatus{}, } { diff --git a/pkg/machinery/resources/hardware/hardware_test.go b/pkg/machinery/resources/hardware/hardware_test.go index 139338785..c87147be2 100644 --- a/pkg/machinery/resources/hardware/hardware_test.go +++ b/pkg/machinery/resources/hardware/hardware_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &hardware.Processor{}, &hardware.MemoryModule{}, } { diff --git a/pkg/machinery/resources/k8s/k8s_test.go b/pkg/machinery/resources/k8s/k8s_test.go index ec3e36f19..84b8aeff9 100644 --- a/pkg/machinery/resources/k8s/k8s_test.go +++ b/pkg/machinery/resources/k8s/k8s_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/resource/protobuf" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" @@ -27,7 +27,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &k8s.AdmissionControlConfig{}, &k8s.APIServerConfig{}, &k8s.AuditPolicyConfig{}, diff --git a/pkg/machinery/resources/kubeaccess/kubeaccess_test.go b/pkg/machinery/resources/kubeaccess/kubeaccess_test.go index 386160c8a..ce1cd9b9f 100644 --- a/pkg/machinery/resources/kubeaccess/kubeaccess_test.go +++ b/pkg/machinery/resources/kubeaccess/kubeaccess_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &kubeaccess.Config{}, } { assert.NoError(t, resourceRegistry.Register(ctx, resource)) diff --git a/pkg/machinery/resources/kubespan/kubespan_test.go b/pkg/machinery/resources/kubespan/kubespan_test.go index ce2e040e3..d60f75c79 100644 --- a/pkg/machinery/resources/kubespan/kubespan_test.go +++ b/pkg/machinery/resources/kubespan/kubespan_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &kubespan.Config{}, &kubespan.Endpoint{}, &kubespan.Identity{}, diff --git a/pkg/machinery/resources/network/network_test.go b/pkg/machinery/resources/network/network_test.go index 70c1ade48..0e25c47c1 100644 --- a/pkg/machinery/resources/network/network_test.go +++ b/pkg/machinery/resources/network/network_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &network.AddressStatus{}, &network.AddressSpec{}, &network.HardwareAddr{}, diff --git a/pkg/machinery/resources/perf/perf_test.go b/pkg/machinery/resources/perf/perf_test.go index e755de8b5..51a087505 100644 --- a/pkg/machinery/resources/perf/perf_test.go +++ b/pkg/machinery/resources/perf/perf_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &perf.Memory{}, &perf.CPU{}, } { diff --git a/pkg/machinery/resources/runtime/runtime_test.go b/pkg/machinery/resources/runtime/runtime_test.go index 8b9e0442b..8d81e7f37 100644 --- a/pkg/machinery/resources/runtime/runtime_test.go +++ b/pkg/machinery/resources/runtime/runtime_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &runtime.DevicesStatus{}, &runtime.EventSinkConfig{}, &runtime.ExtensionStatus{}, diff --git a/pkg/machinery/resources/secrets/secrets_test.go b/pkg/machinery/resources/secrets/secrets_test.go index abe93d108..593b6ba90 100644 --- a/pkg/machinery/resources/secrets/secrets_test.go +++ b/pkg/machinery/resources/secrets/secrets_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &secrets.API{}, &secrets.CertSAN{}, &secrets.Etcd{}, diff --git a/pkg/machinery/resources/time/time_test.go b/pkg/machinery/resources/time/time_test.go index 8619d7f1a..9bd379477 100644 --- a/pkg/machinery/resources/time/time_test.go +++ b/pkg/machinery/resources/time/time_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &time.Status{}, } { assert.NoError(t, resourceRegistry.Register(ctx, resource)) diff --git a/pkg/machinery/resources/v1alpha1/v1alpha1_test.go b/pkg/machinery/resources/v1alpha1/v1alpha1_test.go index 7e09e74f8..3bd8371a4 100644 --- a/pkg/machinery/resources/v1alpha1/v1alpha1_test.go +++ b/pkg/machinery/resources/v1alpha1/v1alpha1_test.go @@ -8,7 +8,7 @@ import ( "context" "testing" - "github.com/cosi-project/runtime/pkg/resource" + "github.com/cosi-project/runtime/pkg/resource/meta" "github.com/cosi-project/runtime/pkg/state" "github.com/cosi-project/runtime/pkg/state/impl/inmem" "github.com/cosi-project/runtime/pkg/state/impl/namespaced" @@ -24,7 +24,7 @@ func TestRegisterResource(t *testing.T) { resources := state.WrapCore(namespaced.NewState(inmem.Build)) resourceRegistry := registry.NewResourceRegistry(resources) - for _, resource := range []resource.Resource{ + for _, resource := range []meta.ResourceWithRD{ &v1alpha1.Service{}, } { assert.NoError(t, resourceRegistry.Register(ctx, resource))