Fix build environment following cncf/udpa -> cncf/xds migration. (#5)

Signed-off-by: Harvey Tuch <htuch@google.com>
pull/3/head
htuch 4 years ago committed by GitHub
parent ec5400acbc
commit fbca930ec8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .bazelrc
  2. 1
      .bazelversion
  3. 4
      .gitattributes
  4. 2
      .gitignore
  5. 2
      WORKSPACE
  6. 2
      bazel/api_build_system.bzl
  7. 2
      bazel/dependency_imports.bzl
  8. 4
      ci/check.sh
  9. 2
      go/go.mod
  10. 2
      go/udpa/service/orca/v1/orca.pb.go
  11. 2
      go/xds/core/v3/authority.pb.go
  12. 2
      go/xds/core/v3/collection_entry.pb.go
  13. 2
      go/xds/core/v3/context_params.pb.go
  14. 2
      go/xds/core/v3/resource.pb.go
  15. 2
      go/xds/core/v3/resource_locator.pb.go
  16. 2
      go/xds/core/v3/resource_name.pb.go
  17. 8
      test/build/go_build_test.go
  18. 2
      tools/generate_go_protobuf.py

@ -0,0 +1 @@
build:ci --announce_rc

@ -0,0 +1 @@
2.0.0

4
.gitattributes vendored

@ -0,0 +1,4 @@
*.pb.go linguist-generated=true
*.pb.go -diff -merge
*.pb.validate.go linguist-generated=true
*.pb.validate.go -diff -merge

2
.gitignore vendored

@ -0,0 +1,2 @@
bazel-*
go.sum

@ -1,4 +1,4 @@
workspace(name = "com_github_cncf_udpa")
workspace(name = "com_github_cncf_xds")
load("//bazel:repositories.bzl", "udpa_api_dependencies")

@ -8,7 +8,7 @@ _PY_PROTO_SUFFIX = "_py_proto"
_CC_PROTO_SUFFIX = "_cc_proto"
_CC_GRPC_SUFFIX = "_cc_grpc"
_GO_PROTO_SUFFIX = "_go_proto"
_GO_IMPORTPATH_PREFIX = "github.com/cncf/udpa/go/"
_GO_IMPORTPATH_PREFIX = "github.com/cncf/xds/go/"
_COMMON_PROTO_DEPS = [
"@com_google_protobuf//:any_proto",

@ -18,7 +18,7 @@ def udpa_dependency_imports(go_version = GO_VERSION):
go = True,
grpc = True,
rules_override = {
"py_proto_library": "@com_github_cncf_udpa//bazel:api_build_system.bzl",
"py_proto_library": "@com_github_cncf_xds//bazel:api_build_system.bzl",
},
)

@ -4,11 +4,11 @@ set -e
bazel test --config=ci //...
rm -rf go/udpa
rm -rf go/xds go/udpa
tools/generate_go_protobuf.py
git add go/udpa
git add go/xds go/udpa
echo "If this check fails, apply following diff:"
git diff HEAD

@ -1,4 +1,4 @@
module github.com/cncf/udpa/go
module github.com/cncf/xds/go
go 1.11

@ -6,7 +6,7 @@ package udpa_service_orca_v1
import (
context "context"
fmt "fmt"
v1 "github.com/cncf/udpa/go/udpa/data/orca/v1"
v1 "github.com/cncf/xds/go/udpa/data/orca/v1"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"

@ -5,7 +5,7 @@ package xds_core_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"

@ -5,7 +5,7 @@ package xds_core_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"

@ -5,7 +5,7 @@ package xds_core_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/cncf/xds/go/udpa/annotations"
proto "github.com/golang/protobuf/proto"
math "math"
)

@ -5,7 +5,7 @@ package xds_core_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/cncf/xds/go/udpa/annotations"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
math "math"

@ -5,7 +5,7 @@ package xds_core_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"

@ -5,7 +5,7 @@ package xds_core_v3
import (
fmt "fmt"
_ "github.com/cncf/udpa/go/udpa/annotations"
_ "github.com/cncf/xds/go/udpa/annotations"
_ "github.com/envoyproxy/protoc-gen-validate/validate"
proto "github.com/golang/protobuf/proto"
math "math"

@ -3,11 +3,11 @@ package go_build_test
import (
"testing"
_ "github.com/cncf/udpa/go/udpa/data/orca/v1"
_ "github.com/cncf/udpa/go/udpa/service/orca/v1"
_ "github.com/cncf/udpa/go/udpa/type/v1"
_ "github.com/cncf/xds/go/udpa/data/orca/v1"
_ "github.com/cncf/xds/go/udpa/service/orca/v1"
_ "github.com/cncf/xds/go/udpa/type/v1"
)
func TestNoop(t *testing.T) {
// Noop test that verifies the successful importation of UDPA protos
// Noop test that verifies the successful importation of xDS protos
}

@ -19,7 +19,7 @@ def generateProtobufs(output):
for rule in go_protos:
rule_dir, proto = rule.decode()[2:].rsplit(':', 1)
input_dir = os.path.join(bazel_bin, rule_dir, 'linux_amd64_stripped',
proto + '%', 'github.com/cncf/udpa/go', rule_dir)
proto + '%', 'github.com/cncf/xds/go', rule_dir)
input_files = glob.glob(os.path.join(input_dir, '*.go'))
output_dir = os.path.join(output, rule_dir)

Loading…
Cancel
Save