-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated containerd1.7; google.golang.org/protobuf
Update to containerd 1.7 and move to `google.golang.org/protobuf` from `github.com/gogo/protobuf/gogoproto`. These two changes are intertwined, since containerd 1.7 changes its ttrpc task server definitions and protobuff generation (as well as some other API changes). Upgrading to `google.golang.org/protobuf` also requires updating the `containerd/cgroups` dependency to v3 (`github.com/containerd/cgroups/v3/cgroup1/stats/`). The new `protoc-gen-go-grpc` generators do not allow directives such as `gogoproto.customname`, so the `go-fix-acronym` command is used to update acronym customization (similar to what containerd does). Added an `Update-Proto.ps1` script to re-gerenate protobuf files locally and in GitHub CI. Add `protobuild` and protobuff `grpc` and `ttrpc` generators to `tools.go` so they are tracked and vendored, and can be trivially installed via `go install`. Add empty `after` section to Protobuild to suppress errors about missing directories `usr/local/include` and `/usr/include`, which are defaults. Add protobuf file to gitignore so it does not affect `git diff` results. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
- Loading branch information
Showing
540 changed files
with
54,379 additions
and
84,523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,9 @@ rootfs-conv/* | |
deps/* | ||
out/* | ||
|
||
# protobuf files | ||
/protobuf/* | ||
|
||
# test results | ||
test/results | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,25 @@ | ||
version = "1" | ||
generator = "gogoctrd" | ||
plugins = ["grpc", "fieldpath"] | ||
version = "2" | ||
generators = ["go", "go-grpc"] | ||
|
||
# Control protoc include paths. Below are usually some good defaults, but feel | ||
# free to try it without them if it works for your project. | ||
# Control protoc include paths. | ||
[includes] | ||
# Include paths that will be added before all others. Typically, you want to | ||
# treat the root of the project as an include, but this may not be necessary. | ||
before = ["./protobuf"] | ||
|
||
# Paths that should be treated as include roots in relation to the vendor | ||
# directory. These will be calculated with the vendor directory nearest the | ||
# target package. | ||
packages = ["github.com/gogo/protobuf"] | ||
# defaults are "/usr/local/include" and "/usr/include", which don't exist on Windows. | ||
# override defaults to supress errors about non-existant directories. | ||
after = [] | ||
|
||
# This section maps protobuf imports to Go packages. These will become | ||
# `-M` directives in the call to the go protobuf generator. | ||
# This section maps protobuf imports to Go packages. | ||
[packages] | ||
"gogoproto/gogo.proto" = "github.com/gogo/protobuf/gogoproto" | ||
"google/protobuf/any.proto" = "github.com/gogo/protobuf/types" | ||
"google/protobuf/empty.proto" = "github.com/gogo/protobuf/types" | ||
"google/protobuf/struct.proto" = "github.com/gogo/protobuf/types" | ||
"google/protobuf/descriptor.proto" = "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" | ||
"google/protobuf/field_mask.proto" = "github.com/gogo/protobuf/types" | ||
"google/protobuf/timestamp.proto" = "github.com/gogo/protobuf/types" | ||
"google/protobuf/duration.proto" = "github.com/gogo/protobuf/types" | ||
"github/containerd/cgroups/stats/v1/metrics.proto" = "github.com/containerd/cgroups/stats/v1" | ||
# github.com/containerd/cgroups protofiles still list their go path as "github.com/containerd/cgroups/cgroup1/stats" | ||
"github.com/containerd/cgroups/v3/cgroup1/stats/metrics.proto" = "github.com/containerd/cgroups/v3/cgroup1/stats" | ||
|
||
[[overrides]] | ||
prefixes = ["github.com/Microsoft/hcsshim/internal/shimdiag"] | ||
plugins = ["ttrpc"] | ||
|
||
[[overrides]] | ||
prefixes = ["github.com/Microsoft/hcsshim/internal/extendedtask"] | ||
plugins = ["ttrpc"] | ||
|
||
[[overrides]] | ||
prefixes = ["github.com/Microsoft/hcsshim/internal/computeagent"] | ||
plugins = ["ttrpc"] | ||
|
||
[[overrides]] | ||
prefixes = ["github.com/Microsoft/hcsshim/internal/ncproxyttrpc"] | ||
plugins = ["ttrpc"] | ||
|
||
[[overrides]] | ||
prefixes = ["github.com/Microsoft/hcsshim/internal/vmservice"] | ||
plugins = ["ttrpc"] | ||
prefixes = [ | ||
"github.com/Microsoft/hcsshim/internal/shimdiag", | ||
"github.com/Microsoft/hcsshim/internal/extendedtask", | ||
"github.com/Microsoft/hcsshim/internal/computeagent", | ||
"github.com/Microsoft/hcsshim/internal/ncproxyttrpc", | ||
"github.com/Microsoft/hcsshim/internal/vmservice", | ||
] | ||
generators = ["go", "go-ttrpc"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.