From 429a56e346c5ec3a71c591b6ccc4c3de51afe8f9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 28 Aug 2025 13:06:41 +0200 Subject: [PATCH 1/9] chore(deps): update dependency node to v22 (#2400) --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/issues-no-repro.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10c83fc28..35a2bb30d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: node --version - run: npm install --engine-strict working-directory: .github/scripts @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm install --engine-strict - run: npm test env: @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm install - run: npm run lint docs: @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm install - run: npm run docs - uses: JustinBeckwith/linkinator-action@v1 diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml index 531054022..0f598789a 100644 --- a/.github/workflows/issues-no-repro.yaml +++ b/.github/workflows/issues-no-repro.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 22 - run: npm install working-directory: ./.github/scripts - uses: actions/github-script@v7 From 4466500033928905a0dbe9bd6445b933189bf874 Mon Sep 17 00:00:00 2001 From: alkatrivedi <58396306+alkatrivedi@users.noreply.github.com> Date: Fri, 29 Aug 2025 10:22:02 +0000 Subject: [PATCH 2/9] README: update readme for multiplexed sessions (#2405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * README: update readme for multiplexed session * 🦉 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 --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/issues-no-repro.yaml | 2 +- .readme-partials.yml | 21 +++++++++++++++++++++ README.md | 18 ++++++++++++++++++ 4 files changed, 44 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 35a2bb30d..10c83fc28 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 18 - run: node --version - run: npm install --engine-strict working-directory: .github/scripts @@ -46,7 +46,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 18 - run: npm install --engine-strict - run: npm test env: @@ -57,7 +57,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 18 - run: npm install - run: npm run lint docs: @@ -66,7 +66,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 18 - run: npm install - run: npm run docs - uses: JustinBeckwith/linkinator-action@v1 diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml index 0f598789a..531054022 100644 --- a/.github/workflows/issues-no-repro.yaml +++ b/.github/workflows/issues-no-repro.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 18 - run: npm install working-directory: ./.github/scripts - uses: actions/github-script@v7 diff --git a/.readme-partials.yml b/.readme-partials.yml index 1e9df3410..d924cc3a9 100644 --- a/.readme-partials.yml +++ b/.readme-partials.yml @@ -2,3 +2,24 @@ introduction: |- [Cloud Spanner](https://cloud.google.com/spanner/docs/) is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, schemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication for high availability. + +body: |- + ## Multiplexed Sessions + + Spanner's Multiplexed Sessions can now be used as an efficient alternative to the default session pool. This feature helps reduce + session management overhead and minimize session-related errors. Multiplexed sessions can be enabled for all transaction types via environment variables. + + ### Configuration + + To enable this feature, set the following environment variables to `true`: + + * **For Read-Only Transactions:** + - `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS` + * **For Partitioned Operations:** + - `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS` + - `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS` + * **For Read-Write Transactions:** + - `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS` + - `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW` + + For a detailed explanation of this feature, please refer to the [official documentation](https://cloud.google.com/spanner/docs/sessions#multiplexed_sessions). diff --git a/README.md b/README.md index e9e138334..6621b6cd9 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,25 @@ console.log(`Query: ${rows.length} found.`); rows.forEach(row => console.log(row)); ``` +## Multiplexed Sessions +Spanner's Multiplexed Sessions can now be used as an efficient alternative to the default session pool. This feature helps reduce +session management overhead and minimize session-related errors. Multiplexed sessions can be enabled for all transaction types via environment variables. + +### Configuration + +To enable this feature, set the following environment variables to `true`: + +* **For Read-Only Transactions:** +- `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS` +* **For Partitioned Operations:** +- `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS` +- `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_PARTITIONED_OPS` +* **For Read-Write Transactions:** +- `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS` +- `GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS_FOR_RW` + +For a detailed explanation of this feature, please refer to the [official documentation](https://cloud.google.com/spanner/docs/sessions#multiplexed_sessions). ## Samples From 97406be00ed4b7291c633be00a3902a6fa6e0037 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 1 Sep 2025 23:23:20 +0530 Subject: [PATCH 3/9] docs: A comment for field `ranges` in message `.google.spanner.v1.KeySet` is changed (#2407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: A comment for field `ranges` in message `.google.spanner.v1.KeySet` is changed docs: A comment for message `Mutation` is changed docs: A comment for field `columns` in message `.google.spanner.v1.Mutation` is changed docs: A comment for field `values` in message `.google.spanner.v1.Mutation` is changed docs: A comment for field `key_set` in message `.google.spanner.v1.Mutation` is changed docs: A comment for field `insert_or_update` in message `.google.spanner.v1.Mutation` is changed docs: A comment for field `replace` in message `.google.spanner.v1.Mutation` is changed docs: A comment for message `PlanNode` is changed docs: A comment for enum `Kind` is changed docs: A comment for field `variable` in message `.google.spanner.v1.PlanNode` is changed docs: A comment for field `index` in message `.google.spanner.v1.PlanNode` is changed docs: A comment for field `kind` in message `.google.spanner.v1.PlanNode` is changed docs: A comment for field `short_representation` in message `.google.spanner.v1.PlanNode` is changed docs: A comment for field `plan_nodes` in message `.google.spanner.v1.QueryPlan` is changed docs: A comment for method `CreateSession` in service `Spanner` is changed docs: A comment for method `GetSession` in service `Spanner` is changed docs: A comment for method `DeleteSession` in service `Spanner` is changed docs: A comment for method `ExecuteSql` in service `Spanner` is changed docs: A comment for method `ExecuteStreamingSql` in service `Spanner` is changed docs: A comment for method `Read` in service `Spanner` is changed docs: A comment for method `Commit` in service `Spanner` is changed docs: A comment for method `Rollback` in service `Spanner` is changed docs: A comment for method `PartitionQuery` in service `Spanner` is changed docs: A comment for method `PartitionRead` in service `Spanner` is changed docs: A comment for method `BatchWrite` in service `Spanner` is changed docs: A comment for field `session_template` in message `.google.spanner.v1.BatchCreateSessionsRequest` is changed docs: A comment for field `session_count` in message `.google.spanner.v1.BatchCreateSessionsRequest` is changed docs: A comment for field `approximate_last_use_time` in message `.google.spanner.v1.Session` is changed docs: A comment for field `multiplexed` in message `.google.spanner.v1.Session` is changed docs: A comment for enum `Priority` is changed docs: A comment for field `request_tag` in message `.google.spanner.v1.RequestOptions` is changed docs: A comment for field `transaction_tag` in message `.google.spanner.v1.RequestOptions` is changed docs: A comment for message `DirectedReadOptions` is changed docs: A comment for message `DirectedReadOptions` is changed docs: A comment for message `DirectedReadOptions` is changed docs: A comment for field `location` in message `.google.spanner.v1.DirectedReadOptions` is changed docs: A comment for field `auto_failover_disabled` in message `.google.spanner.v1.DirectedReadOptions` is changed docs: A comment for field `include_replicas` in message `.google.spanner.v1.DirectedReadOptions` is changed docs: A comment for field `exclude_replicas` in message `.google.spanner.v1.DirectedReadOptions` is changed docs: A comment for enum value `PROFILE` in enum `QueryMode` is changed docs: A comment for field `optimizer_version` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `optimizer_statistics_package` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `transaction` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `params` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `param_types` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `partition_token` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `seqno` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `data_boost_enabled` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `last_statement` in message `.google.spanner.v1.ExecuteSqlRequest` is changed docs: A comment for field `params` in message `.google.spanner.v1.ExecuteBatchDmlRequest` is changed docs: A comment for field `param_types` in message `.google.spanner.v1.ExecuteBatchDmlRequest` is changed docs: A comment for field `seqno` in message `.google.spanner.v1.ExecuteBatchDmlRequest` is changed docs: A comment for field `last_statements` in message `.google.spanner.v1.ExecuteBatchDmlRequest` is changed docs: A comment for field `precommit_token` in message `.google.spanner.v1.ExecuteBatchDmlResponse` is changed docs: A comment for message `PartitionOptions` is changed docs: A comment for field `partition_size_bytes` in message `.google.spanner.v1.PartitionOptions` is changed docs: A comment for field `max_partitions` in message `.google.spanner.v1.PartitionOptions` is changed docs: A comment for field `transaction` in message `.google.spanner.v1.PartitionQueryRequest` is changed docs: A comment for field `sql` in message `.google.spanner.v1.PartitionQueryRequest` is changed docs: A comment for field `params` in message `.google.spanner.v1.PartitionQueryRequest` is changed docs: A comment for field `param_types` in message `.google.spanner.v1.PartitionQueryRequest` is changed docs: A comment for field `key_set` in message `.google.spanner.v1.PartitionReadRequest` is changed docs: A comment for field `partition_token` in message `.google.spanner.v1.Partition` is changed docs: A comment for enum value `ORDER_BY_UNSPECIFIED` in enum `OrderBy` is changed docs: A comment for enum value `ORDER_BY_PRIMARY_KEY` in enum `OrderBy` is changed docs: A comment for enum value `LOCK_HINT_UNSPECIFIED` in enum `LockHint` is changed docs: A comment for enum value `LOCK_HINT_EXCLUSIVE` in enum `LockHint` is changed docs: A comment for field `key_set` in message `.google.spanner.v1.ReadRequest` is changed docs: A comment for field `limit` in message `.google.spanner.v1.ReadRequest` is changed docs: A comment for field `partition_token` in message `.google.spanner.v1.ReadRequest` is changed docs: A comment for field `data_boost_enabled` in message `.google.spanner.v1.ReadRequest` is changed docs: A comment for field `order_by` in message `.google.spanner.v1.ReadRequest` is changed docs: A comment for field `request_options` in message `.google.spanner.v1.BeginTransactionRequest` is changed docs: A comment for field `mutation_key` in message `.google.spanner.v1.BeginTransactionRequest` is changed docs: A comment for field `single_use_transaction` in message `.google.spanner.v1.CommitRequest` is changed docs: A comment for field `return_commit_stats` in message `.google.spanner.v1.CommitRequest` is changed docs: A comment for field `max_commit_delay` in message `.google.spanner.v1.CommitRequest` is changed docs: A comment for field `precommit_token` in message `.google.spanner.v1.CommitRequest` is changed docs: A comment for field `exclude_txn_from_change_streams` in message `.google.spanner.v1.BatchWriteRequest` is changed docs: A comment for enum value `SERIALIZABLE` in enum `IsolationLevel` is changed PiperOrigin-RevId: 800749899 Source-Link: https://github.com/googleapis/googleapis/commit/39c8072aee5d0df052b20db3d7ee74e3fb82aa14 Source-Link: https://github.com/googleapis/googleapis-gen/commit/42cfcdbbab1cbe12f4e09689591f9dff069f087e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjZmNkYmJhYjFjYmUxMmY0ZTA5Njg5NTkxZjlkZmYwNjlmMDg3ZSJ9 * 🦉 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/spanner/v1/keys.proto | 4 +- protos/google/spanner/v1/mutation.proto | 54 +-- protos/google/spanner/v1/query_plan.proto | 39 +- protos/google/spanner/v1/spanner.proto | 402 ++++++++++----------- protos/google/spanner/v1/transaction.proto | 5 +- protos/protos.json | 4 +- src/v1/spanner_client.ts | 314 ++++++++-------- 7 files changed, 413 insertions(+), 409 deletions(-) diff --git a/protos/google/spanner/v1/keys.proto b/protos/google/spanner/v1/keys.proto index 9eadda470..bce2a07b0 100644 --- a/protos/google/spanner/v1/keys.proto +++ b/protos/google/spanner/v1/keys.proto @@ -152,8 +152,8 @@ message KeySet { // encoded as described [here][google.spanner.v1.TypeCode]. repeated google.protobuf.ListValue keys = 1; - // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more information about - // key range specifications. + // A list of key ranges. See [KeyRange][google.spanner.v1.KeyRange] for more + // information about key range specifications. repeated KeyRange ranges = 2; // For convenience `all` can be set to `true` to indicate that this diff --git a/protos/google/spanner/v1/mutation.proto b/protos/google/spanner/v1/mutation.proto index c8af1af8e..41f032b96 100644 --- a/protos/google/spanner/v1/mutation.proto +++ b/protos/google/spanner/v1/mutation.proto @@ -32,13 +32,16 @@ option ruby_package = "Google::Cloud::Spanner::V1"; // applied to a Cloud Spanner database by sending them in a // [Commit][google.spanner.v1.Spanner.Commit] call. message Mutation { - // Arguments to [insert][google.spanner.v1.Mutation.insert], [update][google.spanner.v1.Mutation.update], [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and + // Arguments to [insert][google.spanner.v1.Mutation.insert], + // [update][google.spanner.v1.Mutation.update], + // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], and // [replace][google.spanner.v1.Mutation.replace] operations. message Write { // Required. The table whose rows will be written. string table = 1 [(google.api.field_behavior) = REQUIRED]; - // The names of the columns in [table][google.spanner.v1.Mutation.Write.table] to be written. + // The names of the columns in + // [table][google.spanner.v1.Mutation.Write.table] to be written. // // The list of columns must contain enough columns to allow // Cloud Spanner to derive values for all primary key columns in the @@ -48,11 +51,13 @@ message Mutation { // The values to be written. `values` can contain more than one // list of values. If it does, then multiple rows are written, one // for each entry in `values`. Each list in `values` must have - // exactly as many entries as there are entries in [columns][google.spanner.v1.Mutation.Write.columns] - // above. Sending multiple lists is equivalent to sending multiple - // `Mutation`s, each containing one `values` entry and repeating - // [table][google.spanner.v1.Mutation.Write.table] and [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in each list are - // encoded as described [here][google.spanner.v1.TypeCode]. + // exactly as many entries as there are entries in + // [columns][google.spanner.v1.Mutation.Write.columns] above. Sending + // multiple lists is equivalent to sending multiple `Mutation`s, each + // containing one `values` entry and repeating + // [table][google.spanner.v1.Mutation.Write.table] and + // [columns][google.spanner.v1.Mutation.Write.columns]. Individual values in + // each list are encoded as described [here][google.spanner.v1.TypeCode]. repeated google.protobuf.ListValue values = 3; } @@ -61,12 +66,12 @@ message Mutation { // Required. The table whose rows will be deleted. string table = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The primary keys of the rows within [table][google.spanner.v1.Mutation.Delete.table] to delete. The - // primary keys must be specified in the order in which they appear in the - // `PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL - // statement used to create the table). - // Delete is idempotent. The transaction will succeed even if some or all - // rows do not exist. + // Required. The primary keys of the rows within + // [table][google.spanner.v1.Mutation.Delete.table] to delete. The primary + // keys must be specified in the order in which they appear in the `PRIMARY + // KEY()` clause of the table's equivalent DDL statement (the DDL statement + // used to create the table). Delete is idempotent. The transaction will + // succeed even if some or all rows do not exist. KeySet key_set = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -80,19 +85,22 @@ message Mutation { // already exist, the transaction fails with error `NOT_FOUND`. Write update = 2; - // Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then - // its column values are overwritten with the ones provided. Any - // column values not explicitly written are preserved. + // Like [insert][google.spanner.v1.Mutation.insert], except that if the row + // already exists, then its column values are overwritten with the ones + // provided. Any column values not explicitly written are preserved. // - // When using [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as when using [insert][google.spanner.v1.Mutation.insert], all `NOT - // NULL` columns in the table must be given a value. This holds true - // even when the row already exists and will therefore actually be updated. + // When using + // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], just as + // when using [insert][google.spanner.v1.Mutation.insert], all `NOT NULL` + // columns in the table must be given a value. This holds true even when the + // row already exists and will therefore actually be updated. Write insert_or_update = 3; - // Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is - // deleted, and the column values provided are inserted - // instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not - // explicitly written become `NULL`. + // Like [insert][google.spanner.v1.Mutation.insert], except that if the row + // already exists, it is deleted, and the column values provided are + // inserted instead. Unlike + // [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this + // means any values not explicitly written become `NULL`. // // In an interleaved table, if you create the child table with the // `ON DELETE CASCADE` annotation, then replacing a parent row diff --git a/protos/google/spanner/v1/query_plan.proto b/protos/google/spanner/v1/query_plan.proto index 104828457..cc7ff5ab6 100644 --- a/protos/google/spanner/v1/query_plan.proto +++ b/protos/google/spanner/v1/query_plan.proto @@ -26,10 +26,11 @@ option java_package = "com.google.spanner.v1"; option php_namespace = "Google\\Cloud\\Spanner\\V1"; option ruby_package = "Google::Cloud::Spanner::V1"; -// Node information for nodes appearing in a [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes]. +// Node information for nodes appearing in a +// [QueryPlan.plan_nodes][google.spanner.v1.QueryPlan.plan_nodes]. message PlanNode { - // The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between the two different kinds of - // nodes that can appear in a query plan. + // The kind of [PlanNode][google.spanner.v1.PlanNode]. Distinguishes between + // the two different kinds of nodes that can appear in a query plan. enum Kind { // Not specified. KIND_UNSPECIFIED = 0; @@ -58,14 +59,14 @@ message PlanNode { // with the output variable. string type = 2; - // Only present if the child node is [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds - // to an output variable of the parent node. The field carries the name of - // the output variable. - // For example, a `TableScan` operator that reads rows from a table will - // have child links to the `SCALAR` nodes representing the output variables - // created for each column that is read by the operator. The corresponding - // `variable` fields will be set to the variable names assigned to the - // columns. + // Only present if the child node is + // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] and corresponds to an + // output variable of the parent node. The field carries the name of the + // output variable. For example, a `TableScan` operator that reads rows from + // a table will have child links to the `SCALAR` nodes representing the + // output variables created for each column that is read by the operator. + // The corresponding `variable` fields will be set to the variable names + // assigned to the columns. string variable = 3; } @@ -83,14 +84,15 @@ message PlanNode { map subqueries = 2; } - // The `PlanNode`'s index in [node list][google.spanner.v1.QueryPlan.plan_nodes]. + // The `PlanNode`'s index in [node + // list][google.spanner.v1.QueryPlan.plan_nodes]. int32 index = 1; // Used to determine the type of node. May be needed for visualizing // different kinds of nodes differently. For example, If the node is a - // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a condensed representation - // which can be used to directly embed a description of the node in its - // parent. + // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] node, it will have a + // condensed representation which can be used to directly embed a description + // of the node in its parent. Kind kind = 2; // The display name for the node. @@ -99,7 +101,8 @@ message PlanNode { // List of child node `index`es and their relationship to this parent. repeated ChildLink child_links = 4; - // Condensed representation for [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes. + // Condensed representation for + // [SCALAR][google.spanner.v1.PlanNode.Kind.SCALAR] nodes. ShortRepresentation short_representation = 5; // Attributes relevant to the node contained in a group of key-value pairs. @@ -122,7 +125,7 @@ message PlanNode { // Contains an ordered list of nodes appearing in the query plan. message QueryPlan { // The nodes in the query plan. Plan nodes are returned in pre-order starting - // with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` corresponds to its index in - // `plan_nodes`. + // with the plan root. Each [PlanNode][google.spanner.v1.PlanNode]'s `id` + // corresponds to its index in `plan_nodes`. repeated PlanNode plan_nodes = 1; } diff --git a/protos/google/spanner/v1/spanner.proto b/protos/google/spanner/v1/spanner.proto index c8e2d080f..e4ce605ec 100644 --- a/protos/google/spanner/v1/spanner.proto +++ b/protos/google/spanner/v1/spanner.proto @@ -66,14 +66,14 @@ service Spanner { // transaction internally, and count toward the one transaction // limit. // - // Active sessions use additional server resources, so it is a good idea to + // Active sessions use additional server resources, so it's a good idea to // delete idle and unneeded sessions. - // Aside from explicit deletes, Cloud Spanner may delete sessions for which no + // Aside from explicit deletes, Cloud Spanner can delete sessions when no // operations are sent for more than an hour. If a session is deleted, // requests to it return `NOT_FOUND`. // // Idle sessions can be kept alive by sending a trivial SQL query - // periodically, e.g., `"SELECT 1"`. + // periodically, for example, `"SELECT 1"`. rpc CreateSession(CreateSessionRequest) returns (Session) { option (google.api.http) = { post: "/v1/{database=projects/*/instances/*/databases/*}/sessions" @@ -95,7 +95,7 @@ service Spanner { option (google.api.method_signature) = "database,session_count"; } - // Gets a session. Returns `NOT_FOUND` if the session does not exist. + // Gets a session. Returns `NOT_FOUND` if the session doesn't exist. // This is mainly useful for determining whether a session is still // alive. rpc GetSession(GetSessionRequest) returns (Session) { @@ -113,9 +113,9 @@ service Spanner { option (google.api.method_signature) = "database"; } - // Ends a session, releasing server resources associated with it. This will - // asynchronously trigger cancellation of any operations that are running with - // this session. + // Ends a session, releasing server resources associated with it. This + // asynchronously triggers the cancellation of any operations that are running + // with this session. rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" @@ -124,7 +124,7 @@ service Spanner { } // Executes an SQL statement, returning all results in a single reply. This - // method cannot be used to return a result set larger than 10 MiB; + // method can't be used to return a result set larger than 10 MiB; // if the query yields more data than that, the query fails with // a `FAILED_PRECONDITION` error. // @@ -136,6 +136,9 @@ service Spanner { // Larger result sets can be fetched in streaming fashion by calling // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] // instead. + // + // The query string can be SQL or [Graph Query Language + // (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). rpc ExecuteSql(ExecuteSqlRequest) returns (ResultSet) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql" @@ -148,6 +151,9 @@ service Spanner { // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], there is no limit on // the size of the returned result set. However, no individual row in the // result set can exceed 100 MiB, and no column value can exceed 10 MiB. + // + // The query string can be SQL or [Graph Query Language + // (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). rpc ExecuteStreamingSql(ExecuteSqlRequest) returns (stream PartialResultSet) { option (google.api.http) = { post: "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql" @@ -177,7 +183,7 @@ service Spanner { // Reads rows from the database using key lookups and scans, as a // simple key/value style alternative to - // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method cannot be + // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql]. This method can't be // used to return a result set larger than 10 MiB; if the read matches more // data than that, the read fails with a `FAILED_PRECONDITION` // error. @@ -227,8 +233,8 @@ service Spanner { // `Commit` might return an `ABORTED` error. This can occur at any time; // commonly, the cause is conflicts with concurrent // transactions. However, it can also happen for a variety of other - // reasons. If `Commit` returns `ABORTED`, the caller should re-attempt - // the transaction from the beginning, re-using the same session. + // reasons. If `Commit` returns `ABORTED`, the caller should retry + // the transaction from the beginning, reusing the same session. // // On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, // for example, if the client job experiences a 1+ hour networking failure. @@ -245,14 +251,14 @@ service Spanner { "session,single_use_transaction,mutations"; } - // Rolls back a transaction, releasing any locks it holds. It is a good + // Rolls back a transaction, releasing any locks it holds. It's a good // idea to call this for any transaction that includes one or more // [Read][google.spanner.v1.Spanner.Read] or // [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] requests and ultimately // decides not to commit. // // `Rollback` returns `OK` if it successfully aborts the transaction, the - // transaction was already aborted, or the transaction is not + // transaction was already aborted, or the transaction isn't // found. `Rollback` never returns `ABORTED`. rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -263,16 +269,16 @@ service Spanner { } // Creates a set of partition tokens that can be used to execute a query - // operation in parallel. Each of the returned partition tokens can be used + // operation in parallel. Each of the returned partition tokens can be used // by [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] to - // specify a subset of the query result to read. The same session and - // read-only transaction must be used by the PartitionQueryRequest used to - // create the partition tokens and the ExecuteSqlRequests that use the + // specify a subset of the query result to read. The same session and + // read-only transaction must be used by the `PartitionQueryRequest` used to + // create the partition tokens and the `ExecuteSqlRequests` that use the // partition tokens. // // Partition tokens become invalid when the session used to create them // is deleted, is idle for too long, begins a new transaction, or becomes too - // old. When any of these happen, it is not possible to resume the query, and + // old. When any of these happen, it isn't possible to resume the query, and // the whole operation must be restarted from the beginning. rpc PartitionQuery(PartitionQueryRequest) returns (PartitionResponse) { option (google.api.http) = { @@ -282,18 +288,18 @@ service Spanner { } // Creates a set of partition tokens that can be used to execute a read - // operation in parallel. Each of the returned partition tokens can be used + // operation in parallel. Each of the returned partition tokens can be used // by [StreamingRead][google.spanner.v1.Spanner.StreamingRead] to specify a - // subset of the read result to read. The same session and read-only - // transaction must be used by the PartitionReadRequest used to create the - // partition tokens and the ReadRequests that use the partition tokens. There - // are no ordering guarantees on rows returned among the returned partition - // tokens, or even within each individual StreamingRead call issued with a - // partition_token. + // subset of the read result to read. The same session and read-only + // transaction must be used by the `PartitionReadRequest` used to create the + // partition tokens and the `ReadRequests` that use the partition tokens. + // There are no ordering guarantees on rows returned among the returned + // partition tokens, or even within each individual `StreamingRead` call + // issued with a `partition_token`. // // Partition tokens become invalid when the session used to create them // is deleted, is idle for too long, begins a new transaction, or becomes too - // old. When any of these happen, it is not possible to resume the read, and + // old. When any of these happen, it isn't possible to resume the read, and // the whole operation must be restarted from the beginning. rpc PartitionRead(PartitionReadRequest) returns (PartitionResponse) { option (google.api.http) = { @@ -306,15 +312,15 @@ service Spanner { // transactions. All mutations in a group are committed atomically. However, // mutations across groups can be committed non-atomically in an unspecified // order and thus, they must be independent of each other. Partial failure is - // possible, i.e., some groups may have been committed successfully, while - // some may have failed. The results of individual batches are streamed into - // the response as the batches are applied. + // possible, that is, some groups might have been committed successfully, + // while some might have failed. The results of individual batches are + // streamed into the response as the batches are applied. // - // BatchWrite requests are not replay protected, meaning that each mutation - // group may be applied more than once. Replays of non-idempotent mutations - // may have undesirable effects. For example, replays of an insert mutation - // may produce an already exists error or if you use generated or commit - // timestamp-based keys, it may result in additional rows being added to the + // `BatchWrite` requests are not replay protected, meaning that each mutation + // group can be applied more than once. Replays of non-idempotent mutations + // can have undesirable effects. For example, replays of an insert mutation + // can produce an already exists error or if you use generated or commit + // timestamp-based keys, it can result in additional rows being added to the // mutation's table. We recommend structuring your mutation groups to be // idempotent to avoid this issue. rpc BatchWrite(BatchWriteRequest) returns (stream BatchWriteResponse) { @@ -351,13 +357,13 @@ message BatchCreateSessionsRequest { } ]; - // Parameters to be applied to each created session. + // Parameters to apply to each created session. Session session_template = 2; // Required. The number of sessions to be created in this batch call. - // The API may return fewer than the requested number of sessions. If a + // The API can return fewer than the requested number of sessions. If a // specific number of sessions are desired, the client can make additional - // calls to BatchCreateSessions (adjusting + // calls to `BatchCreateSessions` (adjusting // [session_count][google.spanner.v1.BatchCreateSessionsRequest.session_count] // as necessary). int32 session_count = 3 [(google.api.field_behavior) = REQUIRED]; @@ -375,6 +381,8 @@ message Session { option (google.api.resource) = { type: "spanner.googleapis.com/Session" pattern: "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}" + plural: "sessions" + singular: "session" }; // Output only. The name of the session. This is always system-assigned. @@ -395,7 +403,7 @@ message Session { google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The approximate timestamp when the session is last used. It is + // Output only. The approximate timestamp when the session is last used. It's // typically earlier than the actual last use time. google.protobuf.Timestamp approximate_last_use_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -403,13 +411,14 @@ message Session { // The database role which created this session. string creator_role = 5; - // Optional. If true, specifies a multiplexed session. A multiplexed session - // may be used for multiple, concurrent read-only operations but can not be - // used for read-write transactions, partitioned reads, or partitioned - // queries. Multiplexed sessions can be created via - // [CreateSession][google.spanner.v1.Spanner.CreateSession] but not via - // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions]. - // Multiplexed sessions may not be deleted nor listed. + // Optional. If `true`, specifies a multiplexed session. Use a multiplexed + // session for multiple, concurrent read-only operations. Don't use them for + // read-write transactions, partitioned reads, or partitioned queries. Use + // [`sessions.create`][google.spanner.v1.Spanner.CreateSession] to create + // multiplexed sessions. Don't use + // [BatchCreateSessions][google.spanner.v1.Spanner.BatchCreateSessions] to + // create a multiplexed session. You can't delete or list multiplexed + // sessions. bool multiplexed = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -477,22 +486,22 @@ message DeleteSessionRequest { // Common request options for various APIs. message RequestOptions { - // The relative priority for requests. Note that priority is not applicable + // The relative priority for requests. Note that priority isn't applicable // for [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction]. // - // The priority acts as a hint to the Cloud Spanner scheduler and does not + // The priority acts as a hint to the Cloud Spanner scheduler and doesn't // guarantee priority or order of execution. For example: // // * Some parts of a write operation always execute at `PRIORITY_HIGH`, - // regardless of the specified priority. This may cause you to see an + // regardless of the specified priority. This can cause you to see an // increase in high priority workload even when executing a low priority // request. This can also potentially cause a priority inversion where a - // lower priority request will be fulfilled ahead of a higher priority + // lower priority request is fulfilled ahead of a higher priority // request. // * If a transaction contains multiple operations with different priorities, - // Cloud Spanner does not guarantee to process the higher priority - // operations first. There may be other constraints to satisfy, such as - // order of operations. + // Cloud Spanner doesn't guarantee to process the higher priority + // operations first. There might be other constraints to satisfy, such as + // the order of operations. enum Priority { // `PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`. PRIORITY_UNSPECIFIED = 0; @@ -512,35 +521,35 @@ message RequestOptions { // A per-request tag which can be applied to queries or reads, used for // statistics collection. - // Both request_tag and transaction_tag can be specified for a read or query - // that belongs to a transaction. - // This field is ignored for requests where it's not applicable (e.g. - // CommitRequest). + // Both `request_tag` and `transaction_tag` can be specified for a read or + // query that belongs to a transaction. + // This field is ignored for requests where it's not applicable (for example, + // `CommitRequest`). // Legal characters for `request_tag` values are all printable characters // (ASCII 32 - 126) and the length of a request_tag is limited to 50 // characters. Values that exceed this limit are truncated. - // Any leading underscore (_) characters will be removed from the string. + // Any leading underscore (_) characters are removed from the string. string request_tag = 2; // A tag used for statistics collection about this transaction. - // Both request_tag and transaction_tag can be specified for a read or query - // that belongs to a transaction. + // Both `request_tag` and `transaction_tag` can be specified for a read or + // query that belongs to a transaction. // The value of transaction_tag should be the same for all requests belonging // to the same transaction. - // If this request doesn't belong to any transaction, transaction_tag will be + // If this request doesn't belong to any transaction, `transaction_tag` is // ignored. // Legal characters for `transaction_tag` values are all printable characters - // (ASCII 32 - 126) and the length of a transaction_tag is limited to 50 + // (ASCII 32 - 126) and the length of a `transaction_tag` is limited to 50 // characters. Values that exceed this limit are truncated. - // Any leading underscore (_) characters will be removed from the string. + // Any leading underscore (_) characters are removed from the string. string transaction_tag = 3; } -// The DirectedReadOptions can be used to indicate which replicas or regions +// The `DirectedReadOptions` can be used to indicate which replicas or regions // should be used for non-transactional reads or queries. // -// DirectedReadOptions may only be specified for a read-only transaction, -// otherwise the API will return an `INVALID_ARGUMENT` error. +// `DirectedReadOptions` can only be specified for a read-only transaction, +// otherwise the API returns an `INVALID_ARGUMENT` error. message DirectedReadOptions { // The directed read replica selector. // Callers must provide one or more of the following fields for replica @@ -553,12 +562,12 @@ message DirectedReadOptions { // Some examples of using replica_selectors are: // // * `location:us-east1` --> The "us-east1" replica(s) of any available type - // will be used to process the request. - // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in nearest - // available location will be used to process the + // is used to process the request. + // * `type:READ_ONLY` --> The "READ_ONLY" type replica(s) in the nearest + // available location are used to process the // request. // * `location:us-east1 type:READ_ONLY` --> The "READ_ONLY" type replica(s) - // in location "us-east1" will be used to process + // in location "us-east1" is used to process // the request. message ReplicaSelection { // Indicates the type of replica. @@ -573,22 +582,22 @@ message DirectedReadOptions { READ_ONLY = 2; } - // The location or region of the serving requests, e.g. "us-east1". + // The location or region of the serving requests, for example, "us-east1". string location = 1; // The type of replica. Type type = 2; } - // An IncludeReplicas contains a repeated set of ReplicaSelection which + // An `IncludeReplicas` contains a repeated set of `ReplicaSelection` which // indicates the order in which replicas should be considered. message IncludeReplicas { // The directed read replica selector. repeated ReplicaSelection replica_selections = 1; - // If true, Spanner will not route requests to a replica outside the - // include_replicas list when all of the specified replicas are unavailable - // or unhealthy. Default value is `false`. + // If `true`, Spanner doesn't route requests to a replica outside the + // <`include_replicas` list when all of the specified replicas are + // unavailable or unhealthy. Default value is `false`. bool auto_failover_disabled = 2; } @@ -599,18 +608,18 @@ message DirectedReadOptions { repeated ReplicaSelection replica_selections = 1; } - // Required. At most one of either include_replicas or exclude_replicas + // Required. At most one of either `include_replicas` or `exclude_replicas` // should be present in the message. oneof replicas { - // Include_replicas indicates the order of replicas (as they appear in - // this list) to process the request. If auto_failover_disabled is set to - // true and all replicas are exhausted without finding a healthy replica, - // Spanner will wait for a replica in the list to become available, requests - // may fail due to `DEADLINE_EXCEEDED` errors. + // `Include_replicas` indicates the order of replicas (as they appear in + // this list) to process the request. If `auto_failover_disabled` is set to + // `true` and all replicas are exhausted without finding a healthy replica, + // Spanner waits for a replica in the list to become available, requests + // might fail due to `DEADLINE_EXCEEDED` errors. IncludeReplicas include_replicas = 1; - // Exclude_replicas indicates that specified replicas should be excluded - // from serving requests. Spanner will not route requests to the replicas + // `Exclude_replicas` indicates that specified replicas should be excluded + // from serving requests. Spanner doesn't route requests to the replicas // in this list. ExcludeReplicas exclude_replicas = 2; } @@ -630,7 +639,7 @@ message ExecuteSqlRequest { // This mode returns the query plan, overall execution statistics, // operator level execution statistics along with the results. This has a - // performance overhead compared to the other modes. It is not recommended + // performance overhead compared to the other modes. It isn't recommended // to use this mode for production traffic. PROFILE = 2; @@ -657,7 +666,7 @@ message ExecuteSqlRequest { // overrides the default optimizer version for query execution. // // The list of supported optimizer versions can be queried from - // SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. + // `SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS`. // // Executing a SQL statement with an invalid optimizer version fails with // an `INVALID_ARGUMENT` error. @@ -677,13 +686,13 @@ message ExecuteSqlRequest { // Specifying `latest` as a value instructs Cloud Spanner to use the latest // generated statistics package. If not specified, Cloud Spanner uses // the statistics package set at the database level options, or the latest - // package if the database option is not set. + // package if the database option isn't set. // // The statistics package requested by the query has to be exempt from // garbage collection. This can be achieved with the following DDL // statement: // - // ``` + // ```sql // ALTER STATISTICS SET OPTIONS (allow_gc=false) // ``` // @@ -708,7 +717,7 @@ message ExecuteSqlRequest { // transaction with strong concurrency. // // Standard DML statements require a read-write transaction. To protect - // against replays, single-use transactions are not supported. The caller + // against replays, single-use transactions are not supported. The caller // must either supply an existing transaction ID or begin a new transaction. // // Partitioned DML requires an existing Partitioned DML transaction ID. @@ -724,20 +733,20 @@ message ExecuteSqlRequest { // to the naming requirements of identifiers as specified at // https://cloud.google.com/spanner/docs/lexical#identifiers. // - // Parameters can appear anywhere that a literal value is expected. The same + // Parameters can appear anywhere that a literal value is expected. The same // parameter name can be used more than once, for example: // // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // It is an error to execute a SQL statement with unbound parameters. + // It's an error to execute a SQL statement with unbound parameters. google.protobuf.Struct params = 4; - // It is not always possible for Cloud Spanner to infer the right SQL type - // from a JSON value. For example, values of type `BYTES` and values + // It isn't always possible for Cloud Spanner to infer the right SQL type + // from a JSON value. For example, values of type `BYTES` and values // of type `STRING` both appear in // [params][google.spanner.v1.ExecuteSqlRequest.params] as JSON strings. // - // In these cases, `param_types` can be used to specify the exact + // In these cases, you can use `param_types` to specify the exact // SQL type for some or all of the SQL statement parameters. See the // definition of [Type][google.spanner.v1.Type] for more information // about SQL types. @@ -759,20 +768,20 @@ message ExecuteSqlRequest { // [QueryMode.NORMAL][google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL]. QueryMode query_mode = 7; - // If present, results will be restricted to the specified partition - // previously created using PartitionQuery(). There must be an exact + // If present, results are restricted to the specified partition + // previously created using `PartitionQuery`. There must be an exact // match for the values of fields common to this message and the - // PartitionQueryRequest message used to create this partition_token. + // `PartitionQueryRequest` message used to create this `partition_token`. bytes partition_token = 8; // A per-transaction sequence number used to identify this request. This field // makes each request idempotent such that if the request is received multiple - // times, at most one will succeed. + // times, at most one succeeds. // // The sequence number must be monotonically increasing within the // transaction. If a request arrives for the first time with an out-of-order - // sequence number, the transaction may be aborted. Replays of previously - // handled requests will yield the same response as the first execution. + // sequence number, the transaction can be aborted. Replays of previously + // handled requests yield the same response as the first execution. // // Required for DML statements. Ignored for queries. int64 seqno = 9; @@ -789,19 +798,19 @@ message ExecuteSqlRequest { // If this is for a partitioned query and this field is set to `true`, the // request is executed with Spanner Data Boost independent compute resources. // - // If the field is set to `true` but the request does not set + // If the field is set to `true` but the request doesn't set // `partition_token`, the API returns an `INVALID_ARGUMENT` error. bool data_boost_enabled = 16; - // Optional. If set to true, this statement marks the end of the transaction. - // The transaction should be committed or aborted after this statement - // executes, and attempts to execute any other requests against this - // transaction (including reads and queries) will be rejected. + // Optional. If set to `true`, this statement marks the end of the + // transaction. After this statement executes, you must commit or abort the + // transaction. Attempts to execute any other requests against this + // transaction (including reads and queries) are rejected. // - // For DML statements, setting this option may cause some error reporting to - // be deferred until commit time (e.g. validation of unique constraints). - // Given this, successful execution of a DML statement should not be assumed - // until a subsequent Commit call completes successfully. + // For DML statements, setting this option might cause some error reporting to + // be deferred until commit time (for example, validation of unique + // constraints). Given this, successful execution of a DML statement shouldn't + // be assumed until a subsequent `Commit` call completes successfully. bool last_statement = 17 [(google.api.field_behavior) = OPTIONAL]; } @@ -818,16 +827,16 @@ message ExecuteBatchDmlRequest { // parameter name (for example, `@firstName`). Parameter names can contain // letters, numbers, and underscores. // - // Parameters can appear anywhere that a literal value is expected. The + // Parameters can appear anywhere that a literal value is expected. The // same parameter name can be used more than once, for example: // // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // It is an error to execute a SQL statement with unbound parameters. + // It's an error to execute a SQL statement with unbound parameters. google.protobuf.Struct params = 2; - // It is not always possible for Cloud Spanner to infer the right SQL type - // from a JSON value. For example, values of type `BYTES` and values + // It isn't always possible for Cloud Spanner to infer the right SQL type + // from a JSON value. For example, values of type `BYTES` and values // of type `STRING` both appear in // [params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as // JSON strings. @@ -862,26 +871,26 @@ message ExecuteBatchDmlRequest { // Required. A per-transaction sequence number used to identify this request. // This field makes each request idempotent such that if the request is - // received multiple times, at most one will succeed. + // received multiple times, at most one succeeds. // // The sequence number must be monotonically increasing within the // transaction. If a request arrives for the first time with an out-of-order - // sequence number, the transaction may be aborted. Replays of previously - // handled requests will yield the same response as the first execution. + // sequence number, the transaction might be aborted. Replays of previously + // handled requests yield the same response as the first execution. int64 seqno = 4 [(google.api.field_behavior) = REQUIRED]; // Common options for this request. RequestOptions request_options = 5; - // Optional. If set to true, this request marks the end of the transaction. - // The transaction should be committed or aborted after these statements - // execute, and attempts to execute any other requests against this - // transaction (including reads and queries) will be rejected. + // Optional. If set to `true`, this request marks the end of the transaction. + // After these statements execute, you must commit or abort the transaction. + // Attempts to execute any other requests against this transaction + // (including reads and queries) are rejected. // - // Setting this option may cause some error reporting to be deferred until - // commit time (e.g. validation of unique constraints). Given this, successful - // execution of statements should not be assumed until a subsequent Commit - // call completes successfully. + // Setting this option might cause some error reporting to be deferred until + // commit time (for example, validation of unique constraints). Given this, + // successful execution of statements shouldn't be assumed until a subsequent + // `Commit` call completes successfully. bool last_statements = 6 [(google.api.field_behavior) = OPTIONAL]; } @@ -932,36 +941,32 @@ message ExecuteBatchDmlResponse { // Otherwise, the error status of the first failed statement. google.rpc.Status status = 2; - // Optional. A precommit token will be included if the read-write transaction - // is on a multiplexed session. - // The precommit token with the highest sequence number from this transaction - // attempt should be passed to the + // Optional. A precommit token is included if the read-write transaction + // is on a multiplexed session. Pass the precommit token with the highest + // sequence number from this transaction attempt should be passed to the // [Commit][google.spanner.v1.Spanner.Commit] request for this transaction. - // This feature is not yet supported and will result in an UNIMPLEMENTED - // error. MultiplexedSessionPrecommitToken precommit_token = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Options for a PartitionQueryRequest and -// PartitionReadRequest. +// Options for a `PartitionQueryRequest` and `PartitionReadRequest`. message PartitionOptions { - // **Note:** This hint is currently ignored by PartitionQuery and - // PartitionRead requests. + // **Note:** This hint is currently ignored by `PartitionQuery` and + // `PartitionRead` requests. // - // The desired data size for each partition generated. The default for this - // option is currently 1 GiB. This is only a hint. The actual size of each - // partition may be smaller or larger than this size request. + // The desired data size for each partition generated. The default for this + // option is currently 1 GiB. This is only a hint. The actual size of each + // partition can be smaller or larger than this size request. int64 partition_size_bytes = 1; - // **Note:** This hint is currently ignored by PartitionQuery and - // PartitionRead requests. + // **Note:** This hint is currently ignored by `PartitionQuery` and + // `PartitionRead` requests. // - // The desired maximum number of partitions to return. For example, this may - // be set to the number of workers available. The default for this option - // is currently 10,000. The maximum value is currently 200,000. This is only - // a hint. The actual number of partitions returned may be smaller or larger - // than this maximum count request. + // The desired maximum number of partitions to return. For example, this + // might be set to the number of workers available. The default for this + // option is currently 10,000. The maximum value is currently 200,000. This + // is only a hint. The actual number of partitions returned can be smaller or + // larger than this maximum count request. int64 max_partitions = 2; } @@ -973,22 +978,23 @@ message PartitionQueryRequest { (google.api.resource_reference) = { type: "spanner.googleapis.com/Session" } ]; - // Read only snapshot transactions are supported, read/write and single use - // transactions are not. + // Read-only snapshot transactions are supported, read and write and + // single-use transactions are not. TransactionSelector transaction = 2; - // Required. The query request to generate partitions for. The request will - // fail if the query is not root partitionable. For a query to be root + // Required. The query request to generate partitions for. The request fails + // if the query isn't root partitionable. For a query to be root // partitionable, it needs to satisfy a few conditions. For example, if the // query execution plan contains a distributed union operator, then it must be // the first operator in the plan. For more information about other // conditions, see [Read data in // parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). // - // The query request must not contain DML commands, such as INSERT, UPDATE, or - // DELETE. Use - // [ExecuteStreamingSql][google.spanner.v1.Spanner.ExecuteStreamingSql] with a - // PartitionedDml transaction for large, partition-friendly DML operations. + // The query request must not contain DML commands, such as `INSERT`, + // `UPDATE`, or `DELETE`. Use + // [`ExecuteStreamingSql`][google.spanner.v1.Spanner.ExecuteStreamingSql] with + // a `PartitionedDml` transaction for large, partition-friendly DML + // operations. string sql = 3 [(google.api.field_behavior) = REQUIRED]; // Parameter names and values that bind to placeholders in the SQL string. @@ -997,16 +1003,16 @@ message PartitionQueryRequest { // parameter name (for example, `@firstName`). Parameter names can contain // letters, numbers, and underscores. // - // Parameters can appear anywhere that a literal value is expected. The same + // Parameters can appear anywhere that a literal value is expected. The same // parameter name can be used more than once, for example: // // `"WHERE id > @msg_id AND id < @msg_id + 100"` // - // It is an error to execute a SQL statement with unbound parameters. + // It's an error to execute a SQL statement with unbound parameters. google.protobuf.Struct params = 4; - // It is not always possible for Cloud Spanner to infer the right SQL type - // from a JSON value. For example, values of type `BYTES` and values + // It isn't always possible for Cloud Spanner to infer the right SQL type + // from a JSON value. For example, values of type `BYTES` and values // of type `STRING` both appear in // [params][google.spanner.v1.PartitionQueryRequest.params] as JSON strings. // @@ -1055,7 +1061,7 @@ message PartitionReadRequest { // [key_set][google.spanner.v1.PartitionReadRequest.key_set] instead names // index keys in [index][google.spanner.v1.PartitionReadRequest.index]. // - // It is not an error for the `key_set` to name rows that do not + // It isn't an error for the `key_set` to name rows that don't // exist in the database. Read yields nothing for nonexistent rows. KeySet key_set = 6 [(google.api.field_behavior) = REQUIRED]; @@ -1066,9 +1072,9 @@ message PartitionReadRequest { // Information returned for each partition returned in a // PartitionResponse. message Partition { - // This token can be passed to Read, StreamingRead, ExecuteSql, or - // ExecuteStreamingSql requests to restrict the results to those identified by - // this partition token. + // This token can be passed to `Read`, `StreamingRead`, `ExecuteSql`, or + // `ExecuteStreamingSql` requests to restrict the results to those identified + // by this partition token. bytes partition_token = 1; } @@ -1089,13 +1095,13 @@ message ReadRequest { enum OrderBy { // Default value. // - // ORDER_BY_UNSPECIFIED is equivalent to ORDER_BY_PRIMARY_KEY. + // `ORDER_BY_UNSPECIFIED` is equivalent to `ORDER_BY_PRIMARY_KEY`. ORDER_BY_UNSPECIFIED = 0; // Read rows are returned in primary key order. // // In the event that this option is used in conjunction with the - // `partition_token` field, the API will return an `INVALID_ARGUMENT` error. + // `partition_token` field, the API returns an `INVALID_ARGUMENT` error. ORDER_BY_PRIMARY_KEY = 1; // Read rows are returned in any order. @@ -1106,7 +1112,7 @@ message ReadRequest { enum LockHint { // Default value. // - // LOCK_HINT_UNSPECIFIED is equivalent to LOCK_HINT_SHARED. + // `LOCK_HINT_UNSPECIFIED` is equivalent to `LOCK_HINT_SHARED`. LOCK_HINT_UNSPECIFIED = 0; // Acquire shared locks. @@ -1137,8 +1143,8 @@ message ReadRequest { // serialized. Each transaction waits its turn to acquire the lock and // avoids getting into deadlock situations. // - // Because the exclusive lock hint is just a hint, it should not be - // considered equivalent to a mutex. In other words, you should not use + // Because the exclusive lock hint is just a hint, it shouldn't be + // considered equivalent to a mutex. In other words, you shouldn't use // Spanner exclusive locks as a mutual exclusion mechanism for the execution // of code outside of Spanner. // @@ -1185,16 +1191,16 @@ message ReadRequest { // If the [partition_token][google.spanner.v1.ReadRequest.partition_token] // field is empty, rows are yielded in table primary key order (if // [index][google.spanner.v1.ReadRequest.index] is empty) or index key order - // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the - // [partition_token][google.spanner.v1.ReadRequest.partition_token] field is - // not empty, rows will be yielded in an unspecified order. + // (if [index][google.spanner.v1.ReadRequest.index] is non-empty). If the + // [partition_token][google.spanner.v1.ReadRequest.partition_token] field + // isn't empty, rows are yielded in an unspecified order. // - // It is not an error for the `key_set` to name rows that do not + // It isn't an error for the `key_set` to name rows that don't // exist in the database. Read yields nothing for nonexistent rows. KeySet key_set = 6 [(google.api.field_behavior) = REQUIRED]; // If greater than zero, only the first `limit` rows are yielded. If `limit` - // is zero, the default is no limit. A limit cannot be specified if + // is zero, the default is no limit. A limit can't be specified if // `partition_token` is set. int64 limit = 8; @@ -1206,8 +1212,8 @@ message ReadRequest { // that yielded this token. bytes resume_token = 9; - // If present, results will be restricted to the specified partition - // previously created using PartitionRead(). There must be an exact + // If present, results are restricted to the specified partition + // previously created using `PartitionRead`. There must be an exact // match for the values of fields common to this message and the // PartitionReadRequest message used to create this partition_token. bytes partition_token = 10; @@ -1221,17 +1227,18 @@ message ReadRequest { // If this is for a partitioned read and this field is set to `true`, the // request is executed with Spanner Data Boost independent compute resources. // - // If the field is set to `true` but the request does not set + // If the field is set to `true` but the request doesn't set // `partition_token`, the API returns an `INVALID_ARGUMENT` error. bool data_boost_enabled = 15; // Optional. Order for the returned rows. // - // By default, Spanner will return result rows in primary key order except for - // PartitionRead requests. For applications that do not require rows to be + // By default, Spanner returns result rows in primary key order except for + // PartitionRead requests. For applications that don't require rows to be // returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting // `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, - // resulting in lower latencies in certain cases (e.g. bulk point lookups). + // resulting in lower latencies in certain cases (for example, bulk point + // lookups). OrderBy order_by = 16 [(google.api.field_behavior) = OPTIONAL]; // Optional. Lock Hint for the request, it can only be used with read-write @@ -1253,17 +1260,15 @@ message BeginTransactionRequest { // Common options for this request. // Priority is ignored for this request. Setting the priority in this - // request_options struct will not do anything. To set the priority for a + // `request_options` struct doesn't do anything. To set the priority for a // transaction, set it on the reads and writes that are part of this // transaction instead. RequestOptions request_options = 3; // Optional. Required for read-write transactions on a multiplexed session - // that commit mutations but do not perform any reads or queries. Clients - // should randomly select one of the mutations from the mutation set and send - // it as a part of this request. - // This feature is not yet supported and will result in an UNIMPLEMENTED - // error. + // that commit mutations but don't perform any reads or queries. You must + // randomly select one of the mutations from the mutation set and send it as a + // part of this request. Mutation mutation_key = 4 [(google.api.field_behavior) = OPTIONAL]; } @@ -1285,7 +1290,7 @@ message CommitRequest { // temporary transaction is non-idempotent. That is, if the // `CommitRequest` is sent to Cloud Spanner more than once (for // instance, due to retries in the application, or in the - // transport library), it is possible that the mutations are + // transport library), it's possible that the mutations are // executed more than once. If this is undesirable, use // [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and // [Commit][google.spanner.v1.Spanner.Commit] instead. @@ -1297,16 +1302,16 @@ message CommitRequest { // this list. repeated Mutation mutations = 4; - // If `true`, then statistics related to the transaction will be included in + // If `true`, then statistics related to the transaction is included in // the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. // Default value is `false`. bool return_commit_stats = 5; - // Optional. The amount of latency this request is willing to incur in order - // to improve throughput. If this field is not set, Spanner assumes requests - // are relatively latency sensitive and automatically determines an - // appropriate delay time. You can specify a batching delay value between 0 - // and 500 ms. + // Optional. The amount of latency this request is configured to incur in + // order to improve throughput. If this field isn't set, Spanner assumes + // requests are relatively latency sensitive and automatically determines an + // appropriate delay time. You can specify a commit delay value between 0 and + // 500 ms. google.protobuf.Duration max_commit_delay = 8 [(google.api.field_behavior) = OPTIONAL]; @@ -1314,11 +1319,9 @@ message CommitRequest { RequestOptions request_options = 6; // Optional. If the read-write transaction was executed on a multiplexed - // session, the precommit token with the highest sequence number received in - // this transaction attempt, should be included here. Failing to do so will - // result in a FailedPrecondition error. - // This feature is not yet supported and will result in an UNIMPLEMENTED - // error. + // session, then you must include the precommit token with the highest + // sequence number received in this transaction attempt. Failing to do so + // results in a `FailedPrecondition` error. MultiplexedSessionPrecommitToken precommit_token = 9 [(google.api.field_behavior) = OPTIONAL]; } @@ -1358,18 +1361,9 @@ message BatchWriteRequest { repeated MutationGroup mutation_groups = 4 [(google.api.field_behavior) = REQUIRED]; - // Optional. When `exclude_txn_from_change_streams` is set to `true`: - // * Mutations from all transactions in this batch write operation will not - // be recorded in change streams with DDL option `allow_txn_exclusion=true` - // that are tracking columns modified by these transactions. - // * Mutations from all transactions in this batch write operation will be - // recorded in change streams with DDL option `allow_txn_exclusion=false or - // not set` that are tracking columns modified by these transactions. - // - // When `exclude_txn_from_change_streams` is set to `false` or not set, - // mutations from all transactions in this batch write operation will be - // recorded in all change streams that are tracking columns modified by these - // transactions. + // Optional. If you don't set the `exclude_txn_from_change_streams` option or + // if it's set to `false`, then any change streams monitoring columns modified + // by transactions will capture the updates made within that transaction. bool exclude_txn_from_change_streams = 5 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/protos/google/spanner/v1/transaction.proto b/protos/google/spanner/v1/transaction.proto index 81e7649f4..d3ad6e869 100644 --- a/protos/google/spanner/v1/transaction.proto +++ b/protos/google/spanner/v1/transaction.proto @@ -166,8 +166,9 @@ message TransactionOptions { // actually occurred in parallel. Spanner assigns commit timestamps that // reflect the order of committed transactions to implement this property. // Spanner offers a stronger guarantee than serializability called external - // consistency. For further details, please refer to - // https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability. + // consistency. For more information, see + // [TrueTime and external + // consistency](https://cloud.google.com/spanner/docs/true-time-external-consistency#serializability). SERIALIZABLE = 1; // All reads performed during the transaction observe a consistent snapshot diff --git a/protos/protos.json b/protos/protos.json index 1b54c45df..b8f0209db 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -8263,7 +8263,9 @@ "Session": { "options": { "(google.api.resource).type": "spanner.googleapis.com/Session", - "(google.api.resource).pattern": "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}" + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}", + "(google.api.resource).plural": "sessions", + "(google.api.resource).singular": "session" }, "fields": { "name": { diff --git a/src/v1/spanner_client.ts b/src/v1/spanner_client.ts index 71a41a11e..ae3fd9768 100644 --- a/src/v1/spanner_client.ts +++ b/src/v1/spanner_client.ts @@ -454,14 +454,14 @@ export class SpannerClient { * transaction internally, and count toward the one transaction * limit. * - * Active sessions use additional server resources, so it is a good idea to + * Active sessions use additional server resources, so it's a good idea to * delete idle and unneeded sessions. - * Aside from explicit deletes, Cloud Spanner may delete sessions for which no + * Aside from explicit deletes, Cloud Spanner can delete sessions when no * operations are sent for more than an hour. If a session is deleted, * requests to it return `NOT_FOUND`. * * Idle sessions can be kept alive by sending a trivial SQL query - * periodically, e.g., `"SELECT 1"`. + * periodically, for example, `"SELECT 1"`. * * @param {Object} request * The request object that will be sent. @@ -595,12 +595,12 @@ export class SpannerClient { * @param {string} request.database * Required. The database in which the new sessions are created. * @param {google.spanner.v1.Session} request.sessionTemplate - * Parameters to be applied to each created session. + * Parameters to apply to each created session. * @param {number} request.sessionCount * Required. The number of sessions to be created in this batch call. - * The API may return fewer than the requested number of sessions. If a + * The API can return fewer than the requested number of sessions. If a * specific number of sessions are desired, the client can make additional - * calls to BatchCreateSessions (adjusting + * calls to `BatchCreateSessions` (adjusting * {@link protos.google.spanner.v1.BatchCreateSessionsRequest.session_count|session_count} * as necessary). * @param {object} [options] @@ -723,7 +723,7 @@ export class SpannerClient { }); } /** - * Gets a session. Returns `NOT_FOUND` if the session does not exist. + * Gets a session. Returns `NOT_FOUND` if the session doesn't exist. * This is mainly useful for determining whether a session is still * alive. * @@ -847,9 +847,9 @@ export class SpannerClient { }); } /** - * Ends a session, releasing server resources associated with it. This will - * asynchronously trigger cancellation of any operations that are running with - * this session. + * Ends a session, releasing server resources associated with it. This + * asynchronously triggers the cancellation of any operations that are running + * with this session. * * @param {Object} request * The request object that will be sent. @@ -972,7 +972,7 @@ export class SpannerClient { } /** * Executes an SQL statement, returning all results in a single reply. This - * method cannot be used to return a result set larger than 10 MiB; + * method can't be used to return a result set larger than 10 MiB; * if the query yields more data than that, the query fails with * a `FAILED_PRECONDITION` error. * @@ -985,6 +985,9 @@ export class SpannerClient { * {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql} * instead. * + * The query string can be SQL or [Graph Query Language + * (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). + * * @param {Object} request * The request object that will be sent. * @param {string} request.session @@ -996,7 +999,7 @@ export class SpannerClient { * transaction with strong concurrency. * * Standard DML statements require a read-write transaction. To protect - * against replays, single-use transactions are not supported. The caller + * against replays, single-use transactions are not supported. The caller * must either supply an existing transaction ID or begin a new transaction. * * Partitioned DML requires an existing Partitioned DML transaction ID. @@ -1010,19 +1013,19 @@ export class SpannerClient { * to the naming requirements of identifiers as specified at * https://cloud.google.com/spanner/docs/lexical#identifiers. * - * Parameters can appear anywhere that a literal value is expected. The same + * Parameters can appear anywhere that a literal value is expected. The same * parameter name can be used more than once, for example: * * `"WHERE id > @msg_id AND id < @msg_id + 100"` * - * It is an error to execute a SQL statement with unbound parameters. + * It's an error to execute a SQL statement with unbound parameters. * @param {number[]} request.paramTypes - * It is not always possible for Cloud Spanner to infer the right SQL type - * from a JSON value. For example, values of type `BYTES` and values + * It isn't always possible for Cloud Spanner to infer the right SQL type + * from a JSON value. For example, values of type `BYTES` and values * of type `STRING` both appear in * {@link protos.google.spanner.v1.ExecuteSqlRequest.params|params} as JSON strings. * - * In these cases, `param_types` can be used to specify the exact + * In these cases, you can use `param_types` to specify the exact * SQL type for some or all of the SQL statement parameters. See the * definition of {@link protos.google.spanner.v1.Type|Type} for more information * about SQL types. @@ -1041,19 +1044,19 @@ export class SpannerClient { * be set to * {@link protos.google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL|QueryMode.NORMAL}. * @param {Buffer} request.partitionToken - * If present, results will be restricted to the specified partition - * previously created using PartitionQuery(). There must be an exact + * If present, results are restricted to the specified partition + * previously created using `PartitionQuery`. There must be an exact * match for the values of fields common to this message and the - * PartitionQueryRequest message used to create this partition_token. + * `PartitionQueryRequest` message used to create this `partition_token`. * @param {number} request.seqno * A per-transaction sequence number used to identify this request. This field * makes each request idempotent such that if the request is received multiple - * times, at most one will succeed. + * times, at most one succeeds. * * The sequence number must be monotonically increasing within the * transaction. If a request arrives for the first time with an out-of-order - * sequence number, the transaction may be aborted. Replays of previously - * handled requests will yield the same response as the first execution. + * sequence number, the transaction can be aborted. Replays of previously + * handled requests yield the same response as the first execution. * * Required for DML statements. Ignored for queries. * @param {google.spanner.v1.ExecuteSqlRequest.QueryOptions} request.queryOptions @@ -1066,18 +1069,18 @@ export class SpannerClient { * If this is for a partitioned query and this field is set to `true`, the * request is executed with Spanner Data Boost independent compute resources. * - * If the field is set to `true` but the request does not set + * If the field is set to `true` but the request doesn't set * `partition_token`, the API returns an `INVALID_ARGUMENT` error. * @param {boolean} [request.lastStatement] - * Optional. If set to true, this statement marks the end of the transaction. - * The transaction should be committed or aborted after this statement - * executes, and attempts to execute any other requests against this - * transaction (including reads and queries) will be rejected. - * - * For DML statements, setting this option may cause some error reporting to - * be deferred until commit time (e.g. validation of unique constraints). - * Given this, successful execution of a DML statement should not be assumed - * until a subsequent Commit call completes successfully. + * Optional. If set to `true`, this statement marks the end of the + * transaction. After this statement executes, you must commit or abort the + * transaction. Attempts to execute any other requests against this + * transaction (including reads and queries) are rejected. + * + * For DML statements, setting this option might cause some error reporting to + * be deferred until commit time (for example, validation of unique + * constraints). Given this, successful execution of a DML statement shouldn't + * be assumed until a subsequent `Commit` call completes successfully. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1227,24 +1230,24 @@ export class SpannerClient { * @param {number} request.seqno * Required. A per-transaction sequence number used to identify this request. * This field makes each request idempotent such that if the request is - * received multiple times, at most one will succeed. + * received multiple times, at most one succeeds. * * The sequence number must be monotonically increasing within the * transaction. If a request arrives for the first time with an out-of-order - * sequence number, the transaction may be aborted. Replays of previously - * handled requests will yield the same response as the first execution. + * sequence number, the transaction might be aborted. Replays of previously + * handled requests yield the same response as the first execution. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. * @param {boolean} [request.lastStatements] - * Optional. If set to true, this request marks the end of the transaction. - * The transaction should be committed or aborted after these statements - * execute, and attempts to execute any other requests against this - * transaction (including reads and queries) will be rejected. - * - * Setting this option may cause some error reporting to be deferred until - * commit time (e.g. validation of unique constraints). Given this, successful - * execution of statements should not be assumed until a subsequent Commit - * call completes successfully. + * Optional. If set to `true`, this request marks the end of the transaction. + * After these statements execute, you must commit or abort the transaction. + * Attempts to execute any other requests against this transaction + * (including reads and queries) are rejected. + * + * Setting this option might cause some error reporting to be deferred until + * commit time (for example, validation of unique constraints). Given this, + * successful execution of statements shouldn't be assumed until a subsequent + * `Commit` call completes successfully. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1363,7 +1366,7 @@ export class SpannerClient { /** * Reads rows from the database using key lookups and scans, as a * simple key/value style alternative to - * {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}. This method cannot be + * {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql}. This method can't be * used to return a result set larger than 10 MiB; if the read matches more * data than that, the read fails with a `FAILED_PRECONDITION` * error. @@ -1406,15 +1409,15 @@ export class SpannerClient { * If the {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} * field is empty, rows are yielded in table primary key order (if * {@link protos.google.spanner.v1.ReadRequest.index|index} is empty) or index key order - * (if {@link protos.google.spanner.v1.ReadRequest.index|index} is non-empty). If the - * {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} field is - * not empty, rows will be yielded in an unspecified order. + * (if {@link protos.google.spanner.v1.ReadRequest.index|index} is non-empty). If the + * {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} field + * isn't empty, rows are yielded in an unspecified order. * - * It is not an error for the `key_set` to name rows that do not + * It isn't an error for the `key_set` to name rows that don't * exist in the database. Read yields nothing for nonexistent rows. * @param {number} request.limit * If greater than zero, only the first `limit` rows are yielded. If `limit` - * is zero, the default is no limit. A limit cannot be specified if + * is zero, the default is no limit. A limit can't be specified if * `partition_token` is set. * @param {Buffer} request.resumeToken * If this request is resuming a previously interrupted read, @@ -1424,8 +1427,8 @@ export class SpannerClient { * left off. The rest of the request parameters must exactly match the request * that yielded this token. * @param {Buffer} request.partitionToken - * If present, results will be restricted to the specified partition - * previously created using PartitionRead(). There must be an exact + * If present, results are restricted to the specified partition + * previously created using `PartitionRead`. There must be an exact * match for the values of fields common to this message and the * PartitionReadRequest message used to create this partition_token. * @param {google.spanner.v1.RequestOptions} request.requestOptions @@ -1436,16 +1439,17 @@ export class SpannerClient { * If this is for a partitioned read and this field is set to `true`, the * request is executed with Spanner Data Boost independent compute resources. * - * If the field is set to `true` but the request does not set + * If the field is set to `true` but the request doesn't set * `partition_token`, the API returns an `INVALID_ARGUMENT` error. * @param {google.spanner.v1.ReadRequest.OrderBy} [request.orderBy] * Optional. Order for the returned rows. * - * By default, Spanner will return result rows in primary key order except for - * PartitionRead requests. For applications that do not require rows to be + * By default, Spanner returns result rows in primary key order except for + * PartitionRead requests. For applications that don't require rows to be * returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting * `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, - * resulting in lower latencies in certain cases (e.g. bulk point lookups). + * resulting in lower latencies in certain cases (for example, bulk point + * lookups). * @param {google.spanner.v1.ReadRequest.LockHint} [request.lockHint] * Optional. Lock Hint for the request, it can only be used with read-write * transactions. @@ -1580,16 +1584,14 @@ export class SpannerClient { * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. * Priority is ignored for this request. Setting the priority in this - * request_options struct will not do anything. To set the priority for a + * `request_options` struct doesn't do anything. To set the priority for a * transaction, set it on the reads and writes that are part of this * transaction instead. * @param {google.spanner.v1.Mutation} [request.mutationKey] * Optional. Required for read-write transactions on a multiplexed session - * that commit mutations but do not perform any reads or queries. Clients - * should randomly select one of the mutations from the mutation set and send - * it as a part of this request. - * This feature is not yet supported and will result in an UNIMPLEMENTED - * error. + * that commit mutations but don't perform any reads or queries. You must + * randomly select one of the mutations from the mutation set and send it as a + * part of this request. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1712,8 +1714,8 @@ export class SpannerClient { * `Commit` might return an `ABORTED` error. This can occur at any time; * commonly, the cause is conflicts with concurrent * transactions. However, it can also happen for a variety of other - * reasons. If `Commit` returns `ABORTED`, the caller should re-attempt - * the transaction from the beginning, re-using the same session. + * reasons. If `Commit` returns `ABORTED`, the caller should retry + * the transaction from the beginning, reusing the same session. * * On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, * for example, if the client job experiences a 1+ hour networking failure. @@ -1733,7 +1735,7 @@ export class SpannerClient { * temporary transaction is non-idempotent. That is, if the * `CommitRequest` is sent to Cloud Spanner more than once (for * instance, due to retries in the application, or in the - * transport library), it is possible that the mutations are + * transport library), it's possible that the mutations are * executed more than once. If this is undesirable, use * {@link protos.google.spanner.v1.Spanner.BeginTransaction|BeginTransaction} and * {@link protos.google.spanner.v1.Spanner.Commit|Commit} instead. @@ -1742,24 +1744,22 @@ export class SpannerClient { * mutations are applied atomically, in the order they appear in * this list. * @param {boolean} request.returnCommitStats - * If `true`, then statistics related to the transaction will be included in + * If `true`, then statistics related to the transaction is included in * the {@link protos.google.spanner.v1.CommitResponse.commit_stats|CommitResponse}. * Default value is `false`. * @param {google.protobuf.Duration} [request.maxCommitDelay] - * Optional. The amount of latency this request is willing to incur in order - * to improve throughput. If this field is not set, Spanner assumes requests - * are relatively latency sensitive and automatically determines an - * appropriate delay time. You can specify a batching delay value between 0 - * and 500 ms. + * Optional. The amount of latency this request is configured to incur in + * order to improve throughput. If this field isn't set, Spanner assumes + * requests are relatively latency sensitive and automatically determines an + * appropriate delay time. You can specify a commit delay value between 0 and + * 500 ms. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. * @param {google.spanner.v1.MultiplexedSessionPrecommitToken} [request.precommitToken] * Optional. If the read-write transaction was executed on a multiplexed - * session, the precommit token with the highest sequence number received in - * this transaction attempt, should be included here. Failing to do so will - * result in a FailedPrecondition error. - * This feature is not yet supported and will result in an UNIMPLEMENTED - * error. + * session, then you must include the precommit token with the highest + * sequence number received in this transaction attempt. Failing to do so + * results in a `FailedPrecondition` error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1876,14 +1876,14 @@ export class SpannerClient { }); } /** - * Rolls back a transaction, releasing any locks it holds. It is a good + * Rolls back a transaction, releasing any locks it holds. It's a good * idea to call this for any transaction that includes one or more * {@link protos.google.spanner.v1.Spanner.Read|Read} or * {@link protos.google.spanner.v1.Spanner.ExecuteSql|ExecuteSql} requests and ultimately * decides not to commit. * * `Rollback` returns `OK` if it successfully aborts the transaction, the - * transaction was already aborted, or the transaction is not + * transaction was already aborted, or the transaction isn't * found. `Rollback` never returns `ABORTED`. * * @param {Object} request @@ -2009,16 +2009,16 @@ export class SpannerClient { } /** * Creates a set of partition tokens that can be used to execute a query - * operation in parallel. Each of the returned partition tokens can be used + * operation in parallel. Each of the returned partition tokens can be used * by {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql} to - * specify a subset of the query result to read. The same session and - * read-only transaction must be used by the PartitionQueryRequest used to - * create the partition tokens and the ExecuteSqlRequests that use the + * specify a subset of the query result to read. The same session and + * read-only transaction must be used by the `PartitionQueryRequest` used to + * create the partition tokens and the `ExecuteSqlRequests` that use the * partition tokens. * * Partition tokens become invalid when the session used to create them * is deleted, is idle for too long, begins a new transaction, or becomes too - * old. When any of these happen, it is not possible to resume the query, and + * old. When any of these happen, it isn't possible to resume the query, and * the whole operation must be restarted from the beginning. * * @param {Object} request @@ -2026,21 +2026,22 @@ export class SpannerClient { * @param {string} request.session * Required. The session used to create the partitions. * @param {google.spanner.v1.TransactionSelector} request.transaction - * Read only snapshot transactions are supported, read/write and single use - * transactions are not. + * Read-only snapshot transactions are supported, read and write and + * single-use transactions are not. * @param {string} request.sql - * Required. The query request to generate partitions for. The request will - * fail if the query is not root partitionable. For a query to be root + * Required. The query request to generate partitions for. The request fails + * if the query isn't root partitionable. For a query to be root * partitionable, it needs to satisfy a few conditions. For example, if the * query execution plan contains a distributed union operator, then it must be * the first operator in the plan. For more information about other * conditions, see [Read data in * parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). * - * The query request must not contain DML commands, such as INSERT, UPDATE, or - * DELETE. Use - * {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|ExecuteStreamingSql} with a - * PartitionedDml transaction for large, partition-friendly DML operations. + * The query request must not contain DML commands, such as `INSERT`, + * `UPDATE`, or `DELETE`. Use + * {@link protos.google.spanner.v1.Spanner.ExecuteStreamingSql|`ExecuteStreamingSql`} with + * a `PartitionedDml` transaction for large, partition-friendly DML + * operations. * @param {google.protobuf.Struct} request.params * Parameter names and values that bind to placeholders in the SQL string. * @@ -2048,15 +2049,15 @@ export class SpannerClient { * parameter name (for example, `@firstName`). Parameter names can contain * letters, numbers, and underscores. * - * Parameters can appear anywhere that a literal value is expected. The same + * Parameters can appear anywhere that a literal value is expected. The same * parameter name can be used more than once, for example: * * `"WHERE id > @msg_id AND id < @msg_id + 100"` * - * It is an error to execute a SQL statement with unbound parameters. + * It's an error to execute a SQL statement with unbound parameters. * @param {number[]} request.paramTypes - * It is not always possible for Cloud Spanner to infer the right SQL type - * from a JSON value. For example, values of type `BYTES` and values + * It isn't always possible for Cloud Spanner to infer the right SQL type + * from a JSON value. For example, values of type `BYTES` and values * of type `STRING` both appear in * {@link protos.google.spanner.v1.PartitionQueryRequest.params|params} as JSON strings. * @@ -2183,18 +2184,18 @@ export class SpannerClient { } /** * Creates a set of partition tokens that can be used to execute a read - * operation in parallel. Each of the returned partition tokens can be used + * operation in parallel. Each of the returned partition tokens can be used * by {@link protos.google.spanner.v1.Spanner.StreamingRead|StreamingRead} to specify a - * subset of the read result to read. The same session and read-only - * transaction must be used by the PartitionReadRequest used to create the - * partition tokens and the ReadRequests that use the partition tokens. There - * are no ordering guarantees on rows returned among the returned partition - * tokens, or even within each individual StreamingRead call issued with a - * partition_token. + * subset of the read result to read. The same session and read-only + * transaction must be used by the `PartitionReadRequest` used to create the + * partition tokens and the `ReadRequests` that use the partition tokens. + * There are no ordering guarantees on rows returned among the returned + * partition tokens, or even within each individual `StreamingRead` call + * issued with a `partition_token`. * * Partition tokens become invalid when the session used to create them * is deleted, is idle for too long, begins a new transaction, or becomes too - * old. When any of these happen, it is not possible to resume the read, and + * old. When any of these happen, it isn't possible to resume the read, and * the whole operation must be restarted from the beginning. * * @param {Object} request @@ -2225,7 +2226,7 @@ export class SpannerClient { * {@link protos.google.spanner.v1.PartitionReadRequest.key_set|key_set} instead names * index keys in {@link protos.google.spanner.v1.PartitionReadRequest.index|index}. * - * It is not an error for the `key_set` to name rows that do not + * It isn't an error for the `key_set` to name rows that don't * exist in the database. Read yields nothing for nonexistent rows. * @param {google.spanner.v1.PartitionOptions} request.partitionOptions * Additional options that affect how many partitions are created. @@ -2352,6 +2353,9 @@ export class SpannerClient { * the size of the returned result set. However, no individual row in the * result set can exceed 100 MiB, and no column value can exceed 10 MiB. * + * The query string can be SQL or [Graph Query Language + * (GQL)](https://cloud.google.com/spanner/docs/reference/standard-sql/graph-intro). + * * @param {Object} request * The request object that will be sent. * @param {string} request.session @@ -2363,7 +2367,7 @@ export class SpannerClient { * transaction with strong concurrency. * * Standard DML statements require a read-write transaction. To protect - * against replays, single-use transactions are not supported. The caller + * against replays, single-use transactions are not supported. The caller * must either supply an existing transaction ID or begin a new transaction. * * Partitioned DML requires an existing Partitioned DML transaction ID. @@ -2377,19 +2381,19 @@ export class SpannerClient { * to the naming requirements of identifiers as specified at * https://cloud.google.com/spanner/docs/lexical#identifiers. * - * Parameters can appear anywhere that a literal value is expected. The same + * Parameters can appear anywhere that a literal value is expected. The same * parameter name can be used more than once, for example: * * `"WHERE id > @msg_id AND id < @msg_id + 100"` * - * It is an error to execute a SQL statement with unbound parameters. + * It's an error to execute a SQL statement with unbound parameters. * @param {number[]} request.paramTypes - * It is not always possible for Cloud Spanner to infer the right SQL type - * from a JSON value. For example, values of type `BYTES` and values + * It isn't always possible for Cloud Spanner to infer the right SQL type + * from a JSON value. For example, values of type `BYTES` and values * of type `STRING` both appear in * {@link protos.google.spanner.v1.ExecuteSqlRequest.params|params} as JSON strings. * - * In these cases, `param_types` can be used to specify the exact + * In these cases, you can use `param_types` to specify the exact * SQL type for some or all of the SQL statement parameters. See the * definition of {@link protos.google.spanner.v1.Type|Type} for more information * about SQL types. @@ -2408,19 +2412,19 @@ export class SpannerClient { * be set to * {@link protos.google.spanner.v1.ExecuteSqlRequest.QueryMode.NORMAL|QueryMode.NORMAL}. * @param {Buffer} request.partitionToken - * If present, results will be restricted to the specified partition - * previously created using PartitionQuery(). There must be an exact + * If present, results are restricted to the specified partition + * previously created using `PartitionQuery`. There must be an exact * match for the values of fields common to this message and the - * PartitionQueryRequest message used to create this partition_token. + * `PartitionQueryRequest` message used to create this `partition_token`. * @param {number} request.seqno * A per-transaction sequence number used to identify this request. This field * makes each request idempotent such that if the request is received multiple - * times, at most one will succeed. + * times, at most one succeeds. * * The sequence number must be monotonically increasing within the * transaction. If a request arrives for the first time with an out-of-order - * sequence number, the transaction may be aborted. Replays of previously - * handled requests will yield the same response as the first execution. + * sequence number, the transaction can be aborted. Replays of previously + * handled requests yield the same response as the first execution. * * Required for DML statements. Ignored for queries. * @param {google.spanner.v1.ExecuteSqlRequest.QueryOptions} request.queryOptions @@ -2433,18 +2437,18 @@ export class SpannerClient { * If this is for a partitioned query and this field is set to `true`, the * request is executed with Spanner Data Boost independent compute resources. * - * If the field is set to `true` but the request does not set + * If the field is set to `true` but the request doesn't set * `partition_token`, the API returns an `INVALID_ARGUMENT` error. * @param {boolean} [request.lastStatement] - * Optional. If set to true, this statement marks the end of the transaction. - * The transaction should be committed or aborted after this statement - * executes, and attempts to execute any other requests against this - * transaction (including reads and queries) will be rejected. - * - * For DML statements, setting this option may cause some error reporting to - * be deferred until commit time (e.g. validation of unique constraints). - * Given this, successful execution of a DML statement should not be assumed - * until a subsequent Commit call completes successfully. + * Optional. If set to `true`, this statement marks the end of the + * transaction. After this statement executes, you must commit or abort the + * transaction. Attempts to execute any other requests against this + * transaction (including reads and queries) are rejected. + * + * For DML statements, setting this option might cause some error reporting to + * be deferred until commit time (for example, validation of unique + * constraints). Given this, successful execution of a DML statement shouldn't + * be assumed until a subsequent `Commit` call completes successfully. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} @@ -2508,15 +2512,15 @@ export class SpannerClient { * If the {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} * field is empty, rows are yielded in table primary key order (if * {@link protos.google.spanner.v1.ReadRequest.index|index} is empty) or index key order - * (if {@link protos.google.spanner.v1.ReadRequest.index|index} is non-empty). If the - * {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} field is - * not empty, rows will be yielded in an unspecified order. + * (if {@link protos.google.spanner.v1.ReadRequest.index|index} is non-empty). If the + * {@link protos.google.spanner.v1.ReadRequest.partition_token|partition_token} field + * isn't empty, rows are yielded in an unspecified order. * - * It is not an error for the `key_set` to name rows that do not + * It isn't an error for the `key_set` to name rows that don't * exist in the database. Read yields nothing for nonexistent rows. * @param {number} request.limit * If greater than zero, only the first `limit` rows are yielded. If `limit` - * is zero, the default is no limit. A limit cannot be specified if + * is zero, the default is no limit. A limit can't be specified if * `partition_token` is set. * @param {Buffer} request.resumeToken * If this request is resuming a previously interrupted read, @@ -2526,8 +2530,8 @@ export class SpannerClient { * left off. The rest of the request parameters must exactly match the request * that yielded this token. * @param {Buffer} request.partitionToken - * If present, results will be restricted to the specified partition - * previously created using PartitionRead(). There must be an exact + * If present, results are restricted to the specified partition + * previously created using `PartitionRead`. There must be an exact * match for the values of fields common to this message and the * PartitionReadRequest message used to create this partition_token. * @param {google.spanner.v1.RequestOptions} request.requestOptions @@ -2538,16 +2542,17 @@ export class SpannerClient { * If this is for a partitioned read and this field is set to `true`, the * request is executed with Spanner Data Boost independent compute resources. * - * If the field is set to `true` but the request does not set + * If the field is set to `true` but the request doesn't set * `partition_token`, the API returns an `INVALID_ARGUMENT` error. * @param {google.spanner.v1.ReadRequest.OrderBy} [request.orderBy] * Optional. Order for the returned rows. * - * By default, Spanner will return result rows in primary key order except for - * PartitionRead requests. For applications that do not require rows to be + * By default, Spanner returns result rows in primary key order except for + * PartitionRead requests. For applications that don't require rows to be * returned in primary key (`ORDER_BY_PRIMARY_KEY`) order, setting * `ORDER_BY_NO_ORDER` option allows Spanner to optimize row retrieval, - * resulting in lower latencies in certain cases (e.g. bulk point lookups). + * resulting in lower latencies in certain cases (for example, bulk point + * lookups). * @param {google.spanner.v1.ReadRequest.LockHint} [request.lockHint] * Optional. Lock Hint for the request, it can only be used with read-write * transactions. @@ -2582,15 +2587,15 @@ export class SpannerClient { * transactions. All mutations in a group are committed atomically. However, * mutations across groups can be committed non-atomically in an unspecified * order and thus, they must be independent of each other. Partial failure is - * possible, i.e., some groups may have been committed successfully, while - * some may have failed. The results of individual batches are streamed into - * the response as the batches are applied. - * - * BatchWrite requests are not replay protected, meaning that each mutation - * group may be applied more than once. Replays of non-idempotent mutations - * may have undesirable effects. For example, replays of an insert mutation - * may produce an already exists error or if you use generated or commit - * timestamp-based keys, it may result in additional rows being added to the + * possible, that is, some groups might have been committed successfully, + * while some might have failed. The results of individual batches are + * streamed into the response as the batches are applied. + * + * `BatchWrite` requests are not replay protected, meaning that each mutation + * group can be applied more than once. Replays of non-idempotent mutations + * can have undesirable effects. For example, replays of an insert mutation + * can produce an already exists error or if you use generated or commit + * timestamp-based keys, it can result in additional rows being added to the * mutation's table. We recommend structuring your mutation groups to be * idempotent to avoid this issue. * @@ -2603,18 +2608,9 @@ export class SpannerClient { * @param {number[]} request.mutationGroups * Required. The groups of mutations to be applied. * @param {boolean} [request.excludeTxnFromChangeStreams] - * Optional. When `exclude_txn_from_change_streams` is set to `true`: - * * Mutations from all transactions in this batch write operation will not - * be recorded in change streams with DDL option `allow_txn_exclusion=true` - * that are tracking columns modified by these transactions. - * * Mutations from all transactions in this batch write operation will be - * recorded in change streams with DDL option `allow_txn_exclusion=false or - * not set` that are tracking columns modified by these transactions. - * - * When `exclude_txn_from_change_streams` is set to `false` or not set, - * mutations from all transactions in this batch write operation will be - * recorded in all change streams that are tracking columns modified by these - * transactions. + * Optional. If you don't set the `exclude_txn_from_change_streams` option or + * if it's set to `false`, then any change streams monitoring columns modified + * by transactions will capture the updates made within that transaction. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} From 8a175e2e5cc8d0ed81faee7b24b59b5026758a59 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 1 Sep 2025 20:22:16 +0200 Subject: [PATCH 4/9] fix(deps): update dependency google-gax to v5.0.3 (#2371) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a0952981f..c8d538018 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "events-intercept": "^2.0.0", "extend": "^3.0.2", "google-auth-library": "^10.0.0-rc.1", - "google-gax": "5.0.1", + "google-gax": "5.0.3", "grpc-gcp": "^1.0.1", "lodash.snakecase": "^4.1.1", "merge-stream": "^2.0.0", From ed143301e4e7708d91990601e7e1554e7c6b1b5a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 11:19:47 +0530 Subject: [PATCH 5/9] chore: enable node split repo local pp to run (#2404) Source-Link: https://github.com/googleapis/synthtool/commit/61b00bd3734f6a71586d5ef1447b405d73431226 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d7121436478154661c563c87f931ca78030903b813239c577f91021cda86cec3 Co-authored-by: Owl Bot Co-authored-by: alkatrivedi <58396306+alkatrivedi@users.noreply.github.com> --- .github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 3037bc547..1b31dcf66 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:b612d739b0533e56ba174526ca339f264b63e911c30d6f83f55b57c38cc6ad2a -# created: 2025-08-15T12:36:48.871481111Z + digest: sha256:d7121436478154661c563c87f931ca78030903b813239c577f91021cda86cec3 +# created: 2025-08-28T17:36:59.211564853Z From 2e252470ed9536649c698e085fc14b2af0052464 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 10 Sep 2025 11:38:51 +0200 Subject: [PATCH 6/9] chore(deps): update actions/github-script action to v8 (#2411) --- .github/workflows/issues-no-repro.yaml | 2 +- .github/workflows/response.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml index 531054022..326400a9c 100644 --- a/.github/workflows/issues-no-repro.yaml +++ b/.github/workflows/issues-no-repro.yaml @@ -16,7 +16,7 @@ jobs: node-version: 18 - run: npm install working-directory: ./.github/scripts - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const script = require('./.github/scripts/close-invalid-link.cjs') diff --git a/.github/workflows/response.yaml b/.github/workflows/response.yaml index e81a3603a..38e987f73 100644 --- a/.github/workflows/response.yaml +++ b/.github/workflows/response.yaml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v5 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const script = require('./.github/scripts/close-unresponsive.cjs') @@ -28,7 +28,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v5 - - uses: actions/github-script@v7 + - uses: actions/github-script@v8 with: script: | const script = require('./.github/scripts/remove-response-label.cjs') From 9e6ecba174eebbda11bd9463e11c0bbc4f5cf1ed Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 10 Sep 2025 12:11:04 +0200 Subject: [PATCH 7/9] chore(deps): update actions/setup-node action to v5 (#2410) Co-authored-by: alkatrivedi <58396306+alkatrivedi@users.noreply.github.com> --- .github/workflows/ci.yaml | 10 +++++----- .github/workflows/issues-no-repro.yaml | 2 +- .github/workflows/system-tests-against-emulator.yaml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10c83fc28..cd4bedfd0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: node: [18, 20, 22, 24] steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: ${{ matrix.node }} - run: node --version @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 18 - run: node --version @@ -44,7 +44,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 18 - run: npm install --engine-strict @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 18 - run: npm install @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 18 - run: npm install diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml index 326400a9c..c176ecfe9 100644 --- a/.github/workflows/issues-no-repro.yaml +++ b/.github/workflows/issues-no-repro.yaml @@ -11,7 +11,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 18 - run: npm install diff --git a/.github/workflows/system-tests-against-emulator.yaml b/.github/workflows/system-tests-against-emulator.yaml index 53e602d95..01551f468 100644 --- a/.github/workflows/system-tests-against-emulator.yaml +++ b/.github/workflows/system-tests-against-emulator.yaml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v5 with: node-version: 22 - run: node --version From af72d707c8857d5596bd2b93830e52c8e152967f Mon Sep 17 00:00:00 2001 From: surbhigarg92 Date: Fri, 12 Sep 2025 02:02:41 +0530 Subject: [PATCH 8/9] fix : disable afe_connectivity_error_count metric (#2417) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix : disable afe_connectivity_error_count metric * fix: disable afe_connectivity_error_count metric * 🦉 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 --- .github/workflows/ci.yaml | 10 +++++----- .github/workflows/issues-no-repro.yaml | 4 ++-- .github/workflows/response.yaml | 4 ++-- src/metrics/interceptor.ts | 4 +++- test/metrics/interceptor.ts | 2 +- test/metrics/metrics.ts | 8 -------- 6 files changed, 13 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cd4bedfd0..10c83fc28 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,7 +12,7 @@ jobs: node: [18, 20, 22, 24] steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - run: node --version @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v4 with: node-version: 18 - run: node --version @@ -44,7 +44,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v4 with: node-version: 18 - run: npm install --engine-strict @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v4 with: node-version: 18 - run: npm install @@ -64,7 +64,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v4 with: node-version: 18 - run: npm install diff --git a/.github/workflows/issues-no-repro.yaml b/.github/workflows/issues-no-repro.yaml index c176ecfe9..531054022 100644 --- a/.github/workflows/issues-no-repro.yaml +++ b/.github/workflows/issues-no-repro.yaml @@ -11,12 +11,12 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v5 - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v4 with: node-version: 18 - run: npm install working-directory: ./.github/scripts - - uses: actions/github-script@v8 + - uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/close-invalid-link.cjs') diff --git a/.github/workflows/response.yaml b/.github/workflows/response.yaml index 38e987f73..e81a3603a 100644 --- a/.github/workflows/response.yaml +++ b/.github/workflows/response.yaml @@ -14,7 +14,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v5 - - uses: actions/github-script@v8 + - uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/close-unresponsive.cjs') @@ -28,7 +28,7 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v5 - - uses: actions/github-script@v8 + - uses: actions/github-script@v7 with: script: | const script = require('./.github/scripts/remove-response-label.cjs') diff --git a/src/metrics/interceptor.ts b/src/metrics/interceptor.ts index 31dae03a9..cb4d0a728 100644 --- a/src/metrics/interceptor.ts +++ b/src/metrics/interceptor.ts @@ -67,7 +67,9 @@ export const MetricInterceptor = (options, nextCall) => { if (metricsTracer?.afeLatency) { metricsTracer?.recordAfeLatency(status.code); } else { - metricsTracer?.recordAfeConnectivityErrorCount(status.code); + // Disable afe_connectivity_error_count metric as AFE header is disabled in backend + // currently. + // metricsTracer?.recordAfeConnectivityErrorCount(status.code); } }, }; diff --git a/test/metrics/interceptor.ts b/test/metrics/interceptor.ts index dd651a937..596ae06b3 100644 --- a/test/metrics/interceptor.ts +++ b/test/metrics/interceptor.ts @@ -193,7 +193,7 @@ describe('MetricInterceptor', () => { ); }); - it('AFE Metrics - Connectivity Error Count', () => { + it.skip('AFE Metrics - Connectivity Error Count', () => { const interceptingCall = MetricInterceptor(mockOptions, mockNextCall); interceptingCall.start(testMetadata, mockListener); diff --git a/test/metrics/metrics.ts b/test/metrics/metrics.ts index cf567928f..61ae8a05a 100644 --- a/test/metrics/metrics.ts +++ b/test/metrics/metrics.ts @@ -457,10 +457,6 @@ describe('Test metrics with mock server', () => { resourceMetrics, METRIC_NAME_GFE_CONNECTIVITY_ERROR_COUNT, ); - const afeConnectivityErrorCountData = getMetricData( - resourceMetrics, - METRIC_NAME_AFE_CONNECTIVITY_ERROR_COUNT, - ); // Verify GFE AFE latency doesn't exist assert.ok(!hasMetricData(resourceMetrics, METRIC_NAME_GFE_LATENCIES)); @@ -486,10 +482,6 @@ describe('Test metrics with mock server', () => { getAggregatedValue(connectivityErrorCountData, attributes), 1, ); - assert.strictEqual( - getAggregatedValue(afeConnectivityErrorCountData, attributes), - 1, - ); }); }); From 413176287fc8913658f956b5e43b6882e23879cd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:44:53 +0530 Subject: [PATCH 9/9] chore(main): release 8.2.1 (#2408) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 8 ++++++++ package.json | 2 +- samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39a1289b2..ae37be336 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions +## [8.2.1](https://github.com/googleapis/nodejs-spanner/compare/v8.2.0...v8.2.1) (2025-09-12) + + +### Bug Fixes + +* **deps:** Update dependency google-gax to v5.0.3 ([#2371](https://github.com/googleapis/nodejs-spanner/issues/2371)) ([8a175e2](https://github.com/googleapis/nodejs-spanner/commit/8a175e2e5cc8d0ed81faee7b24b59b5026758a59)) +* Disable afe_connectivity_error_count metric ([af72d70](https://github.com/googleapis/nodejs-spanner/commit/af72d707c8857d5596bd2b93830e52c8e152967f)) + ## [8.2.0](https://github.com/googleapis/nodejs-spanner/compare/v8.1.0...v8.2.0) (2025-08-26) diff --git a/package.json b/package.json index c8d538018..eaa752bdd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/spanner", "description": "Cloud Spanner Client Library for Node.js", - "version": "8.2.0", + "version": "8.2.1", "license": "Apache-2.0", "author": "Google Inc.", "engines": { diff --git a/samples/package.json b/samples/package.json index 8221c0122..63b37821f 100644 --- a/samples/package.json +++ b/samples/package.json @@ -17,7 +17,7 @@ "dependencies": { "@google-cloud/kms": "^5.0.0", "@google-cloud/precise-date": "^5.0.0", - "@google-cloud/spanner": "^8.2.0", + "@google-cloud/spanner": "^8.2.1", "protobufjs": "^7.0.0", "yargs": "^17.0.0" },