Skip to content

PR1: Infrastructure — Add nacos-sdk-proto/go, PayloadCodec, CI rewrite, module path v3 #880

@cxhello

Description

@cxhello

Parent issue: #879

Scope

This is the first PR in the v3 roadmap. It lays the foundation for all subsequent PRs.

Changes

  1. Module path v2v3, CLIENT_VERSIONNacos-Go-Client:v3.0.0
  2. Add dependency github.com/nacos-group/nacos-sdk-proto/go v1.0.0-beta.8
  3. Implement PayloadCodec — centralized message type registry + protojson encode/decode, covering all 5 modules (common/config/naming/lock/ai, 73 message types)
  4. Upgrade dependencies — Go 1.21→1.22, grpc v1.67.3→v1.71.2, protobuf v1.36.5→v1.36.4
  5. Remove outdated dependencyalibaba-cloud-sdk-go v1 direct import removed, migrated KMS code to alibabacloud-dkms-gcs-go-sdk (移除那些过时的依赖比如github.com/aliyun/alibaba-cloud-sdk-go #871)
  6. Rewrite CI — 4-job pipeline: lint / unit-test (Go 1.22-1.24 matrix) / integration-grpc (Nacos 3.x Docker) / integration-nacos2 (Nacos 2.x Docker)

Dependency versions

Dependency Old (v2) New (v3)
Go 1.21 1.22
nacos-sdk-proto/go v1.0.0-beta.8
google.golang.org/grpc v1.67.3 v1.71.2
google.golang.org/protobuf v1.36.5 v1.36.4
alibaba-cloud-sdk-go v1.61.1800 (direct) indirect only

New files

  • common/remote/codec/payload_codec.go
  • common/remote/codec/payload_codec_test.go
  • .github/workflows/ci.yml

Non-goals

  • Wiring PayloadCodec into existing gRPC layer (PR2)
  • Deleting old rpc_request/ and rpc_response/ packages (PR2)
  • Auth/Naming/Config bug fixes (PR3-5)

Known issues

  • alibaba-cloud-sdk-go remains as indirect dependency (pulled by aliyun-secretsmanager-client-go)
  • KMS dedicated encryption has a breaking change in ciphertext encoding format (v3 major version bump)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions