chore(deps): migrate to go.yaml.in/yaml/v3#436
Conversation
gopkg.in/yaml.v3 is deprecated. Replace the direct dependency with go.yaml.in/yaml/v3 v3.0.4 which is the same code under the new module path. Remove the CVE-2022-28948 replace directive since v3.0.4 already includes the fix. gopkg.in/yaml.v3 remains as an indirect dependency via transitive imports (e.g. go-openapi/swag) and will resolve as upstreams migrate. Signed-off-by: Ville Vesilehto <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #436 +/- ##
==========================================
+ Coverage 55.41% 60.69% +5.27%
==========================================
Files 46 48 +2
Lines 4125 3722 -403
==========================================
- Hits 2286 2259 -27
+ Misses 1511 1104 -407
- Partials 328 359 +31 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Could we migrate the lib in github.com/argoproj/notifications-engine/examples/certmanager/controller as well? Or perhaps we could do a wholesale replace in go.mod to go.yaml.in/yaml/v3 v3.0.4?
MIght be worth upgrading k8s.io/client-go to 0.34 to be in sync with Argo CD (that's for another PR though)
Otherwise LGTM
|
Thanks for the quick review @blakepettersson!
So while $ go mod graph | grep 'gopkg.in/yaml.v3' |awk '{print $1}'|sort
dario.cat/[email protected]
github.com/argoproj/notifications-engine
github.com/go-openapi/[email protected]
github.com/go-openapi/[email protected]
github.com/go-openapi/[email protected]
github.com/google/[email protected]
github.com/prometheus/[email protected]
github.com/spf13/[email protected]
github.com/stretchr/[email protected]
github.com/stretchr/[email protected]
github.com/stretchr/[email protected]
github.com/stretchr/[email protected]
github.com/stretchr/[email protected]
github.com/stretchr/[email protected]
github.com/stretchr/[email protected]
go.opentelemetry.io/auto/[email protected]
go.opentelemetry.io/contrib/instrumentation/net/http/[email protected]
go.opentelemetry.io/[email protected]
go.opentelemetry.io/otel/[email protected]
go.opentelemetry.io/otel/[email protected]
gopkg.in/[email protected]
gopkg.in/[email protected]
k8s.io/[email protected]
k8s.io/[email protected]
k8s.io/[email protected]I think the Cobra one is the only low hanging fruit. Testify has not migrated yet, so the indirect ref would stay there regardless: stretchr/testify#1772
Unfortunately no: $ go mod edit -replace=gopkg.in/yaml.v3=go.yaml.in/yaml/[email protected]
$ go mod tidy
go: go.yaml.in/yaml/[email protected] used for two different module paths (go.yaml.in/yaml/v3 and gopkg.in/yaml.v3)See this discussion: yaml/go-yaml#208 |
gopkg.in/yaml.v3is deprecated: https://github.com/go-yaml/yaml/tree/v3Replace the direct dependency with
go.yaml.in/yaml/v3v3.0.4 which is the same code under the new module path. Remove the CVE-2022-28948 replace directive since v3.0.4 already includes the fix.gopkg.in/yaml.v3remains as an indirect dependency via transitive imports (e.g. go-openapi/swag) and will resolve as upstreams migrate: