From 8e92ac0c2aefc9fe5d60e3fd12ee35dfd380fd0f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 15:00:18 -0400 Subject: [PATCH 1/3] docs: modified some descriptions (#1842) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: modified some descriptions PiperOrigin-RevId: 573936401 Source-Link: https://github.com/googleapis/googleapis/commit/c1f013491bc8dce60e93ca355ea494ee2e522dd8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a063e1be04179c7386317bb395dea10eb38229b2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTA2M2UxYmUwNDE3OWM3Mzg2MzE3YmIzOTVkZWExMGViMzgyMjliMiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- protos/google/pubsub/v1/pubsub.proto | 27 ++++++++++++++------------- src/v1/publisher_client.ts | 2 +- src/v1/subscriber_client.ts | 14 +++++++------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/protos/google/pubsub/v1/pubsub.proto b/protos/google/pubsub/v1/pubsub.proto index 4468de178..700324dc7 100644 --- a/protos/google/pubsub/v1/pubsub.proto +++ b/protos/google/pubsub/v1/pubsub.proto @@ -44,7 +44,7 @@ service Publisher { "https://www.googleapis.com/auth/pubsub"; // Creates the given topic with the given name. See the [resource name rules] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). rpc CreateTopic(Topic) returns (Topic) { option (google.api.http) = { put: "/v1/{name=projects/*/topics/*}" @@ -137,11 +137,12 @@ service Publisher { // A policy constraining the storage of messages published to the topic. message MessageStoragePolicy { - // A list of IDs of GCP regions where messages that are published to the topic - // may be persisted in storage. Messages published by publishers running in - // non-allowed GCP regions (or running outside of GCP altogether) will be - // routed for storage in one of the allowed regions. An empty list means that - // no regions are allowed, and is not a valid configuration. + // A list of IDs of Google Cloud regions where messages that are published + // to the topic may be persisted in storage. Messages published by publishers + // running in non-allowed Google Cloud regions (or running outside of Google + // Cloud altogether) are routed for storage in one of the allowed regions. + // An empty list means that no regions are allowed, and is not a valid + // configuration. repeated string allowed_persistence_regions = 1; } @@ -430,16 +431,16 @@ service Subscriber { "https://www.googleapis.com/auth/pubsub"; // Creates a subscription to a given topic. See the [resource name rules] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). // If the subscription already exists, returns `ALREADY_EXISTS`. // If the corresponding topic doesn't exist, returns `NOT_FOUND`. // // If the name is not provided in the request, the server will assign a random // name for this subscription on the same project as the topic, conforming // to the [resource name format] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated - // name is populated in the returned Subscription object. Note that for REST - // API requests, you must specify a name in the request. + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The + // generated name is populated in the returned Subscription object. Note that + // for REST API requests, you must specify a name in the request. rpc CreateSubscription(Subscription) returns (Subscription) { option (google.api.http) = { put: "/v1/{name=projects/*/subscriptions/*}" @@ -592,7 +593,7 @@ service Subscriber { // the request, the server will assign a random // name for this snapshot on the same project as the subscription, conforming // to the [resource name format] - // (https://cloud.google.com/pubsub/docs/admin#resource_names). The + // (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The // generated name is populated in the returned Snapshot object. Note that for // REST API requests, you must specify a name in the request. rpc CreateSnapshot(CreateSnapshotRequest) returns (Snapshot) { @@ -1429,8 +1430,8 @@ message CreateSnapshotRequest { // 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 [resource name - // rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - // is `projects/{project}/snapshots/{snap}`. + // rules](https://cloud.google.com/pubsub/docs/pubsub-basics#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" } diff --git a/src/v1/publisher_client.ts b/src/v1/publisher_client.ts index 7183a2a94..7eb92ba0c 100644 --- a/src/v1/publisher_client.ts +++ b/src/v1/publisher_client.ts @@ -386,7 +386,7 @@ export class PublisherClient { // ------------------- /** * Creates the given topic with the given name. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). * * @param {Object} request * The request object that will be sent. diff --git a/src/v1/subscriber_client.ts b/src/v1/subscriber_client.ts index 661c31e19..a92a9c951 100644 --- a/src/v1/subscriber_client.ts +++ b/src/v1/subscriber_client.ts @@ -394,16 +394,16 @@ export class SubscriberClient { // ------------------- /** * Creates a subscription to a given topic. See the [resource name rules] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). * If the subscription already exists, returns `ALREADY_EXISTS`. * If the corresponding topic doesn't exist, returns `NOT_FOUND`. * * If the name is not provided in the request, the server will assign a random * name for this subscription on the same project as the topic, conforming * to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The generated - * name is populated in the returned Subscription object. Note that for REST - * API requests, you must specify a name in the request. + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The + * generated name is populated in the returned Subscription object. Note that + * for REST API requests, you must specify a name in the request. * * @param {Object} request * The request object that will be sent. @@ -1324,7 +1324,7 @@ export class SubscriberClient { * the request, the server will assign a random * name for this snapshot on the same project as the subscription, conforming * to the [resource name format] - * (https://cloud.google.com/pubsub/docs/admin#resource_names). The + * (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The * generated name is populated in the returned Snapshot object. Note that for * REST API requests, you must specify a name in the request. * @@ -1335,8 +1335,8 @@ export class SubscriberClient { * 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 [resource name - * rules](https://cloud.google.com/pubsub/docs/admin#resource_names). Format - * is `projects/{project}/snapshots/{snap}`. + * rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). + * Format is `projects/{project}/snapshots/{snap}`. * @param {string} request.subscription * Required. The subscription whose backlog the snapshot retains. * Specifically, the created snapshot is guaranteed to retain: From 58d8a92d1b3fa5092cba441479355e9b257b847b Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 23 Oct 2023 21:21:47 +0200 Subject: [PATCH 2/3] chore(deps): update dependency sinon to v17 (#1844) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64fb3b5a1..355c2b63f 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "null-loader": "^4.0.0", "protobufjs": "^7.0.0", "proxyquire": "^2.0.0", - "sinon": "^16.0.0", + "sinon": "^17.0.0", "tmp": "^0.2.0", "ts-loader": "^9.0.0", "typescript": "^5.1.6", From 7b82ff01e5c654b3e339dfdec5b3da8bf45da049 Mon Sep 17 00:00:00 2001 From: Kamal Aboul-Hosn Date: Fri, 3 Nov 2023 13:30:31 -0400 Subject: [PATCH 3/3] fix: set x-goog-request-params for streaming pull request (#1849) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * samples: create BigQuery subscription * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: set x-goog-request-params for streaming pull request --------- Co-authored-by: Owl Bot Co-authored-by: Megan Potter <57276408+feywind@users.noreply.github.com> --- src/message-stream.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/message-stream.ts b/src/message-stream.ts index 7ea275ee5..80b714496 100644 --- a/src/message-stream.ts +++ b/src/message-stream.ts @@ -323,8 +323,13 @@ export class MessageStream extends PassThrough { ? 0 : this._subscriber.maxBytes, }; + const otherArgs = { + headers: { + 'x-goog-request-params': 'subscription=' + this._subscriber.name, + }, + }; - const stream: PullStream = client.streamingPull({deadline}); + const stream: PullStream = client.streamingPull({deadline, otherArgs}); this._replaceStream(index, stream); stream.write(request); }