rules_proto
rules_proto copied to clipboard
Google Endpoint descriptor file error
trafficstars
For some reason, I'm getting an error when trying to deploy to google endpoints. Here is a preview of my WORKSPACE:
http_archive(
name = "rules_proto",
sha256 = "fbf650f1cf4517c894eb0ed1ddf935ac49cd0aa7b111d5de0aad2814decff9d6",
strip_prefix = "rules_proto-af6481970a34554c6942d993e194a9aed7987780",
urls = ["https://github.com/bazelbuild/rules_proto/archive/af6481970a34554c6942d993e194a9aed7987780.zip"],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
http_archive(
name = "com_google_protobuf",
sha256 = "77ad26d3f65222fd96ccc18b055632b0bfedf295cb748b712a98ba1ac0b704b2",
strip_prefix = "protobuf-3.17.3",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v3.17.3/protobuf-all-3.17.3.tar.gz",
)
http_archive(
name = "googleapi",
sha256 = "51849d3ef693c88eb7692875eb444ef7131502e3fa200f25fc0a37b1e7e55ab5",
strip_prefix = "googleapis-a111a53c0c6722afcd793b64724ceef7862db5b9",
url = "https://github.com/googleapis/googleapis/archive/a111a53c0c6722afcd793b64724ceef7862db5b9.zip",
)
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
BUILD
load("@rules_proto//proto:defs.bzl", "proto_library", "proto_descriptor_set")
proto_library(
name = "my_proto",
srcs = glob(["src/main/proto/my.proto"]),
deps = [
"@googleapi//google/api:annotations_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
proto_descriptor_set(
name = "protofile",
deps = [":my_proto"],
)
It used to work a couple of days ago, and now I'm getting this error:
DEBUG: Running [gcloud.endpoints.services.deploy] with arguments: [--verbosity: "debug", SERVICE_CONFIG_FILE:2: "[u'bazel-bin/my_proto-descriptor-set.proto.bin', u'kubernetes/dev/endpoints/api_config.yaml']"]
INFO: No JSON detected in service config. Trying YAML...
DEBUG: (gcloud.endpoints.services.deploy) INVALID_ARGUMENT: Cannot convert to service config.
'location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
location: "unknown location"
kind: ERROR
message: "Unresolved type \'.google.protobuf.Timestamp\'"
'
Traceback (most recent call last):
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 984, in Execute
resources = calliope_command.Run(cli=self, args=args)
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 784, in Run
resources = command_instance.Run(args)
File "/usr/lib64/google-cloud-sdk/lib/surface/endpoints/services/deploy.py", line 356, in Run
validate_only=self.validate_only)
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/api_lib/endpoints/services_util.py", line 333, in PushMultipleServiceConfigFiles
api_response = client.services_configs.Submit(submit_request)
File "/usr/lib64/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/servicemanagement/v1/servicemanagement_v1_client.py", line 273, in Submit
config, request, global_params=global_params)
File "/usr/lib64/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 731, in _RunMethod
return self.ProcessHttpResponse(method_config, http_response, request)
File "/usr/lib64/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 737, in ProcessHttpResponse
self.__ProcessHttpResponse(method_config, http_response, request))
File "/usr/lib64/google-cloud-sdk/lib/third_party/apitools/base/py/base_api.py", line 604, in __ProcessHttpResponse
http_response, method_config=method_config, request=request)
HttpBadRequestError: HttpError accessing <https://servicemanagement.googleapis.com/v1/services/service.endpoints.svc-microservices.cloud.goog/configs:submit?alt=json>: response: <{'status': '400', 'content-length': '1123', 'x-xss-protection': '0', 'x-content-type-options': 'nosniff', 'transfer-encoding': 'chunked', 'vary': 'Origin, X-Origin, Referer', 'server': 'ESF', '-content-encoding': 'gzip', 'x-debug-tracking-id': '10282591772706111363;o=0', 'cache-control': 'private', 'date': 'Thu, 15 Jul 2021 17:03:58 GMT', 'x-frame-options': 'SAMEORIGIN', 'alt-svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"', 'content-type': 'application/json; charset=UTF-8'}>, content <{
"error": {
"code": 400,
"message": "Cannot convert to service config.\n'location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n\n location: \"unknown location\"\nkind: ERROR\nmessage: \"Unresolved type \\'.google.protobuf.Timestamp\\'\"\n'",
"status": "INVALID_ARGUMENT"
}
}
>
Any idea what the issue can be?
Thanks a lot!
This doesn't look like proto rules issue.