Skip to content

Commit 9d9287f

Browse files
committed
go.mod: upgrade to yaml v4
The https://github.com/go-yaml/yaml (import path `gopkg.in/yaml.v3`) repository has been archived. The YAML team took over maintenance in a separate fork at a very confusingly named https://github.com/yaml/go-yaml (import path `go.yaml.in/yaml/v4`). This commit updates uses of v3 to `v4.0.0-rc.3` from the new repository. No code changes are required. Upgrading v2 uses to v4 will be done separately, as that requires code changes. Epic: none Release note: None
1 parent b724895 commit 9d9287f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+62
-48
lines changed

DEPS.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10473,6 +10473,16 @@ def go_deps():
1047310473
"https://storage.googleapis.com/cockroach-godeps/gomod/gopkg.in/yaml.v3/in_gopkg_yaml_v3-v3.0.1.zip",
1047410474
],
1047510475
)
10476+
go_repository(
10477+
name = "in_yaml_go_yaml_v4",
10478+
build_file_proto_mode = "disable_global",
10479+
importpath = "go.yaml.in/yaml/v4",
10480+
sha256 = "d5ca6a029979bc52760f17ed1a9393637a46095b9e0e8f504f1dc5d70ece46ac",
10481+
strip_prefix = "go.yaml.in/yaml/[email protected]",
10482+
urls = [
10483+
"https://storage.googleapis.com/cockroach-godeps/gomod/go.yaml.in/yaml/v4/in_yaml_go_yaml_v4-v4.0.0-rc.3.zip",
10484+
],
10485+
)
1047610486
go_repository(
1047710487
name = "io_etcd_go_bbolt",
1047810488
build_file_proto_mode = "disable_global",

build/bazelutil/distdir_files.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,6 +1044,7 @@ DISTDIR_FILES = {
10441044
"https://storage.googleapis.com/cockroach-godeps/gomod/go.uber.org/multierr/org_uber_go_multierr-v1.7.0.zip": "abee21bbd1cb62b0721680430ef8e098717299d10b4382876b9aa40664e6556c",
10451045
"https://storage.googleapis.com/cockroach-godeps/gomod/go.uber.org/tools/org_uber_go_tools-v0.0.0-20190618225709-2cfd321de3ee.zip": "988dba9c5074080240d33d98e8ce511532f728698db7a9a4ac316c02c94030d6",
10461046
"https://storage.googleapis.com/cockroach-godeps/gomod/go.uber.org/zap/org_uber_go_zap-v1.19.0.zip": "6437824258873fed421b7975b8e4cafd1be80cdc15e553beaa887b499dd01420",
1047+
"https://storage.googleapis.com/cockroach-godeps/gomod/go.yaml.in/yaml/v4/in_yaml_go_yaml_v4-v4.0.0-rc.3.zip": "d5ca6a029979bc52760f17ed1a9393637a46095b9e0e8f504f1dc5d70ece46ac",
10471048
"https://storage.googleapis.com/cockroach-godeps/gomod/goji.io/io_goji-v2.0.2+incompatible.zip": "1ea69b28e356cb91381ce2339004fcf144ad1b268c9e3497c9ef304751ae0bb3",
10481049
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/arch/org_golang_x_arch-v0.0.0-20180920145803-b19384d3c130.zip": "9f67b677a3fefc503111d9aa7df8bacd2677411b0fcb982eb1654aa6d14cc3f8",
10491050
"https://storage.googleapis.com/cockroach-godeps/gomod/golang.org/x/crypto/org_golang_x_crypto-v0.44.0.zip": "31a0dbb663b78708159bc1cbdb09a6a8370cbf507d742f96dc78b4ad023498ec",

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,12 @@ require (
244244
go.opentelemetry.io/otel/sdk v1.17.0
245245
go.opentelemetry.io/otel/trace v1.17.0
246246
go.opentelemetry.io/proto/otlp v0.11.0
247+
go.yaml.in/yaml/v4 v4.0.0-rc.3
247248
golang.org/x/perf v0.0.0-20251112180420-cfbd823f7301
248249
golang.org/x/term v0.37.0
249250
gonum.org/v1/gonum v0.15.1
250251
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc
251252
gopkg.in/yaml.v2 v2.4.0
252-
gopkg.in/yaml.v3 v3.0.1
253253
honnef.co/go/tools v0.6.1
254254
)
255255

@@ -467,6 +467,7 @@ require (
467467
google.golang.org/appengine v1.6.7 // indirect
468468
google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc // indirect
469469
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
470+
gopkg.in/yaml.v3 v3.0.1 // indirect
470471
)
471472

472473
require (

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,6 +2404,8 @@ go.uber.org/zap v1.14.1/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc=
24042404
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
24052405
go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE=
24062406
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
2407+
go.yaml.in/yaml/v4 v4.0.0-rc.3 h1:3h1fjsh1CTAPjW7q/EMe+C8shx5d8ctzZTrLcs/j8Go=
2408+
go.yaml.in/yaml/v4 v4.0.0-rc.3/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
24072409
goji.io v2.0.2+incompatible/go.mod h1:sbqFwrtqZACxLBTQcdgVjFh54yGVCvwq8+w49MVMMIk=
24082410
golang.org/x/arch v0.0.0-20180920145803-b19384d3c130/go.mod h1:cYlCBUl1MsqxdiKgmc4uh7TxZfWSFLOGSRR090WDxt8=
24092411
golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=

pkg/ccl/sqlproxyccl/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ go_test(
126126
"@com_github_pires_go_proxyproto//tlvparse",
127127
"@com_github_stretchr_testify//assert",
128128
"@com_github_stretchr_testify//require",
129-
"@in_gopkg_yaml_v3//:yaml_v3",
129+
"@in_yaml_go_yaml_v4//:yaml",
130130
"@org_golang_google_grpc//codes",
131131
"@org_golang_google_grpc//status",
132132
],

pkg/ccl/sqlproxyccl/proxy_handler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import (
5454
"github.com/pires/go-proxyproto/tlvparse"
5555
"github.com/stretchr/testify/assert"
5656
"github.com/stretchr/testify/require"
57-
"gopkg.in/yaml.v3"
57+
"go.yaml.in/yaml/v4"
5858
)
5959

6060
const frontendError = "Frontend error!"

pkg/cli/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ go_library(
276276
"@com_github_spf13_pflag//:pflag",
277277
"@com_google_cloud_go_storage//:storage",
278278
"@in_gopkg_yaml_v2//:yaml_v2",
279-
"@in_gopkg_yaml_v3//:yaml_v3",
279+
"@in_yaml_go_yaml_v4//:yaml",
280280
"@io_storj_drpc//:drpc",
281281
"@org_golang_google_api//option",
282282
"@org_golang_google_grpc//:grpc",

pkg/cli/tsdump_upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import (
3232
"github.com/cockroachdb/cockroach/pkg/util/syncutil"
3333
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
3434
"github.com/cockroachdb/errors"
35-
"gopkg.in/yaml.v3"
35+
"go.yaml.in/yaml/v4"
3636
)
3737

3838
const (

pkg/cmd/mirror/npm/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ go_library(
4444
visibility = ["//visibility:private"],
4545
deps = [
4646
"@com_google_cloud_go_storage//:storage",
47-
"@in_gopkg_yaml_v3//:yaml_v3",
47+
"@in_yaml_go_yaml_v4//:yaml",
4848
"@org_golang_google_api//googleapi",
4949
"@org_golang_google_api//iterator",
5050
"@org_golang_x_sync//errgroup",

pkg/cmd/mirror/npm/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import (
1919
"strings"
2020

2121
"cloud.google.com/go/storage"
22+
"go.yaml.in/yaml/v4"
2223
"golang.org/x/sync/errgroup"
2324
"google.golang.org/api/googleapi"
2425
"google.golang.org/api/iterator"
25-
yaml "gopkg.in/yaml.v3"
2626
)
2727

2828
// getUnmirroredUrls finds packages in each provided pnpm-lock.yaml (each of

0 commit comments

Comments
 (0)