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

Use sigs.k8s.io/yaml/goyaml.v3 #33979

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ require (
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/robfig/cron.v2 v2.0.0-20150107220207-be2e0b0deed5 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know why we still have indirect dependencies?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes: #33971

Let's keep the issue open until it's dropped from go.mod

k8s.io/api v0.25.9
k8s.io/apimachinery v0.26.5
k8s.io/client-go v0.25.9
Expand All @@ -87,7 +87,7 @@ require (
sigs.k8s.io/controller-runtime v0.12.3
sigs.k8s.io/controller-tools v0.9.2
sigs.k8s.io/prow v0.0.0-20240419142743-3cb2506c2ff3
sigs.k8s.io/yaml v1.3.0
sigs.k8s.io/yaml v1.4.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1158,5 +1158,5 @@ sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kF
sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
2 changes: 1 addition & 1 deletion hack/ts-rollup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"sync"

"github.com/sirupsen/logrus"
"gopkg.in/yaml.v3"
yaml "sigs.k8s.io/yaml/goyaml.v3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/genyaml/genyaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ import (
"sync"

"github.com/clarketm/json"
yaml3 "gopkg.in/yaml.v3"
"k8s.io/apimachinery/pkg/util/sets"
yaml3 "sigs.k8s.io/yaml/goyaml.v3"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/genyaml/genyaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strings"
"testing"

yaml3 "gopkg.in/yaml.v3"
yaml3 "sigs.k8s.io/yaml/goyaml.v3"

simplealiases "k8s.io/test-infra/pkg/genyaml/testdata/alias_simple_types"
aliases "k8s.io/test-infra/pkg/genyaml/testdata/alias_types"
Expand Down
4 changes: 1 addition & 3 deletions releng/config-forker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"strings"
"text/template"

gyaml "gopkg.in/yaml.v2"
"sigs.k8s.io/yaml"
gyaml "sigs.k8s.io/yaml/goyaml.v2"

v1 "k8s.io/api/core/v1"
prowapi "sigs.k8s.io/prow/pkg/apis/prowjobs/v1"
Expand Down Expand Up @@ -487,8 +487,6 @@ func main() {

// We need to use FutureLineWrap because "fork-per-release-cron" is too long
// causing the annotation value to be split into two lines.
// We use gopkg.in/yaml here because sigs.k8s.io/yaml doesn't export this
// function. sigs.k8s.io/yaml uses gopkg.in/yaml under the hood.
gyaml.FutureLineWrap()

output, err := yaml.Marshal(map[string]interface{}{
Expand Down
4 changes: 1 addition & 3 deletions releng/config-rotator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"os"
"strings"

gyaml "gopkg.in/yaml.v2"
"sigs.k8s.io/yaml"
gyaml "sigs.k8s.io/yaml/goyaml.v2"

"sigs.k8s.io/prow/pkg/config"
)
Expand Down Expand Up @@ -146,8 +146,6 @@ func main() {

// We need to use FutureLineWrap because "fork-per-release-cron" is too long
// causing the annotation value to be split into two lines.
// We use gopkg.in/yaml here because sigs.k8s.io/yaml doesn't export this
// function. sigs.k8s.io/yaml uses gopkg.in/yaml under the hood.
gyaml.FutureLineWrap()

output, err := yaml.Marshal(map[string]interface{}{
Expand Down