Skip to content

Commit b53a82f

Browse files
authored
Merge branch 'googleapis:main' into main
2 parents 738804b + f34f464 commit b53a82f

31 files changed

+8556
-958
lines changed

.github/workflows/system-tests-against-emulator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- 9020:9020
1717

1818
steps:
19-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
19+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
2020
- uses: actions/setup-node@v4
2121
with:
2222
node-version: 14

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ system-test/*key.json
1212
.DS_Store
1313
package-lock.json
1414
__pycache__
15-
.vscode

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@
44

55
[1]: https://www.npmjs.com/package/nodejs-spanner?activeTab=versions
66

7+
## [7.11.0](https://github.com/googleapis/nodejs-spanner/compare/v7.10.0...v7.11.0) (2024-07-29)
8+
9+
10+
### Features
11+
12+
* Add support for blind writes ([#2065](https://github.com/googleapis/nodejs-spanner/issues/2065)) ([62fc0a4](https://github.com/googleapis/nodejs-spanner/commit/62fc0a47327017c115466b9e89e53dbd778579af))
13+
* **spanner:** Add samples for instance partitions ([#2083](https://github.com/googleapis/nodejs-spanner/issues/2083)) ([b91e284](https://github.com/googleapis/nodejs-spanner/commit/b91e2849056df9894e0590cb71e21c13319e6d70))
14+
15+
## [7.10.0](https://github.com/googleapis/nodejs-spanner/compare/v7.9.1...v7.10.0) (2024-07-19)
16+
17+
18+
### Features
19+
20+
* Add field lock_hint in spanner.proto ([47520e9](https://github.com/googleapis/nodejs-spanner/commit/47520e927b0fdcc60cb67378b8b49f44329f210b))
21+
* Add field order_by in spanner.proto ([47520e9](https://github.com/googleapis/nodejs-spanner/commit/47520e927b0fdcc60cb67378b8b49f44329f210b))
22+
* Add QueryCancellationAction message in executor protos ([47520e9](https://github.com/googleapis/nodejs-spanner/commit/47520e927b0fdcc60cb67378b8b49f44329f210b))
23+
* Add support for change streams transaction exclusion option for Batch Write ([#2070](https://github.com/googleapis/nodejs-spanner/issues/2070)) ([2a9e443](https://github.com/googleapis/nodejs-spanner/commit/2a9e44328acda310db2d0d65d32ad82d77a9fcb0))
24+
* **spanner:** Add support for Cloud Spanner Scheduled Backups ([#2045](https://github.com/googleapis/nodejs-spanner/issues/2045)) ([47520e9](https://github.com/googleapis/nodejs-spanner/commit/47520e927b0fdcc60cb67378b8b49f44329f210b))
25+
* Update Nodejs generator to send API versions in headers for GAPICs ([47520e9](https://github.com/googleapis/nodejs-spanner/commit/47520e927b0fdcc60cb67378b8b49f44329f210b))
26+
27+
28+
### Bug Fixes
29+
30+
* Callback in getDatabaseDialect ([#2078](https://github.com/googleapis/nodejs-spanner/issues/2078)) ([7e4a8e9](https://github.com/googleapis/nodejs-spanner/commit/7e4a8e9ad4f785b15b68aaa06b6480098d7995ba))
31+
* **deps:** Update dependency google-gax to v4.3.8 ([#2077](https://github.com/googleapis/nodejs-spanner/issues/2077)) ([e927880](https://github.com/googleapis/nodejs-spanner/commit/e927880ff786a2528a2bbb063a244af3c42ff69c))
32+
733
## [7.9.1](https://github.com/googleapis/nodejs-spanner/compare/v7.9.0...v7.9.1) (2024-06-26)
834

935

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/nodejs-spanner/tre
132132
| Deletes a user-managed instance configuration. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-config-delete.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-config-delete.js,samples/README.md) |
133133
| Lists the instance configuration operations. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-config-get-operations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-config-get-operations.js,samples/README.md) |
134134
| Updates a user-managed instance configuration. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-config-update.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-config-update.js,samples/README.md) |
135+
| Creates a new instance partition | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-partition-create.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-partition-create.js,samples/README.md) |
135136
| Creates a instance with autoscaling config. | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-with-autoscaling-config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-with-autoscaling-config.js,samples/README.md) |
136137
| Instance-with-processing-units | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance-with-processing-units.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance-with-processing-units.js,samples/README.md) |
137138
| Instance | [source code](https://github.com/googleapis/nodejs-spanner/blob/main/samples/instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-spanner&page=editor&open_in_editor=samples/instance.js,samples/README.md) |

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@google-cloud/spanner",
33
"description": "Cloud Spanner Client Library for Node.js",
4-
"version": "7.9.1",
4+
"version": "7.11.0",
55
"license": "Apache-2.0",
66
"author": "Google Inc.",
77
"engines": {
@@ -66,7 +66,7 @@
6666
"events-intercept": "^2.0.0",
6767
"extend": "^3.0.2",
6868
"google-auth-library": "^9.0.0",
69-
"google-gax": "4.3.7",
69+
"google-gax": "4.3.8",
7070
"grpc-gcp": "^1.0.0",
7171
"is": "^3.2.1",
7272
"lodash.snakecase": "^4.1.1",

protos/google/spanner/admin/database/v1/backup.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,18 @@ message Backup {
156156
// less than `Backup.max_expire_time`.
157157
google.protobuf.Timestamp max_expire_time = 12
158158
[(google.api.field_behavior) = OUTPUT_ONLY];
159+
160+
// Output only. List of backup schedule URIs that are associated with
161+
// creating this backup. This is only applicable for scheduled backups, and
162+
// is empty for on-demand backups.
163+
//
164+
// To optimize for storage, whenever possible, multiple schedules are
165+
// collapsed together to create one backup. In such cases, this field captures
166+
// the list of all backup schedule URIs that are associated with creating
167+
// this backup. If collapsing is not done, then this field captures the
168+
// single backup schedule URI associated with creating this backup.
169+
repeated string backup_schedules = 14
170+
[(google.api.field_behavior) = OUTPUT_ONLY];
159171
}
160172

161173
// The request for
@@ -688,3 +700,8 @@ message CopyBackupEncryptionConfig {
688700
}
689701
];
690702
}
703+
704+
// The specification for full backups.
705+
// A full backup stores the entire contents of the database at a given
706+
// version time.
707+
message FullBackupSpec {}
Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,227 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.spanner.admin.database.v1;
18+
19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
21+
import "google/protobuf/duration.proto";
22+
import "google/protobuf/field_mask.proto";
23+
import "google/protobuf/timestamp.proto";
24+
import "google/spanner/admin/database/v1/backup.proto";
25+
26+
option csharp_namespace = "Google.Cloud.Spanner.Admin.Database.V1";
27+
option go_package = "cloud.google.com/go/spanner/admin/database/apiv1/databasepb;databasepb";
28+
option java_multiple_files = true;
29+
option java_outer_classname = "BackupScheduleProto";
30+
option java_package = "com.google.spanner.admin.database.v1";
31+
option php_namespace = "Google\\Cloud\\Spanner\\Admin\\Database\\V1";
32+
option ruby_package = "Google::Cloud::Spanner::Admin::Database::V1";
33+
34+
// Defines specifications of the backup schedule.
35+
message BackupScheduleSpec {
36+
// Required.
37+
oneof schedule_spec {
38+
// Cron style schedule specification.
39+
CrontabSpec cron_spec = 1;
40+
}
41+
}
42+
43+
// BackupSchedule expresses the automated backup creation specification for a
44+
// Spanner database.
45+
// Next ID: 10
46+
message BackupSchedule {
47+
option (google.api.resource) = {
48+
type: "spanner.googleapis.com/BackupSchedule"
49+
pattern: "projects/{project}/instances/{instance}/databases/{database}/backupSchedules/{schedule}"
50+
plural: "backupSchedules"
51+
singular: "backupSchedule"
52+
};
53+
54+
// Identifier. Output only for the
55+
// [CreateBackupSchedule][DatabaseAdmin.CreateBackupSchededule] operation.
56+
// Required for the
57+
// [UpdateBackupSchedule][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackupSchedule]
58+
// operation. A globally unique identifier for the backup schedule which
59+
// cannot be changed. Values are of the form
60+
// `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/[a-z][a-z0-9_\-]*[a-z0-9]`
61+
// The final segment of the name must be between 2 and 60 characters in
62+
// length.
63+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
64+
65+
// Optional. The schedule specification based on which the backup creations
66+
// are triggered.
67+
BackupScheduleSpec spec = 6 [(google.api.field_behavior) = OPTIONAL];
68+
69+
// Optional. The retention duration of a backup that must be at least 6 hours
70+
// and at most 366 days. The backup is eligible to be automatically deleted
71+
// once the retention period has elapsed.
72+
google.protobuf.Duration retention_duration = 3
73+
[(google.api.field_behavior) = OPTIONAL];
74+
75+
// Optional. The encryption configuration that will be used to encrypt the
76+
// backup. If this field is not specified, the backup will use the same
77+
// encryption configuration as the database.
78+
CreateBackupEncryptionConfig encryption_config = 4
79+
[(google.api.field_behavior) = OPTIONAL];
80+
81+
// Required. Backup type spec determines the type of backup that is created by
82+
// the backup schedule. Currently, only full backups are supported.
83+
oneof backup_type_spec {
84+
// The schedule creates only full backups.
85+
FullBackupSpec full_backup_spec = 7;
86+
}
87+
88+
// Output only. The timestamp at which the schedule was last updated.
89+
// If the schedule has never been updated, this field contains the timestamp
90+
// when the schedule was first created.
91+
google.protobuf.Timestamp update_time = 9
92+
[(google.api.field_behavior) = OUTPUT_ONLY];
93+
}
94+
95+
// CrontabSpec can be used to specify the version time and frequency at
96+
// which the backup should be created.
97+
message CrontabSpec {
98+
// Required. Textual representation of the crontab. User can customize the
99+
// backup frequency and the backup version time using the cron
100+
// expression. The version time must be in UTC timzeone.
101+
//
102+
// The backup will contain an externally consistent copy of the
103+
// database at the version time. Allowed frequencies are 12 hour, 1 day,
104+
// 1 week and 1 month. Examples of valid cron specifications:
105+
// * `0 2/12 * * * ` : every 12 hours at (2, 14) hours past midnight in UTC.
106+
// * `0 2,14 * * * ` : every 12 hours at (2,14) hours past midnight in UTC.
107+
// * `0 2 * * * ` : once a day at 2 past midnight in UTC.
108+
// * `0 2 * * 0 ` : once a week every Sunday at 2 past midnight in UTC.
109+
// * `0 2 8 * * ` : once a month on 8th day at 2 past midnight in UTC.
110+
string text = 1 [(google.api.field_behavior) = REQUIRED];
111+
112+
// Output only. The time zone of the times in `CrontabSpec.text`. Currently
113+
// only UTC is supported.
114+
string time_zone = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
115+
116+
// Output only. Schedule backups will contain an externally consistent copy
117+
// of the database at the version time specified in
118+
// `schedule_spec.cron_spec`. However, Spanner may not initiate the creation
119+
// of the scheduled backups at that version time. Spanner will initiate
120+
// the creation of scheduled backups within the time window bounded by the
121+
// version_time specified in `schedule_spec.cron_spec` and version_time +
122+
// `creation_window`.
123+
google.protobuf.Duration creation_window = 3
124+
[(google.api.field_behavior) = OUTPUT_ONLY];
125+
}
126+
127+
// The request for
128+
// [CreateBackupSchedule][google.spanner.admin.database.v1.DatabaseAdmin.CreateBackupSchedule].
129+
message CreateBackupScheduleRequest {
130+
// Required. The name of the database that this backup schedule applies to.
131+
string parent = 1 [
132+
(google.api.field_behavior) = REQUIRED,
133+
(google.api.resource_reference) = {
134+
type: "spanner.googleapis.com/Database"
135+
}
136+
];
137+
138+
// Required. The Id to use for the backup schedule. The `backup_schedule_id`
139+
// appended to `parent` forms the full backup schedule name of the form
140+
// `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
141+
string backup_schedule_id = 2 [(google.api.field_behavior) = REQUIRED];
142+
143+
// Required. The backup schedule to create.
144+
BackupSchedule backup_schedule = 3 [(google.api.field_behavior) = REQUIRED];
145+
}
146+
147+
// The request for
148+
// [GetBackupSchedule][google.spanner.admin.database.v1.DatabaseAdmin.GetBackupSchedule].
149+
message GetBackupScheduleRequest {
150+
// Required. The name of the schedule to retrieve.
151+
// Values are of the form
152+
// `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
153+
string name = 1 [
154+
(google.api.field_behavior) = REQUIRED,
155+
(google.api.resource_reference) = {
156+
type: "spanner.googleapis.com/BackupSchedule"
157+
}
158+
];
159+
}
160+
161+
// The request for
162+
// [DeleteBackupSchedule][google.spanner.admin.database.v1.DatabaseAdmin.DeleteBackupSchedule].
163+
message DeleteBackupScheduleRequest {
164+
// Required. The name of the schedule to delete.
165+
// Values are of the form
166+
// `projects/<project>/instances/<instance>/databases/<database>/backupSchedules/<backup_schedule_id>`.
167+
string name = 1 [
168+
(google.api.field_behavior) = REQUIRED,
169+
(google.api.resource_reference) = {
170+
type: "spanner.googleapis.com/BackupSchedule"
171+
}
172+
];
173+
}
174+
175+
// The request for
176+
// [ListBackupSchedules][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupSchedules].
177+
message ListBackupSchedulesRequest {
178+
// Required. Database is the parent resource whose backup schedules should be
179+
// listed. Values are of the form
180+
// projects/<project>/instances/<instance>/databases/<database>
181+
string parent = 1 [
182+
(google.api.field_behavior) = REQUIRED,
183+
(google.api.resource_reference) = {
184+
type: "spanner.googleapis.com/Database"
185+
}
186+
];
187+
188+
// Optional. Number of backup schedules to be returned in the response. If 0
189+
// or less, defaults to the server's maximum allowed page size.
190+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
191+
192+
// Optional. If non-empty, `page_token` should contain a
193+
// [next_page_token][google.spanner.admin.database.v1.ListBackupSchedulesResponse.next_page_token]
194+
// from a previous
195+
// [ListBackupSchedulesResponse][google.spanner.admin.database.v1.ListBackupSchedulesResponse]
196+
// to the same `parent`.
197+
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
198+
}
199+
200+
// The response for
201+
// [ListBackupSchedules][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupSchedules].
202+
message ListBackupSchedulesResponse {
203+
// The list of backup schedules for a database.
204+
repeated BackupSchedule backup_schedules = 1;
205+
206+
// `next_page_token` can be sent in a subsequent
207+
// [ListBackupSchedules][google.spanner.admin.database.v1.DatabaseAdmin.ListBackupSchedules]
208+
// call to fetch more of the schedules.
209+
string next_page_token = 2;
210+
}
211+
212+
// The request for
213+
// [UpdateBackupScheduleRequest][google.spanner.admin.database.v1.DatabaseAdmin.UpdateBackupSchedule].
214+
message UpdateBackupScheduleRequest {
215+
// Required. The backup schedule to update. `backup_schedule.name`, and the
216+
// fields to be updated as specified by `update_mask` are required. Other
217+
// fields are ignored.
218+
BackupSchedule backup_schedule = 1 [(google.api.field_behavior) = REQUIRED];
219+
220+
// Required. A mask specifying which fields in the BackupSchedule resource
221+
// should be updated. This mask is relative to the BackupSchedule resource,
222+
// not to the request message. The field mask must always be
223+
// specified; this prevents any future fields from being erased
224+
// accidentally.
225+
google.protobuf.FieldMask update_mask = 2
226+
[(google.api.field_behavior) = REQUIRED];
227+
}

0 commit comments

Comments
 (0)