You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AIP-135: the method_signature of the Delete RPC MAY include the etag field, whereas I didn't find it in other AIPs.
AIP-134 includes some guidance on the update mask specific for only the etag field: "The update_mask field in the request does not affect the behavior of the etag field, as it is not a field being updated."
AIP-154 mentions "In some situations, the etag needs to belong on a request message rather than the resource itself", but only gives one specific example (Update).
Discussion
I believe this conflicting guidance originates by allowing "piggybacking" of the etag field (which seems to only be used for the Update RPC). By disallowing this "piggybacking", I believe the guidance would become clearer:
The Update RPC (and any other example using "piggybacking" at the moment - if there are any other examples) would include the etag on the request message:
message UpdateBookRequest {
// The book to update.
//
// The book's `name` field is used to identify the book to update.
// Format: publishers/{publisher}/books/{book}
Book book = 1 [(google.api.field_behavior) = REQUIRED];
// The list of fields to update.
google.protobuf.FieldMask update_mask = 2;
// The current etag of the book.
// If an etag is provided and does not match the current etag of the book,
// the update will be blocked and an ABORTED error will be returned.
string etag = 3 [(google.api.field_behavior) = OPTIONAL];
}
The field behavior of etag on a resource would be OUTPUT_ONLY.
The method_signature of RPCs would include the "etag" if it is required on the request.
All special cases and mentions I highlighted would become obsolete.
The text was updated successfully, but these errors were encountered:
Context
I feel there is currently some confusing and conflicting guidance for the etag field:
method_signature
of the Delete RPC MAY include the etag field, whereas I didn't find it in other AIPs.Discussion
I believe this conflicting guidance originates by allowing "piggybacking" of the etag field (which seems to only be used for the Update RPC). By disallowing this "piggybacking", I believe the guidance would become clearer:
The text was updated successfully, but these errors were encountered: