From 21acdcf54e9c709623b324b34f8fc73072626ad2 Mon Sep 17 00:00:00 2001 From: Manish S V Kumar Date: Fri, 23 Oct 2026 14:22:55 +0530 Subject: [PATCH 1/2] feat!: migrate YAML types to github.com/pb33f/go-yaml vacuum v0.32.0+ requires pb33f/jsonpath v0.8.4, which switched its YAML node type from go.yaml.in/yaml/v4 to github.com/pb33f/go-yaml. Since Go module resolution selects a single jsonpath for the build, go-apiops was compiled against the new one and failed to type-check wherever a node crossed the jsonpath or libopenapi boundary: cannot use *go.yaml.in/yaml/v4.Node as *github.com/pb33f/go-yaml.Node This blocked the vacuum upgrade in both deck (Kong/deck#2299) and kongctl (Kong/kongctl#2549). Switch the yaml import across the 20 affected files and move to the first releases on the new node type: jsonpath v0.8.4 and libopenapi v0.41.6. The package selector stays `yaml.`, and every symbol in use is present in the fork, so no logic changes were needed. BREAKING CHANGE: *yaml.Node in the exported API is now github.com/pb33f/go-yaml rather than go.yaml.in/yaml/v4. This affects ~40 exported functions and methods plus yamlbasics.NodeSet, YamlArrayMatcher and YamlArrayIterator. Consumers that name the type must swap their own import. BREAKING CHANGE: the minimum Go version is now 1.26, required by libopenapi v0.41.x. Verified output is unchanged: all package tests pass, and against the pre-migration build the generated fixtures (62) and decK-format YAML output over 60 real config files (147 invocations of add-tags, remove-tags, list-tags, patch and merge) are byte-identical, including a case covering comments, anchors, merge keys, flow style, block scalars and non-ASCII scalars. Co-Authored-By: Claude Opus 5 --- deckformat/entitypointers.go | 2 +- go.mod | 16 +++++++------- go.sum | 35 +++++++++++++------------------ jsonbasics/jsonbasics.go | 2 +- namespace/namespace.go | 2 +- namespace/namespace_host.go | 2 +- namespace/namespace_test.go | 2 +- openapi2kong/openapi2kong.go | 2 +- openapi2kong/openapi2kong_test.go | 2 +- openapi2mcp/openapi2mcp.go | 2 +- openapitools/utils.go | 2 +- patch/deckpatch.go | 2 +- patch/deckpatchfile.go | 2 +- plugins/pluginfile.go | 2 +- plugins/plugins.go | 2 +- tags/tags.go | 2 +- yamlbasics/nodeset.go | 2 +- yamlbasics/nodeset_test.go | 2 +- yamlbasics/selectors.go | 2 +- yamlbasics/selectors_test.go | 2 +- yamlbasics/yamlbasics.go | 2 +- yamlbasics/yamlbasics_test.go | 2 +- 22 files changed, 42 insertions(+), 49 deletions(-) diff --git a/deckformat/entitypointers.go b/deckformat/entitypointers.go index c8b95f17..2e8e457e 100644 --- a/deckformat/entitypointers.go +++ b/deckformat/entitypointers.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" + "github.com/pb33f/go-yaml" "github.com/pb33f/jsonpath/pkg/jsonpath" - "go.yaml.in/yaml/v4" ) // EntityPointers is a map of entity names to an array of JSONpointers that can be used to find diff --git a/go.mod b/go.mod index d8ff87df..7e2a0563 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/kong/go-apiops -go 1.24.0 - -toolchain go1.24.10 +go 1.26.0 require ( github.com/go-logr/logr v1.4.2 @@ -12,29 +10,29 @@ require ( github.com/kong/go-slugify v1.0.0 github.com/onsi/ginkgo/v2 v2.22.2 github.com/onsi/gomega v1.36.2 - github.com/pb33f/jsonpath v0.7.1 - github.com/pb33f/libopenapi v0.33.0 + github.com/pb33f/go-yaml v0.1.1 + github.com/pb33f/jsonpath v0.8.4 + github.com/pb33f/libopenapi v0.41.6 github.com/spf13/cobra v1.8.1 github.com/stretchr/testify v1.11.1 github.com/yuin/gopher-lua v1.1.1 - go.yaml.in/yaml/v4 v4.0.0-rc.4 golang.org/x/term v0.29.0 sigs.k8s.io/yaml v1.4.0 ) require ( github.com/bahlo/generic-list-go v0.2.0 // indirect - github.com/buger/jsonparser v1.1.1 // indirect + github.com/buger/jsonparser v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/mozillazg/go-unidecode v0.2.0 // indirect - github.com/pb33f/ordered-map/v2 v2.3.0 // indirect + github.com/pb33f/ordered-map/v2 v2.3.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect golang.org/x/net v0.33.0 // indirect - golang.org/x/sync v0.19.0 // indirect + golang.org/x/sync v0.23.0 // indirect golang.org/x/sys v0.30.0 // indirect golang.org/x/text v0.21.0 // indirect golang.org/x/tools v0.28.0 // indirect diff --git a/go.sum b/go.sum index 6b46205e..c4eeb33f 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= +github.com/buger/jsonparser v1.1.2 h1:frqHqw7otoVbk5M8LlE/L7HTnIq2v9RX6EJ48i9AxJk= +github.com/buger/jsonparser v1.1.2/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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= @@ -23,26 +23,24 @@ github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/kong/go-slugify v1.0.0 h1:vCFAyf2sdoSlBtLcrmDWUFn0ohlpKiKvQfXZkO5vSKY= github.com/kong/go-slugify v1.0.0/go.mod h1:dbR2h3J2QKXQ1k0aww6cN7o4cIcwlWflr6RKRdcoaiw= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mozillazg/go-unidecode v0.2.0 h1:vFGEzAH9KSwyWmXCOblazEWDh7fOkpmy/Z4ArmamSUc= github.com/mozillazg/go-unidecode v0.2.0/go.mod h1:zB48+/Z5toiRolOZy9ksLryJ976VIwmDmpQ2quyt1aA= github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU= github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= -github.com/pb33f/jsonpath v0.7.1 h1:dEp6oIZuJbpDSyuHAl9m7GonoDW4M20BcD5vT0tPYRE= -github.com/pb33f/jsonpath v0.7.1/go.mod h1:zBV5LJW4OQOPatmQE2QdKpGQJvhDTlE5IEj6ASaRNTo= -github.com/pb33f/libopenapi v0.33.0 h1:s0mZhtxNW4ko8npYzMKVOUYsEs5QqZdywxGlbUE52z0= -github.com/pb33f/libopenapi v0.33.0/go.mod h1:e/dmd2Pf1nkjqkI0r7guFSyt9T5V0IIQKgs0L6B/3b0= -github.com/pb33f/ordered-map/v2 v2.3.0 h1:k2OhVEQkhTCQMhAicQ3Z6iInzoZNQ7L9MVomwKBZ5WQ= -github.com/pb33f/ordered-map/v2 v2.3.0/go.mod h1:oe5ue+6ZNhy7QN9cPZvPA23Hx0vMHnNVeMg4fGdCANw= +github.com/pb33f/go-yaml v0.1.1 h1:yWGmhVdwzionRnSc/hEJwcfq6PaZL2QdYzyReXBbX7Q= +github.com/pb33f/go-yaml v0.1.1/go.mod h1:QvWdkHP5VjFYAeHMQUkaPQqREaQnBNOXmWzAjNrnSdo= +github.com/pb33f/jsonpath v0.8.4 h1:Yx7fxsKl8scgERL22WhKDs2c6gYNNUonPSWEG8Y194s= +github.com/pb33f/jsonpath v0.8.4/go.mod h1:eO6mgdhw5RgzCxm/bXTi75VUs0/cCYJzdGjMCCUEI6M= +github.com/pb33f/libopenapi v0.41.6 h1:W1X/5rOaAk3/Mjwrt+DHaiJO6buhruKWrbQ+pumONkA= +github.com/pb33f/libopenapi v0.41.6/go.mod h1:mUldESjO6ownR1TCcywvoYp7e4v/bCdQyiiIqsgWne0= +github.com/pb33f/ordered-map/v2 v2.3.2 h1:wDyaZ2Pv9QLh64X4utCeD5Zoi9nIv2aW3lwv172O5PQ= +github.com/pb33f/ordered-map/v2 v2.3.2/go.mod h1:1OhFrXu3OYw3kM+FXF+Ug3ugmmZ9LE8z0JfQMLvtV0w= +github.com/pb33f/testify v0.1.1 h1:mnHe7uxKt8dyNYEGUspow72VjD264DB5rOJq4bz5tJw= +github.com/pb33f/testify v0.1.1/go.mod h1:keghMqOLECF1ENzESnfM+cwPcKN5uhTOpvbtjgL6aZg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= @@ -52,12 +50,10 @@ github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/yuin/gopher-lua v1.1.1 h1:kYKnWBjvbNP4XLT3+bPEwAXJx262OhaHDWDVOPjL46M= github.com/yuin/gopher-lua v1.1.1/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -go.yaml.in/yaml/v4 v4.0.0-rc.4 h1:UP4+v6fFrBIb1l934bDl//mmnoIZEDK0idg1+AIvX5U= -go.yaml.in/yaml/v4 v4.0.0-rc.4/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0= golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= @@ -68,9 +64,8 @@ golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/jsonbasics/jsonbasics.go b/jsonbasics/jsonbasics.go index 51ad3364..f31a1a42 100644 --- a/jsonbasics/jsonbasics.go +++ b/jsonbasics/jsonbasics.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // ToObject returns the object, if it was one, or nil+err. diff --git a/namespace/namespace.go b/namespace/namespace.go index 07d1bac0..4747cff0 100644 --- a/namespace/namespace.go +++ b/namespace/namespace.go @@ -8,7 +8,7 @@ import ( "github.com/kong/go-apiops/deckformat" "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/yamlbasics" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // CheckNamespace validates the prefix namespace. Returns updated namespace. Must start with "/", diff --git a/namespace/namespace_host.go b/namespace/namespace_host.go index 0099230f..3ff0d1d3 100644 --- a/namespace/namespace_host.go +++ b/namespace/namespace_host.go @@ -6,7 +6,7 @@ import ( "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/yamlbasics" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // ApplyNamespaceHost applies the namespace to the hosts field of the selected routes diff --git a/namespace/namespace_test.go b/namespace/namespace_test.go index 9716feb6..23833ccf 100644 --- a/namespace/namespace_test.go +++ b/namespace/namespace_test.go @@ -8,8 +8,8 @@ import ( "github.com/kong/go-apiops/yamlbasics" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" + "github.com/pb33f/go-yaml" lua "github.com/yuin/gopher-lua" - "go.yaml.in/yaml/v4" ) func toYaml(data string) *yaml.Node { diff --git a/openapi2kong/openapi2kong.go b/openapi2kong/openapi2kong.go index 8989c942..cd1a769d 100644 --- a/openapi2kong/openapi2kong.go +++ b/openapi2kong/openapi2kong.go @@ -14,12 +14,12 @@ import ( "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/openapitools" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi/datamodel" openapibase "github.com/pb33f/libopenapi/datamodel/high/base" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" "github.com/pb33f/libopenapi/orderedmap" - "go.yaml.in/yaml/v4" ) const ( diff --git a/openapi2kong/openapi2kong_test.go b/openapi2kong/openapi2kong_test.go index 00ac61de..2b292e6d 100644 --- a/openapi2kong/openapi2kong_test.go +++ b/openapi2kong/openapi2kong_test.go @@ -10,8 +10,8 @@ import ( "strings" "testing" + "github.com/pb33f/go-yaml" "github.com/stretchr/testify/assert" - "go.yaml.in/yaml/v4" ) const fixturePath = "./oas3_testfiles/" diff --git a/openapi2mcp/openapi2mcp.go b/openapi2mcp/openapi2mcp.go index f133df84..fc9d27d4 100644 --- a/openapi2mcp/openapi2mcp.go +++ b/openapi2mcp/openapi2mcp.go @@ -12,12 +12,12 @@ import ( "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/openapi2kong" "github.com/kong/go-apiops/openapitools" + "github.com/pb33f/go-yaml" "github.com/pb33f/libopenapi" "github.com/pb33f/libopenapi/datamodel" openapibase "github.com/pb33f/libopenapi/datamodel/high/base" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" "github.com/pb33f/libopenapi/orderedmap" - "go.yaml.in/yaml/v4" ) const ( diff --git a/openapitools/utils.go b/openapitools/utils.go index 6846919d..8eb6a6a9 100644 --- a/openapitools/utils.go +++ b/openapitools/utils.go @@ -9,9 +9,9 @@ import ( "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" "github.com/kong/go-slugify" + "github.com/pb33f/go-yaml" v3 "github.com/pb33f/libopenapi/datamodel/high/v3" "github.com/pb33f/libopenapi/orderedmap" - "go.yaml.in/yaml/v4" ) // ToKebabCase converts a string to kebab-case diff --git a/patch/deckpatch.go b/patch/deckpatch.go index ee2ce4d8..ee52884f 100644 --- a/patch/deckpatch.go +++ b/patch/deckpatch.go @@ -6,8 +6,8 @@ import ( "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/yamlbasics" + "github.com/pb33f/go-yaml" "github.com/pb33f/jsonpath/pkg/jsonpath" - "go.yaml.in/yaml/v4" ) var DefaultSelector = []string{"$"} diff --git a/patch/deckpatchfile.go b/patch/deckpatchfile.go index c6e79a27..d975a1b0 100644 --- a/patch/deckpatchfile.go +++ b/patch/deckpatchfile.go @@ -7,7 +7,7 @@ import ( "github.com/kong/go-apiops/filebasics" "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // DeckPatchFile represents a list of patches. diff --git a/plugins/pluginfile.go b/plugins/pluginfile.go index ee2d7f6e..09cd0ad0 100644 --- a/plugins/pluginfile.go +++ b/plugins/pluginfile.go @@ -7,7 +7,7 @@ import ( "github.com/kong/go-apiops/filebasics" "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // diff --git a/plugins/plugins.go b/plugins/plugins.go index 9aff0688..c7bf2f41 100644 --- a/plugins/plugins.go +++ b/plugins/plugins.go @@ -12,8 +12,8 @@ import ( "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/yamlbasics" + "github.com/pb33f/go-yaml" "github.com/pb33f/jsonpath/pkg/jsonpath" - "go.yaml.in/yaml/v4" ) // defaultSelectors is the main `plugins` array. diff --git a/tags/tags.go b/tags/tags.go index d18587df..40ef339f 100644 --- a/tags/tags.go +++ b/tags/tags.go @@ -8,8 +8,8 @@ import ( "github.com/kong/go-apiops/jsonbasics" "github.com/kong/go-apiops/logbasics" "github.com/kong/go-apiops/yamlbasics" + "github.com/pb33f/go-yaml" "github.com/pb33f/jsonpath/pkg/jsonpath" - "go.yaml.in/yaml/v4" ) const tagArrayName = "tags" diff --git a/yamlbasics/nodeset.go b/yamlbasics/nodeset.go index 7e4631ef..82c5686c 100644 --- a/yamlbasics/nodeset.go +++ b/yamlbasics/nodeset.go @@ -2,7 +2,7 @@ package yamlbasics import ( "github.com/kong/go-apiops/logbasics" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // diff --git a/yamlbasics/nodeset_test.go b/yamlbasics/nodeset_test.go index bba0393b..d07c1fd7 100644 --- a/yamlbasics/nodeset_test.go +++ b/yamlbasics/nodeset_test.go @@ -4,7 +4,7 @@ import ( . "github.com/kong/go-apiops/yamlbasics" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) var _ = Describe("NodeSet", func() { diff --git a/yamlbasics/selectors.go b/yamlbasics/selectors.go index 37e7c13b..91d527cb 100644 --- a/yamlbasics/selectors.go +++ b/yamlbasics/selectors.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/kong/go-apiops/logbasics" + "github.com/pb33f/go-yaml" "github.com/pb33f/jsonpath/pkg/jsonpath" - "go.yaml.in/yaml/v4" ) // diff --git a/yamlbasics/selectors_test.go b/yamlbasics/selectors_test.go index 28717660..6197a101 100644 --- a/yamlbasics/selectors_test.go +++ b/yamlbasics/selectors_test.go @@ -4,7 +4,7 @@ import ( . "github.com/kong/go-apiops/yamlbasics" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) var _ = Describe("selectors", func() { diff --git a/yamlbasics/yamlbasics.go b/yamlbasics/yamlbasics.go index 057f67c8..dbfa4fe9 100644 --- a/yamlbasics/yamlbasics.go +++ b/yamlbasics/yamlbasics.go @@ -8,7 +8,7 @@ import ( "errors" "fmt" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) // diff --git a/yamlbasics/yamlbasics_test.go b/yamlbasics/yamlbasics_test.go index e5d6c446..7155ebd4 100644 --- a/yamlbasics/yamlbasics_test.go +++ b/yamlbasics/yamlbasics_test.go @@ -4,7 +4,7 @@ import ( . "github.com/kong/go-apiops/yamlbasics" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "go.yaml.in/yaml/v4" + "github.com/pb33f/go-yaml" ) var _ = Describe("yamlbasics", func() { From 7de41aae228c8686e2809f8027d5e6f44799a76b Mon Sep 17 00:00:00 2001 From: Manish S V Kumar Date: Fri, 23 Oct 2026 14:54:42 +0530 Subject: [PATCH 2/2] ci: bump pinned golangci-lint to v2.9.0 for the Go 1.26 floor The v2.8.0 release binary is built with Go 1.25 and refuses to load a config whose module targets a newer Go version: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.0) v2.9.0 is the earliest release built with Go 1.26, and reports no new issues on this codebase. Later releases do (v2.11.4 surfaces four pre-existing gosec findings), so keep the bump minimal here. Co-Authored-By: Claude Opus 5 --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index a5ac7c34..f88676e8 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -35,7 +35,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.8.0 + version: v2.9.0 # Optional: working directory, useful for monorepos # working-directory: somedir