Skip to content

Commit

Permalink
feat: Make INTERNAL a retryable error for Pull (#1681)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 510255779

Source-Link: https://togithub.com/googleapis/googleapis/commit/58e4422ffda317bbbb03e30bb4620afa8ad1c7d6

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/d67c1eb9f045f342a1dbad6666af3c1331eae615
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDY3YzFlYjlmMDQ1ZjM0MmExZGJhZDY2NjZhZjNjMTMzMWVhZTYxNSJ9

BEGIN_NESTED_COMMIT
feat: Add temporary_failed_ack_ids to ModifyAckDeadlineConfirmation
PiperOrigin-RevId: 510255074

Source-Link: https://togithub.com/googleapis/googleapis/commit/7427d37520b0f9ccdcd1a5a83288cdeea43cf826

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/c7d5aacbca6a81c35930abf219536447d0e58702
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzdkNWFhY2JjYTZhODFjMzU5MzBhYmYyMTk1MzY0NDdkMGU1ODcwMiJ9
END_NESTED_COMMIT
BEGIN_NESTED_COMMIT
docs: Clarify BigQueryConfig PERMISSION_DENIED state
PiperOrigin-RevId: 509847316

Source-Link: https://togithub.com/googleapis/googleapis/commit/d753d6386b031aa031b53d7bb1c23a23a78ee615

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/da4e7fe0044b303303ef4c8e46efaf0fcc98e8bf
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGE0ZTdmZTAwNDRiMzAzMzAzZWY0YzhlNDZlZmFmMGZjYzk4ZThiZiJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITdocs: Clarify subscription description
PiperOrigin-RevId: 509847159

Source-Link: https://togithub.com/googleapis/googleapis/commit/2a1543a1c0e72f03a95a4be9f32e30fc4cedf879

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/a4996434dc7ede3eb40ee6098130520e7d8049a9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTQ5OTY0MzRkYzdlZGUzZWI0MGVlNjA5ODEzMDUyMGU3ZDgwNDlhOSJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITdocs: Replacing HTML code with Markdown
docs: Fix PullResponse description
docs: Fix Pull description

PiperOrigin-RevId: 509846267

Source-Link: https://togithub.com/googleapis/googleapis/commit/bb626b17c39848285f7f69ed978c843a900cee56

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/34c8b57847276f7d67ced245b56075b9cde86094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzRjOGI1Nzg0NzI3NmY3ZDY3Y2VkMjQ1YjU2MDc1YjljZGU4NjA5NCJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITdocs: Update Pub/Sub topic retention limit from 7 days to 31 days
PiperOrigin-RevId: 509846179

Source-Link: https://togithub.com/googleapis/googleapis/commit/19473b44ae71bd853e30cfdc6cf0adb3818bc9c9

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/db895f1453c272f599f219dcacdd4f08c3f3bb6c
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGI4OTVmMTQ1M2MyNzJmNTk5ZjIxOWRjYWNkZDRmMDhjM2YzYmI2YyJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITfeat: Add google.api.method.signature to update methods
PiperOrigin-RevId: 509649352

Source-Link: https://togithub.com/googleapis/googleapis/commit/1870ba2163526fa9fba63bf899c92707476d4603

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/515dcdfdd27ff00c30e555bdf17b7743e21457e9
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTE1ZGNkZmRkMjdmZjAwYzMwZTU1NWJkZjE3Yjc3NDNlMjE0NTdlOSJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITdocs: changing format of the jsdoc links
PiperOrigin-RevId: 509352615

Source-Link: https://togithub.com/googleapis/googleapis/commit/b737d30dae27222d86fa340ecb99292df4585762

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/8efadf3d58780ea1c550268d46a3dc701ba37fcf
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGVmYWRmM2Q1ODc4MGVhMWM1NTAyNjhkNDZhM2RjNzAxYmEzN2ZjZiJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITdocs: Mark revision_id in CommitSchemaRevisionRequest deprecated
PiperOrigin-RevId: 508076213

Source-Link: https://togithub.com/googleapis/googleapis/commit/3b9ae88062e8f0f6603cc8bcba945197cc60d314

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/d5e26492de9100eb2cf686ea7bccf2498b6600d4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDVlMjY0OTJkZTkxMDBlYjJjZjY4NmVhN2JjY2YyNDk4YjY2MDBkNCJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITchore(gitignore): only ignore folders in the top level
PiperOrigin-RevId: 507603203

Source-Link: https://togithub.com/googleapis/googleapis/commit/a4f2de456480c0a4ed9feeeaa1f8ee620bbef23a

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/dcf882154e7c710ecf2a1abc77b35c95f9062371
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGNmODgyMTU0ZTdjNzEwZWNmMmExYWJjNzdiMzVjOTVmOTA2MjM3MSJ9
END_NESTED_COMMITBEGIN_NESTED_COMMITchore: update .gitignore to always include protos folder
Use gapic-generator-typescript v3.0.0.

PiperOrigin-RevId: 507004755

Source-Link: https://togithub.com/googleapis/googleapis/commit/d784f3c1043616fc0646e9ce7afa1b9161cc02de

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/5e64ba8615f65fdedb1fcd6ac792e5ea621027e4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWU2NGJhODYxNWY2NWZkZWRiMWZjZDZhYzc5MmU1ZWE2MjEwMjdlNCJ9
END_NESTED_COMMIT
  • Loading branch information
gcf-owl-bot[bot] committed Feb 17, 2023
1 parent faa885f commit 1e28405
Show file tree
Hide file tree
Showing 10 changed files with 277 additions and 163 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
**/*.log
**/node_modules
.coverage
coverage
.nyc_output
docs/
out/
build/
/.coverage
/coverage
/.nyc_output
/docs/
/out/
/build/
system-test/secrets.js
system-test/*key.json
*.lock
Expand Down
75 changes: 42 additions & 33 deletions protos/google/pubsub/v1/pubsub.proto
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ service Publisher {
patch: "/v1/{topic.name=projects/*/topics/*}"
body: "*"
};
option (google.api.method_signature) = "topic,update_mask";
}

// Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
Expand Down Expand Up @@ -214,7 +215,7 @@ message Topic {
// timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
// that is up to `message_retention_duration` in the past. If this field is
// not set, message retention is controlled by settings on individual
// subscriptions. Cannot be more than 7 days or less than 10 minutes.
// subscriptions. Cannot be more than 31 days or less than 10 minutes.
google.protobuf.Duration message_retention_duration = 8;
}

Expand Down Expand Up @@ -461,6 +462,7 @@ service Subscriber {
patch: "/v1/{subscription.name=projects/*/subscriptions/*}"
body: "*"
};
option (google.api.method_signature) = "subscription,update_mask";
}

// Lists matching subscriptions.
Expand Down Expand Up @@ -515,9 +517,7 @@ service Subscriber {
option (google.api.method_signature) = "subscription,ack_ids";
}

// Pulls messages from the server. The server may return `UNAVAILABLE` if
// there are too many concurrent pull requests pending for the given
// subscription.
// Pulls messages from the server.
rpc Pull(PullRequest) returns (PullResponse) {
option (google.api.http) = {
post: "/v1/{subscription=projects/*/subscriptions/*}:pull"
Expand Down Expand Up @@ -554,10 +554,10 @@ service Subscriber {
}

// Gets the configuration details of a snapshot. Snapshots are used in
// <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
// operations, which allow you to manage message acknowledgments in bulk. That
// is, you can set the acknowledgment state of messages in an existing
// subscription to the state captured by a snapshot.
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
// which allow you to manage message acknowledgments in bulk. That is, you can
// set the acknowledgment state of messages in an existing subscription to the
// state captured by a snapshot.
rpc GetSnapshot(GetSnapshotRequest) returns (Snapshot) {
option (google.api.http) = {
get: "/v1/{snapshot=projects/*/snapshots/*}"
Expand Down Expand Up @@ -602,16 +602,16 @@ service Subscriber {
}

// Updates an existing snapshot. Snapshots are used in
// <a href="https://cloud.google.com/pubsub/docs/replay-overview">Seek</a>
// operations, which allow
// you to manage message acknowledgments in bulk. That is, you can set the
// acknowledgment state of messages in an existing subscription to the state
// captured by a snapshot.
// [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
// which allow you to manage message acknowledgments in bulk. That is, you can
// set the acknowledgment state of messages in an existing subscription to the
// state captured by a snapshot.
rpc UpdateSnapshot(UpdateSnapshotRequest) returns (Snapshot) {
option (google.api.http) = {
patch: "/v1/{snapshot.name=projects/*/snapshots/*}"
body: "*"
};
option (google.api.method_signature) = "snapshot,update_mask";
}

// Removes an existing snapshot. Snapshots are used in [Seek]
Expand Down Expand Up @@ -645,7 +645,9 @@ service Subscriber {
}
}

// A subscription resource.
// A subscription resource. If none of `push_config` or `bigquery_config` is
// set, then the subscriber will pull and ack messages using API methods. At
// most one of these fields may be set.
message Subscription {
option (google.api.resource) = {
type: "pubsub.googleapis.com/Subscription"
Expand Down Expand Up @@ -683,21 +685,17 @@ message Subscription {
];

// If push delivery is used with this subscription, this field is
// used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
// but not both. If both are empty, then the subscriber will pull and ack
// messages using API methods.
// used to configure it.
PushConfig push_config = 4;

// If delivery to BigQuery is used with this subscription, this field is
// used to configure it. Either `pushConfig` or `bigQueryConfig` can be set,
// but not both. If both are empty, then the subscriber will pull and ack
// messages using API methods.
// used to configure it.
BigQueryConfig bigquery_config = 18;

// The approximate amount of time (on a best-effort basis) Pub/Sub waits for
// the subscriber to acknowledge receipt before resending the message. In the
// interval after the message is delivered and before it is acknowledged, it
// is considered to be <i>outstanding</i>. During that time period, the
// is considered to be _outstanding_. During that time period, the
// message will not be redelivered (on a best-effort basis).
//
// For pull subscriptions, this value is used as the initial value for the ack
Expand Down Expand Up @@ -732,8 +730,8 @@ message Subscription {
// minutes.
google.protobuf.Duration message_retention_duration = 8;

// See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
// managing labels</a>.
// See [Creating and managing
// labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 9;

// If true, messages published with the same `ordering_key` in `PubsubMessage`
Expand Down Expand Up @@ -922,7 +920,7 @@ message PushConfig {
// * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.
//
// For example:
// <pre><code>attributes { "x-goog-version": "v1" } </code></pre>
// `attributes { "x-goog-version": "v1" }`
map<string, string> attributes = 2;

// An authentication method used by push endpoints to verify the source of
Expand All @@ -948,6 +946,11 @@ message BigQueryConfig {
ACTIVE = 1;

// Cannot write to the BigQuery table because of permission denied errors.
// This can happen if
// - Pub/Sub SA has not been granted the [appropriate BigQuery IAM
// permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account)
// - bigquery.googleapis.com API is not enabled for the project
// ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))
PERMISSION_DENIED = 2;

// Cannot write to the BigQuery table because it does not exist.
Expand All @@ -958,7 +961,7 @@ message BigQueryConfig {
}

// The name of the table to which to write data, of the form
// {projectId}:{datasetId}.{tableId}
// {projectId}.{datasetId}.{tableId}
string table = 1;

// When true, use the topic's schema as the columns to write to in BigQuery,
Expand Down Expand Up @@ -1127,7 +1130,8 @@ message PullRequest {
// Response for the `Pull` method.
message PullResponse {
// Received Pub/Sub messages. The list will be empty if there are no more
// messages available in the backlog. For JSON, the response can be entirely
// messages available in the backlog, or if no messages could be returned
// before the request timeout. For JSON, the response can be entirely
// empty. The Pub/Sub system may return fewer than the `maxMessages` requested
// even if there are more messages available in the backlog.
repeated ReceivedMessage received_messages = 1;
Expand Down Expand Up @@ -1270,6 +1274,9 @@ message StreamingPullResponse {

// List of acknowledgement IDs that were out of order.
repeated string unordered_ack_ids = 3;

// List of acknowledgement IDs that failed processing with temporary issues.
repeated string temporary_failed_ack_ids = 4;
}

// Acknowledgement IDs sent in one or more previous requests to modify the
Expand All @@ -1281,21 +1288,23 @@ message StreamingPullResponse {
// List of acknowledgement IDs that were malformed or whose acknowledgement
// deadline has expired.
repeated string invalid_ack_ids = 2;

// List of acknowledgement IDs that failed processing with temporary issues.
repeated string temporary_failed_ack_ids = 3;
}

// Subscription properties sent as part of the response.
message SubscriptionProperties {
// True iff exactly once delivery is enabled for this subscription.
bool exactly_once_delivery_enabled = 1;

// True iff message ordering is enabled for this subscription.
bool message_ordering_enabled = 2;
}

// Received Pub/Sub messages. This will not be empty.
repeated ReceivedMessage received_messages = 1;

reserved 2;

// This field will only be set if `enable_exactly_once_delivery` is set to
// `true`.
AcknowledgeConfirmation acknowledge_confirmation = 5;
Expand All @@ -1313,9 +1322,9 @@ message CreateSnapshotRequest {
// Required. User-provided name for this snapshot. If the name is not provided
// in the request, the server will assign a random name for this snapshot on
// the same project as the subscription. Note that for REST API requests, you
// must specify a name. See the <a
// href="https://cloud.google.com/pubsub/docs/admin#resource_names"> resource
// name rules</a>. Format is `projects/{project}/snapshots/{snap}`.
// must specify a name. See the [resource name
// rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format
// is `projects/{project}/snapshots/{snap}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" }
Expand All @@ -1337,8 +1346,8 @@ message CreateSnapshotRequest {
}
];

// See <a href="https://cloud.google.com/pubsub/docs/labels"> Creating and
// managing labels</a>.
// See [Creating and managing
// labels](https://cloud.google.com/pubsub/docs/labels).
map<string, string> labels = 3;
}

Expand Down
12 changes: 6 additions & 6 deletions protos/google/pubsub/v1/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,17 @@ message DeleteSchemaRevisionRequest {
// Required. The name of the schema revision to be deleted, with a revision ID
// explicitly included.
//
// Example: projects/123/schemas/my-schema@c7cfa2a8
// Example: `projects/123/schemas/my-schema@c7cfa2a8`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "pubsub.googleapis.com/Schema" }
];

// Required. The revision ID to roll back to.
// It must be a revision of the same schema.
//
// Example: c7cfa2a8
string revision_id = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. This field is deprecated and should not be used for specifying
// the revision ID. The revision ID should be specified via the `name`
// parameter.
string revision_id = 2
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
}

// Request for the `DeleteSchema` method.
Expand Down
12 changes: 12 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1e28405

Please sign in to comment.