From bdef97ce85f1f6304a9ebfa629a2ce64328cb264 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Thu, 19 Sep 2019 03:55:47 +0000 Subject: [PATCH] api: add go proto generation script (#8155) Adds a script to create a go module from the generated protobufs as part of #8151. The module appears to build with the following module declaration: module github.com/envoyproxy/data-plane-api/api go 1.12 require ( github.com/census-instrumentation/opencensus-proto v0.2.1 github.com/envoyproxy/protoc-gen-validate v0.1.0 github.com/gogo/protobuf v1.3.0 github.com/golang/protobuf v1.3.2 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 google.golang.org/grpc v1.23.0 ) Add CI automation to trigger the script after the merge to master in envoyproxy. Risk Level: low Testing: local build Docs Changes: none Release Notes: none Fixes #8151 Signed-off-by: Kuat Yessenov Mirrored from https://github.com/envoyproxy/envoy @ 32e6018f10f9d6de58fd6c3d6844a68a5be7723b --- bazel/api_build_system.bzl | 2 +- bazel/repositories.bzl | 2 +- test/build/go_build_test.go | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bazel/api_build_system.bzl b/bazel/api_build_system.bzl index a37f1d9d..25bca467 100644 --- a/bazel/api_build_system.bzl +++ b/bazel/api_build_system.bzl @@ -9,7 +9,7 @@ _CC_SUFFIX = "_cc" _CC_GRPC_SUFFIX = "_cc_grpc" _CC_EXPORT_SUFFIX = "_export_cc" _GO_PROTO_SUFFIX = "_go_proto" -_GO_IMPORTPATH_PREFIX = "github.com/envoyproxy/data-plane-api/api/" +_GO_IMPORTPATH_PREFIX = "github.com/envoyproxy/go-control-plane/" _COMMON_PROTO_DEPS = [ "@com_google_protobuf//:any_proto", diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 1362c567..27d0219a 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -54,7 +54,7 @@ api_proto_library( go_proto_library( name = "client_model_go_proto", - importpath = "client_model", + importpath = "github.com/prometheus/client_model/go", proto = ":client_model", visibility = ["//visibility:public"], ) diff --git a/test/build/go_build_test.go b/test/build/go_build_test.go index c5c15bec..638ef478 100644 --- a/test/build/go_build_test.go +++ b/test/build/go_build_test.go @@ -3,14 +3,14 @@ package go_build_test import ( "testing" - _ "github.com/envoyproxy/data-plane-api/api/envoy/api/v2" - _ "github.com/envoyproxy/data-plane-api/api/envoy/api/v2/auth" - _ "github.com/envoyproxy/data-plane-api/api/envoy/config/bootstrap/v2" - _ "github.com/envoyproxy/data-plane-api/api/envoy/service/accesslog/v2" - _ "github.com/envoyproxy/data-plane-api/api/envoy/service/discovery/v2" - _ "github.com/envoyproxy/data-plane-api/api/envoy/service/metrics/v2" - _ "github.com/envoyproxy/data-plane-api/api/envoy/service/ratelimit/v2" - _ "github.com/envoyproxy/data-plane-api/api/envoy/service/trace/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/api/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/api/v2/auth" + _ "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/service/accesslog/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/service/metrics/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/service/ratelimit/v2" + _ "github.com/envoyproxy/go-control-plane/envoy/service/trace/v2" ) func TestNoop(t *testing.T) {