-
Notifications
You must be signed in to change notification settings - Fork 258
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 (#1706)
* Update 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). Additionally, the task server gRPC code is imported from containerd directly, rather than being generated here, and that code now explicitly imports `google.golang.org/protobuf` instead of `github.com/gogo/protobuf/gogoproto`. 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 (which is what containerd does). Updated `Protobuild.toml` to specify new generators. Added an `Update-Proto.ps1` script to re-generate 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`. Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com> * Vendor protobuf import changes Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com> --------- Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
- Loading branch information
Showing
498 changed files
with
55,652 additions
and
92,839 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
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,52 +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"] | ||
|
||
# defaults are "/usr/local/include" and "/usr/include", which don't exist on Windows. | ||
# override defaults to supress errors about non-existant directories. | ||
after = [] | ||
|
||
# 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"] | ||
|
||
# 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" | ||
|
||
[[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"] | ||
# 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/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.