We are using API Gateway + gRPC with transcoding via the "google.api.http" annotations. On the 2nd Feb 2024 (or earlier, definitely after the 29th) this stopped working with the error:
ERROR: (gcloud.api-gateway.api-configs.create) INVALID_ARGUMENT: Invalid file descriptor set "descriptor.pb": proto: extension field "google.api.http" cannot be declared in proto3 unless extended descriptor options
We tried:
- updating the protoc version (and downgrading)
- using old configs / protos
- changing the version of the gcloud components
We concluded this is likely not an error on our side.
The error only went away after removing 'import "google/api/annotations.proto";'. However, without this we cannot translate http requests to the grpc endpoints. According to google docs this is still supported.
Any ideas if anything changed recently that could've impacted this?
I was receiving the same error on my pipe.
It happened because one of our protos (proto3) extended a message from a proto2 file.
In the proto3 file, I added the property optional on the extended message property.
Following below my modification that solved the error:
syntax = "proto3";
...
extend google.protobuf.MethodOptions {
optional HttpRule http = 72295728;
}
https://issuetracker.google.com/issues/323708260
Oddly enough, this issue was fixed soon after somebody was assigned to our ticket. We didn't change anything, it just started working again (just like it worked before).
Just as I originally suspected, this was likely an issue on Google's side that got resolved (whether manually or automatically).