Migrate off gogo/protobuf
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
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: https://github.com/moby/swarmkit/pull/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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the attempted rewrite in swarmkit pull request 3248 and the listed gogo/protobuf dependency through SwarmKit. Map the etcd 3.7 Raft integration, protobuf semantic changes, and custom generator plugins before making changes. Done means migrating to google.golang.org/protobuf without relying on gogo, while preserving the public API and updating affected code and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100