Skip to content

Commit 484ff8f

Browse files
authored
build: upgrade direct YAML usage to go.yaml.in/yaml/v4 (apache#3586)
* build: upgrade direct YAML usage to go.yaml.in/yaml/v4 Replace main-module imports of gopkg.in/yaml.v3 with go.yaml.in/yaml/v4 for config center, routers, REST/gRPC/Getty config, and Triple OpenAPI encoding. Direct dependency is now go.yaml.in/yaml/v4; gopkg.in/yaml.v3 remains only as a transitive (indirect) dependency. Fixes: apache#3582 Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com> * style: fix go.yaml.in import order in grpc client make check-fmt / imports-formatter requires go.yaml.in/yaml/v4 before google.golang.org imports in protocol/grpc/client.go. Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com> * ci: re-trigger integration test after 6h timeout --------- Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com> Co-authored-by: arimu1 <19286898+arimu1@users.noreply.github.com>
1 parent cdda54b commit 484ff8f

16 files changed

Lines changed: 19 additions & 16 deletions

File tree

cluster/router/affinity/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
import (
2727
"github.com/dubbogo/gost/log/logger"
2828

29-
"gopkg.in/yaml.v3"
29+
"go.yaml.in/yaml/v4"
3030
)
3131

3232
import (

cluster/router/condition/dynamic_router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
import (
2828
"github.com/dubbogo/gost/log/logger"
2929

30-
"gopkg.in/yaml.v3"
30+
"go.yaml.in/yaml/v4"
3131
)
3232

3333
import (

cluster/router/condition/route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
"github.com/pkg/errors"
3232

33-
"gopkg.in/yaml.v3"
33+
"go.yaml.in/yaml/v4"
3434
)
3535

3636
import (

cluster/router/script/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
import (
2626
"github.com/dubbogo/gost/log/logger"
2727

28-
"gopkg.in/yaml.v3"
28+
"go.yaml.in/yaml/v4"
2929
)
3030

3131
import (

cluster/router/tag/router.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
import (
2727
"github.com/dubbogo/gost/log/logger"
2828

29-
"gopkg.in/yaml.v3"
29+
"go.yaml.in/yaml/v4"
3030
)
3131

3232
import (

config_center/apollo/impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434

3535
perrors "github.com/pkg/errors"
3636

37-
"gopkg.in/yaml.v3"
37+
"go.yaml.in/yaml/v4"
3838
)
3939

4040
import (

config_center/apollo/listener.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
"github.com/dubbogo/gost/log/logger"
2424

25-
"gopkg.in/yaml.v3"
25+
"go.yaml.in/yaml/v4"
2626
)
2727

2828
import (

config_center/mock_dynamic_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
import (
2626
gxset "github.com/dubbogo/gost/container/set"
2727

28-
"gopkg.in/yaml.v3"
28+
"go.yaml.in/yaml/v4"
2929
)
3030

3131
import (

config_center/parser/configuration_parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929

3030
perrors "github.com/pkg/errors"
3131

32-
"gopkg.in/yaml.v3"
32+
"go.yaml.in/yaml/v4"
3333
)
3434

3535
import (

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ require (
6161
go.opentelemetry.io/otel/trace v1.21.0
6262
go.uber.org/atomic v1.10.0
6363
go.uber.org/zap v1.21.0
64+
go.yaml.in/yaml/v4 v4.0.0-rc.6
6465
golang.org/x/net v0.56.0
6566
golang.org/x/sync v0.21.0
6667
golang.org/x/tools v0.47.0
6768
google.golang.org/grpc v1.64.1
6869
google.golang.org/protobuf v1.34.2
6970
gopkg.in/natefinch/lumberjack.v2 v2.2.1
70-
gopkg.in/yaml.v3 v3.0.1
7171
)
7272

7373
require (
@@ -147,4 +147,5 @@ require (
147147
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
148148
gopkg.in/ini.v1 v1.66.2 // indirect
149149
gopkg.in/yaml.v2 v2.4.0 // indirect
150+
gopkg.in/yaml.v3 v3.0.1 // indirect
150151
)

0 commit comments

Comments
 (0)