-
Notifications
You must be signed in to change notification settings - Fork 259
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
Run Protobuild on GitHub Actions #1302
Conversation
@@ -26,7 +27,7 @@ var _ = time.Kitchen | |||
// is compatible with the proto package it is being compiled against. | |||
// A compilation error at this line likely means your copy of the | |||
// proto package needs to be updated. | |||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package | |||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is aligned with containerd.
e60508f
to
c59138c
Compare
|
68fbf50
to
6dac14b
Compare
The tests are all green in my fork. https://github.com/kzys/hcsshim/actions/runs/1883043415 |
.github/workflows/ci.yml
Outdated
@@ -8,6 +8,50 @@ env: | |||
GOPROXY: off | |||
|
|||
jobs: | |||
proto: | |||
# TODO: use Windows after merginig https://github.com/containerd/protobuild/pull/51. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TBBle Should I use Windows for consistency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly don't know if it makes a difference. In fact, I hope it doesn't matter, as that would suggest something else is wrong, if we get different results from this based on platform.
When doing this by hand I did this on Windows myself, but the relevant procedure should be roughly the same, so maybe doing this validation on Linux is an extra level of prevention if a platform-specific difference does sneak in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#51 got merged! Let me update this PR. I agree that generating Go files from proto files is platform-independent. Running Protobuild on different platforms is something Protobuild has to do. So hcsshim doesn't have to do that.
.github/workflows/ci.yml
Outdated
git clone --depth 1 https://github.com/containerd/containerd.git -b v1.6.0 | ||
cd containerd/cmd/protoc-gen-gogoctrd | ||
go build | ||
mkdir $GOPATH/bin | ||
mv protoc-gen-gogoctrd $GOPATH/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the inability to use
go install github.com/containerd/containerd/cmd/[email protected]
a containerd bug?
I tried this out of curiosity, and it failed with
> go install github.com/containerd/containerd/cmd/[email protected]
go install: github.com/containerd/containerd/cmd/[email protected] (in github.com/containerd/[email protected]):
The go.mod file for the module providing named packages contains one or
more replace directives. It must not contain directives that would cause
it to be interpreted differently than if it were the main module.
but that might be me doing something wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is sadly "working as expected". golang/go#44840
The good news is that I will remove protoc-gen-gogoctrd soon from the build process, once we remove gogo/protobuf.
c4a53a2
to
b576476
Compare
430008a
to
603dd84
Compare
Needs a quick rebase |
@kzys Ping on the rebase (we added a new shim option here so the proto needs to be regenerated). Thanks! |
cf7c2cc
to
fa1205f
Compare
containerd is planning to migrate off from github.com/gogo/protobuf which will affect hcsshim. See containerd/containerd#6564 for the overall progress. Before that, this commit runs Protobuild in GitHub Actions to make sure all generated files are reproducible from .proto files. Signed-off-by: Kazuyoshi Kato <[email protected]>
@dcantah Thanks. Rebased the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
containerd is planning to migrate off from github.com/gogo/protobuf which will affect hcsshim. See containerd/containerd#6564 for the overall progress. Before that, this commit runs Protobuild in GitHub Actions to make sure all generated files are reproducible from .proto files. Signed-off-by: Kazuyoshi Kato <[email protected]>
containerd is planning to migrate off from github.com/gogo/protobuf which will affect hcsshim. See containerd/containerd#6564 for the overall progress.
Before that, this commit runs Protobuild in GitHub Actions to make sure all generated files are reproducible from .proto files.
Signed-off-by: Kazuyoshi Kato [email protected]