Skip to content

Commit

Permalink
Merge branch 'main' into untyped-params
Browse files Browse the repository at this point in the history
  • Loading branch information
asthamohta authored Nov 27, 2023
2 parents 89e7aae + 6c0eef1 commit e575753
Show file tree
Hide file tree
Showing 26 changed files with 10,756 additions and 3,522 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build/
docs/
protos/
samples/generated/
system-test/**/fixtures
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430
# created: 2023-08-03T18:46:14.719706948Z
digest: sha256:bfe4592953269bfa8d135200ca1b17809f106a337a885d7ecc12cd2a9998e98a
# created: 2023-11-15T20:00:24.246072277Z
1 change: 0 additions & 1 deletion .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ branchProtectionRules:
requiredStatusCheckContexts:
- "ci/kokoro: Samples test"
- "ci/kokoro: System test"
- docs
- lint
- test (14)
- test (16)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/system-tests-against-emulator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- 9020:9020

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@v4
with:
node-version: 14
- run: node --version
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/docs-devsite.sh

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

33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@

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

## [7.1.0](https://github.com/googleapis/nodejs-spanner/compare/v7.0.0...v7.1.0) (2023-11-16)


### Features

* Add PG.OID type cod annotation ([69192b5](https://github.com/googleapis/nodejs-spanner/commit/69192b50ead0bde98676cb647ba4bf8a3112bb02))
* **spanner:** Add autoscaling config to the instance proto ([#1935](https://github.com/googleapis/nodejs-spanner/issues/1935)) ([fe285c6](https://github.com/googleapis/nodejs-spanner/commit/fe285c67074ba36aaf5b49ea867c0d5851d83717))
* **spanner:** Add directed_read_option in spanner.proto ([69192b5](https://github.com/googleapis/nodejs-spanner/commit/69192b50ead0bde98676cb647ba4bf8a3112bb02))


### Bug Fixes

* **deps:** Update dependency @types/stack-trace to v0.0.31 ([#1924](https://github.com/googleapis/nodejs-spanner/issues/1924)) ([96af405](https://github.com/googleapis/nodejs-spanner/commit/96af4051c6717dfcbbc6e117e3ecd7f8e9dd758a))
* **deps:** Update dependency @types/stack-trace to v0.0.32 ([#1939](https://github.com/googleapis/nodejs-spanner/issues/1939)) ([cb66474](https://github.com/googleapis/nodejs-spanner/commit/cb66474e995a90c1288e70842f723c51f1ffd37d))
* **deps:** Update dependency google-gax to v4.0.4 ([#1926](https://github.com/googleapis/nodejs-spanner/issues/1926)) ([361fe6a](https://github.com/googleapis/nodejs-spanner/commit/361fe6a812f56c6834f1f7c7db60fc1083243768))
* **deps:** Update dependency google-gax to v4.0.5 ([#1937](https://github.com/googleapis/nodejs-spanner/issues/1937)) ([ab26075](https://github.com/googleapis/nodejs-spanner/commit/ab260759be2fcc9ff80342f710b4c807742da2c5))

## [7.0.0](https://github.com/googleapis/nodejs-spanner/compare/v6.16.0...v7.0.0) (2023-08-30)


### ⚠ BREAKING CHANGES

* upgrade to Node 14 ([#1890](https://github.com/googleapis/nodejs-spanner/issues/1890))

### Bug Fixes

* Idwaiter with multiple requests ([#1910](https://github.com/googleapis/nodejs-spanner/issues/1910)) ([83dd1f8](https://github.com/googleapis/nodejs-spanner/commit/83dd1f8201d07898bd3ddff9e339dfbcef7d7ace))


### Miscellaneous Chores

* Upgrade to Node 14 ([#1890](https://github.com/googleapis/nodejs-spanner/issues/1890)) ([0024772](https://github.com/googleapis/nodejs-spanner/commit/0024772b750de404cd44771e320fe89cd430f064))

## [6.16.0](https://github.com/googleapis/nodejs-spanner/compare/v6.15.0...v6.16.0) (2023-08-07)


Expand Down
1 change: 1 addition & 0 deletions nodejs-spanner
Submodule nodejs-spanner added at 7d0bde
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/spanner",
"description": "Cloud Spanner Client Library for Node.js",
"version": "6.16.0",
"version": "7.1.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
Expand Down Expand Up @@ -52,27 +52,27 @@
},
"dependencies": {
"@google-cloud/common": "^5.0.0",
"@google-cloud/precise-date": "^3.0.0",
"@google-cloud/precise-date": "^4.0.0",
"@google-cloud/projectify": "^4.0.0",
"@google-cloud/promisify": "^4.0.0",
"@grpc/proto-loader": "^0.7.0",
"@types/big.js": "^6.0.0",
"@types/stack-trace": "0.0.29",
"@types/stack-trace": "0.0.33",
"arrify": "^2.0.0",
"big.js": "^6.0.0",
"checkpoint-stream": "^0.1.1",
"duplexify": "^4.1.1",
"events-intercept": "^2.0.0",
"extend": "^3.0.2",
"google-auth-library": "^9.0.0",
"google-gax": "^4.0.3",
"google-gax": "4.0.5",
"grpc-gcp": "^1.0.0",
"is": "^3.2.1",
"lodash.snakecase": "^4.1.1",
"merge-stream": "^2.0.0",
"p-queue": "^6.0.2",
"protobufjs": "^7.0.0",
"retry-request": "^6.0.0",
"retry-request": "^7.0.0",
"split-array-stream": "^2.0.0",
"stack-trace": "0.0.10",
"stream-events": "^1.0.4",
Expand All @@ -82,7 +82,7 @@
"devDependencies": {
"@types/concat-stream": "^2.0.0",
"@types/extend": "^3.0.0",
"@types/is": "0.0.22",
"@types/is": "0.0.25",
"@types/lodash.snakecase": "^4.1.4",
"@types/merge-stream": "^1.1.2",
"@types/mocha": "^9.0.0",
Expand All @@ -97,12 +97,12 @@
"c8": "^8.0.1",
"codecov": "^3.0.2",
"concat-stream": "^2.0.0",
"dedent": "^0.7.0",
"dedent": "^1.0.0",
"execa": "^5.0.0",
"gapic-tools": "^0.1.8",
"gapic-tools": "^0.2.0",
"gts": "^5.0.0",
"jsdoc": "^4.0.0",
"jsdoc-fresh": "^2.0.0",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"linkinator": "^4.0.0",
"lodash.random": "^3.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,66 @@ message InstanceConfig {
State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Autoscaling config for an instance.
message AutoscalingConfig {
// The autoscaling limits for the instance. Users can define the minimum and
// maximum compute capacity allocated to the instance, and the autoscaler will
// only scale within that range. Users can either use nodes or processing
// units to specify the limits, but should use the same unit to set both the
// min_limit and max_limit.
message AutoscalingLimits {
// The minimum compute capacity for the instance.
oneof min_limit {
// Minimum number of nodes allocated to the instance. If set, this number
// should be greater than or equal to 1.
int32 min_nodes = 1;

// Minimum number of processing units allocated to the instance. If set,
// this number should be multiples of 1000.
int32 min_processing_units = 2;
}

// The maximum compute capacity for the instance. The maximum compute
// capacity should be less than or equal to 10X the minimum compute
// capacity.
oneof max_limit {
// Maximum number of nodes allocated to the instance. If set, this number
// should be greater than or equal to min_nodes.
int32 max_nodes = 3;

// Maximum number of processing units allocated to the instance. If set,
// this number should be multiples of 1000 and be greater than or equal to
// min_processing_units.
int32 max_processing_units = 4;
}
}

// The autoscaling targets for an instance.
message AutoscalingTargets {
// Required. The target high priority cpu utilization percentage that the
// autoscaler should be trying to achieve for the instance. This number is
// on a scale from 0 (no utilization) to 100 (full utilization). The valid
// range is [10, 90] inclusive.
int32 high_priority_cpu_utilization_percent = 1
[(google.api.field_behavior) = REQUIRED];

// Required. The target storage utilization percentage that the autoscaler
// should be trying to achieve for the instance. This number is on a scale
// from 0 (no utilization) to 100 (full utilization). The valid range is
// [10, 100] inclusive.
int32 storage_utilization_percent = 2
[(google.api.field_behavior) = REQUIRED];
}

// Required. Autoscaling limits for an instance.
AutoscalingLimits autoscaling_limits = 1
[(google.api.field_behavior) = REQUIRED];

// Required. The autoscaling targets for an instance.
AutoscalingTargets autoscaling_targets = 2
[(google.api.field_behavior) = REQUIRED];
}

// An isolated set of Cloud Spanner resources on which databases can be hosted.
message Instance {
option (google.api.resource) = {
Expand Down Expand Up @@ -606,8 +666,12 @@ message Instance {
string display_name = 3 [(google.api.field_behavior) = REQUIRED];

// The number of nodes allocated to this instance. At most one of either
// node_count or processing_units should be present in the message. This
// may be zero in API responses for instances that are not yet in state
// node_count or processing_units should be present in the message.
//
// Users can set the node_count field to specify the target number of nodes
// allocated to the instance.
//
// This may be zero in API responses for instances that are not yet in state
// `READY`.
//
// See [the
Expand All @@ -616,14 +680,26 @@ message Instance {
int32 node_count = 5;

// The number of processing units allocated to this instance. At most one of
// processing_units or node_count should be present in the message. This may
// be zero in API responses for instances that are not yet in state `READY`.
// processing_units or node_count should be present in the message.
//
// Users can set the processing_units field to specify the target number of
// processing units allocated to the instance.
//
// This may be zero in API responses for instances that are not yet in state
// `READY`.
//
// See [the
// documentation](https://cloud.google.com/spanner/docs/compute-capacity)
// for more information about nodes and processing units.
int32 processing_units = 9;

// Optional. The autoscaling configuration. Autoscaling is enabled if this
// field is set. When autoscaling is enabled, node_count and processing_units
// are treated as OUTPUT_ONLY fields and reflect the current compute capacity
// allocated to the instance.
AutoscalingConfig autoscaling_config = 17
[(google.api.field_behavior) = OPTIONAL];

// Output only. The current instance state. For
// [CreateInstance][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstance],
// the state must be either omitted or set to `CREATING`. For
Expand Down
Loading

0 comments on commit e575753

Please sign in to comment.