From 5efe1a23d8c21e51c6a63a472a0d5320342187ec Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Fri, 17 Nov 2023 22:03:39 +0800 Subject: [PATCH] Replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml` (#308) At the time of making this commit, the package `github.com/ghodss/yaml` is no longer actively maintained. `sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively maintained by Kubernetes SIG. Signed-off-by: Eng Zer Jun --- go.mod | 3 +-- go.sum | 1 - pkg/validation/internal/crd_test.go | 2 +- pkg/validation/internal/csv_test.go | 2 +- pkg/validation/internal/object_test.go | 5 +++-- pkg/validation/internal/operatorgroup_test.go | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 57ff246fe..6b1a0a8bf 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ go 1.19 require ( github.com/blang/semver/v4 v4.0.0 - github.com/ghodss/yaml v1.0.0 github.com/go-bindata/go-bindata/v3 v3.1.3 github.com/google/cel-go v0.15.3 github.com/sirupsen/logrus v1.9.2 @@ -16,6 +15,7 @@ require ( k8s.io/apimachinery v0.27.7 k8s.io/client-go v0.27.7 sigs.k8s.io/controller-runtime v0.15.0 + sigs.k8s.io/yaml v1.3.0 ) require ( @@ -91,5 +91,4 @@ require ( sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.1.2 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index 6746ffad8..3a5a8daf2 100644 --- a/go.sum +++ b/go.sum @@ -78,7 +78,6 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-bindata/go-bindata/v3 v3.1.3 h1:F0nVttLC3ws0ojc7p60veTurcOm//D4QBODNM7EGrCI= github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= diff --git a/pkg/validation/internal/crd_test.go b/pkg/validation/internal/crd_test.go index 73c948edc..f28804fcf 100644 --- a/pkg/validation/internal/crd_test.go +++ b/pkg/validation/internal/crd_test.go @@ -9,7 +9,7 @@ import ( v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "github.com/ghodss/yaml" + "sigs.k8s.io/yaml" ) func TestValidateCRD(t *testing.T) { diff --git a/pkg/validation/internal/csv_test.go b/pkg/validation/internal/csv_test.go index 6925216aa..440cbcf3c 100644 --- a/pkg/validation/internal/csv_test.go +++ b/pkg/validation/internal/csv_test.go @@ -8,9 +8,9 @@ import ( operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/ghodss/yaml" "github.com/operator-framework/api/pkg/validation/errors" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/yaml" ) func TestValidateCSV(t *testing.T) { diff --git a/pkg/validation/internal/object_test.go b/pkg/validation/internal/object_test.go index ad41f423c..573497c6a 100644 --- a/pkg/validation/internal/object_test.go +++ b/pkg/validation/internal/object_test.go @@ -1,10 +1,11 @@ package internal import ( - "github.com/ghodss/yaml" "io/ioutil" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "testing" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "sigs.k8s.io/yaml" ) func TestValidateObject(t *testing.T) { diff --git a/pkg/validation/internal/operatorgroup_test.go b/pkg/validation/internal/operatorgroup_test.go index 00daa7be2..b6eddac53 100644 --- a/pkg/validation/internal/operatorgroup_test.go +++ b/pkg/validation/internal/operatorgroup_test.go @@ -5,9 +5,9 @@ import ( "path/filepath" "testing" - "github.com/ghodss/yaml" operatorsv1 "github.com/operator-framework/api/pkg/operators/v1" "github.com/operator-framework/api/pkg/validation/errors" + "sigs.k8s.io/yaml" ) func TestValidateOperatorGroup(t *testing.T) {