Preflight Checklist

  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Problem Description

Recommended to move off of using the gopkg.in/yaml.v3 package. This package is no longer maintained.

Proposed Solution

One option is to use sigs.k8s.io/yaml. That has minimal dependencies and should remain well maintained.

Alternatives Considered

No response

Additional Information

No response

Comment From: ccoVeille

For lazy people like me 😁, here is the repository link

https://github.com/kubernetes-sigs/yaml

Comment From: ccoVeille

Some alternative for records:

https://github.com/goccy/go-yaml

Please note, I have no preference in the library choice

Comment From: sagikazarmark

The yaml library has been replaced with a maintained fork by the yaml team.

I'd appreciate if someone could give it a try before releasing.

Thanks!

Comment From: github-actions[bot]

Issues with no activity for 30 days are marked stale and subject to being closed.

Comment From: ccoVeille

Thanks for the reminder.

Comment From: ccoVeille

Unless I'm wrong gopkg.in is only mentioned as an indirect dependency

$ go mod why gopkg.in/yaml.v3
github.com/spf13/viper
github.com/spf13/viper.test
github.com/stretchr/testify/assert
github.com/stretchr/testify/assert/yaml
gopkg.in/yaml.v3

So it's about testify using gopkg.in/yaml.v3

Here is the related issues

  • https://github.com/stretchr/testify/issues/1724

So here, I would say if the issue is only the tests, maybe there is no need to change anything.

As viper doesn't need it when integrated as a lib.

So if someone has an issue in one project, they could do this

Just a reminder: anyone can do this replacement on his own project that uses Testify either directly or indirectly:

go mod edit -replace=gopkg.in/yaml.v3=go.yaml.in/yaml/v3@latest go mod tidy Originally posted by @dolmen in #1724

Comment From: sagikazarmark

Yep, that library is no longer in use for decoding yaml and shouldn't be compiled into binaries.

The latest release contains the change to the maintained fork.

Comment From: ccoVeille

It was indeed fixed with

  • https://github.com/spf13/viper/pull/2040