Skip to content

Migrate off gogo/protobuf #3240

@vvoland

Description

@vvoland

We should migrate to the official, maintained google.golang.org/protobuf.

Context: We had a chat recently with @thaJeztah and noticed that we still depend on gogo/protobuf in Moby through SwarmKit.
I threw Claude at it out of curiosity, to get a gist of what it would take to migrate.. Looks like it's much more complicated though..

If that's helpful, here's what it did produce: #3248

Findings (from Claude's attempted rewrite):

  • etcd is only gogo-free in release candidates - etcd dropped gogo in the 3.7 line, but there's no stable 3.7.0 yet, so fully removing gogo means pinning to etcd RCs.
  • etcd 3.7 is a breaking API change. The Raft integration layer must be ported, not just recompiled.
  • etcd 3.7 needs Go 1.26
  • google protobuf changes Go semantics - nullable=false value fields become pointers, messages can't be reflect.DeepEqual'd or used as map keys, and proto.Equal must replace ==/DeepEqual across a lot of code and tests.
  • Custom gogo generator plugins must be reimplemented SwarmKit relies on custom codegen (deep-copy, store-object, Raft-proxy, auth-wrapper) and gogo field-naming; these need rebuilding on the standard plugin API (plus a name-preservation step to avoid churning the public API).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions