Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use google.golang.org/protobuf instead of github.com/gogo/protobuf #220

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

kzys
Copy link
Member

@kzys kzys commented Feb 17, 2022

We'd like to migrate off from gogo/protobuf. The package is looking
for new ownership since 2020.

See containerd/containerd#6564 for the detail.

Signed-off-by: Kazuyoshi Kato [email protected]

@kzys kzys force-pushed the bye-gogo branch 3 times, most recently from c987035 to 0686207 Compare February 17, 2022 17:38
@kzys kzys marked this pull request as ready for review February 17, 2022 17:39
@kzys kzys force-pushed the bye-gogo branch 2 times, most recently from 518baa2 to 07fa92f Compare February 17, 2022 17:43
@kzys
Copy link
Member Author

kzys commented Feb 17, 2022

This PR is ready, but it would break consumers that use cgroups from protos, such as https://github.com/Microsoft/hcsshim. The shim is importing the package like https://github.com/microsoft/hcsshim/blob/12b02a180881297d330d6261e166a97a79023fe2/cmd/containerd-shim-runhcs-v1/stats/stats.pb.go#L8 and stats.pb.go assumes that the file is generated by gogo/protobuf.

It would be better to have a branch for backporting bug fixes while other customers (hcsshim and containerd) are using gogo/protobuf.

Makefile Outdated
@@ -22,3 +22,5 @@ cgutil:

proto:
protobuild --quiet ${PACKAGES}
go-fix-acronym -w -a Cpu -a Rss -a Tcp \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go-fix-acronym is containerd/protobuild#50

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it is merged!

@kzys kzys requested a review from estesp February 21, 2022 19:58
@estesp
Copy link
Member

estesp commented Feb 21, 2022

So, we can do the same thing here we do in containerd (have a /release/1.0.x branch anchored at the recent v1.0.3 tag that cuts all future 1.0.x releases) but I think this would be the first subproject to get that treatment. Seems like it is somewhat inevitable as we will have overlap of containerd releases that use both old and new protobuf. Does that seem right?

@kzys
Copy link
Member Author

kzys commented Feb 21, 2022

@estesp Yes. containerd/cgroups and containerd/ttrpc would have a new branch (ttrpc is being discussed in containerd/ttrpc#97).

@kzys kzys force-pushed the bye-gogo branch 15 times, most recently from 7fca754 to d862c38 Compare March 1, 2022 19:51
@kzys kzys force-pushed the bye-gogo branch 6 times, most recently from 2fc1226 to 75101da Compare August 26, 2022 23:27
@AkihiroSuda
Copy link
Member

What’s current status of this?

@kzys
Copy link
Member Author

kzys commented Oct 19, 2022

@AkihiroSuda Just rebased against main. I will test the branch against containerd and possibly hcsshim.

@kzys
Copy link
Member Author

kzys commented Oct 28, 2022

Tested this gogo-less cgroups with hcsshim and containerd.

Actually containerd cannot have this cgroups upgrade unless hcsshim is upgraded.

- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.17.x'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to use 1.19 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this PR is old. Updated.

echo "${{ github.workspace }}/bin" >> $GITHUB_PATH

- name: Checkout cgroups
uses: actions/checkout@v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use v3?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

We'd like to migrate off from gogo/protobuf. The package is looking
for new ownership since 2020.

See containerd/containerd#6564 for the detail.

Signed-off-by: Kazuyoshi Kato <[email protected]>
Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit f0f7617 into containerd:main Nov 3, 2022
@thaJeztah
Copy link
Member

🎉 awesome work, @kzys !

@AkihiroSuda
Copy link
Member

Shall we release v1.1.0?

@kzys
Copy link
Member Author

kzys commented Nov 4, 2022

@AkihiroSuda After reading https://semver.org/ again and working on hcsshim, I'm more inclined to have v2.0.0. Thoughts?

@thaJeztah
Copy link
Member

v2 sounds like a good idea, that would keep the path open to have projects opt-in to the new thing. But it will require the module to be renamed to /v2/

@kzys
Copy link
Member Author

kzys commented Nov 4, 2022

Ugh. We will have github.com/containerd/cgroups/v2/v2/stats by doing so, but we would reach the state eventually anyway...

@thaJeztah
Copy link
Member

Given that it's v2, it would allow us to rename that package to something else 🤔

(naming is hard though!)

Perhaps we could do the reverse, and rename the v1 cgroups? (as v2 basically is "default" now, so "v1" will more and more become the outlier)

proto.RegisterType((*RdmaStat)(nil), "io.containerd.cgroups.v1.RdmaStat")
proto.RegisterType((*RdmaEntry)(nil), "io.containerd.cgroups.v1.RdmaEntry")
proto.RegisterType((*NetworkStat)(nil), "io.containerd.cgroups.v1.NetworkStat")
proto.RegisterType((*CgroupStats)(nil), "io.containerd.cgroups.v1.CgroupStats")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where has this gone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants