Skip to content

Commit d0f179a

Browse files
authored
Merge branch 'master' into autosynth-googleapis
2 parents 2fa6453 + 3dcd9a7 commit d0f179a

File tree

219 files changed

+15236
-4546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+15236
-4546
lines changed

.github/workflows/ci.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ jobs:
3636
JOB_TYPE: test
3737
dependencies:
3838
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
java: [8, 11]
3942
steps:
4043
- uses: actions/checkout@v2
4144
- uses: actions/setup-java@v1
4245
with:
43-
java-version: 8
46+
java-version: ${{matrix.java}}
4447
- run: java -version
4548
- run: .kokoro/dependencies.sh
4649
linkage-monitor:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: integration-tests-against-emulator
7+
jobs:
8+
units:
9+
runs-on: ubuntu-latest
10+
11+
services:
12+
emulator:
13+
image: gcr.io/cloud-spanner-emulator/emulator:latest
14+
ports:
15+
- 9010:9010
16+
- 9020:9020
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-java@v1
21+
with:
22+
java-version: 8
23+
- run: java -version
24+
- run: .kokoro/build.sh
25+
- run: mvn -B -Dspanner.testenv.instance="" -Penable-integration-tests -DtrimStackTrace=false -Dclirr.skip=true -Denforcer.skip=true -fae verify
26+
env:
27+
JOB_TYPE: test
28+
SPANNER_EMULATOR_HOST: localhost:9010
29+
GOOGLE_CLOUD_PROJECT: emulator-test-project

.kokoro/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ retry_with_backoff 3 10 \
3939

4040
# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
4141
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
42-
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS})
42+
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
4343
fi
4444

4545
RETURN_CODE=0

.kokoro/continuous/samples/common.cfg

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "JOB_TYPE"
5+
value: "samples"
6+
}
7+
8+
env_vars: {
9+
key: "GCLOUD_PROJECT"
10+
value: "gcloud-devel"
11+
}
12+
13+
env_vars: {
14+
key: "GOOGLE_APPLICATION_CREDENTIALS"
15+
value: "keystore/73713_java_it_service_account"
16+
}
17+
18+
before_action {
19+
fetch_keystore {
20+
keystore_resource {
21+
keystore_config_id: 73713
22+
keyname: "java_it_service_account"
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}

.kokoro/dependencies.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
4141
## Run dependency list completeness check
4242
function completenessCheck() {
4343
# Output dep list with compile scope generated using the original pom
44+
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
45+
# This is stripped from the output as it is not present in the flattened pom.
4446
msg "Generating dependency list using original pom..."
45-
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | grep -v ':test$' >.org-list.txt
47+
mvn dependency:list -f pom.xml -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// | grep -v ':test$' >.org-list.txt
4648

4749
# Output dep list generated using the flattened pom (test scope deps are ommitted)
4850
msg "Generating dependency list using flattened pom..."

.kokoro/nightly/integration.cfg

+4-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,10 @@ env_vars: {
2828

2929
env_vars: {
3030
key: "GOOGLE_APPLICATION_CREDENTIALS"
31-
value: "keystore/73713_java_it_service_account"
31+
value: "secret_manager/java-it-service-account"
3232
}
3333

34-
before_action {
35-
fetch_keystore {
36-
keystore_resource {
37-
keystore_config_id: 73713
38-
keyname: "java_it_service_account"
39-
}
40-
}
34+
env_vars: {
35+
key: "SECRET_MANAGER_KEYS"
36+
value: "java-it-service-account"
4137
}

.kokoro/nightly/samples.cfg

+6-10
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,15 @@ env_vars: {
2424

2525
env_vars: {
2626
key: "GOOGLE_APPLICATION_CREDENTIALS"
27-
value: "keystore/73713_java_it_service_account"
27+
value: "secret_manager/java-docs-samples-service-account"
2828
}
2929

3030
env_vars: {
31-
key: "ENABLE_BUILD_COP"
32-
value: "true"
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-docs-samples-service-account"
3333
}
3434

35-
before_action {
36-
fetch_keystore {
37-
keystore_resource {
38-
keystore_config_id: 73713
39-
keyname: "java_it_service_account"
40-
}
41-
}
35+
env_vars: {
36+
key: "ENABLE_BUILD_COP"
37+
value: "true"
4238
}

.kokoro/nightly/samples/common.cfg

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "JOB_TYPE"
5+
value: "samples"
6+
}
7+
8+
# TODO: remove this after we've migrated all tests and scripts
9+
env_vars: {
10+
key: "GCLOUD_PROJECT"
11+
value: "java-docs-samples-testing"
12+
}
13+
14+
env_vars: {
15+
key: "GOOGLE_CLOUD_PROJECT"
16+
value: "java-docs-samples-testing"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_APPLICATION_CREDENTIALS"
21+
value: "secret_manager/java-docs-samples-service-account"
22+
}
23+
24+
env_vars: {
25+
key: "SECRET_MANAGER_KEYS"
26+
value: "java-docs-samples-service-account"
27+
}
28+
29+
env_vars: {
30+
key: "ENABLE_BUILD_COP"
31+
value: "true"
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}

.kokoro/populate-secrets.sh

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash
2+
# Copyright 2020 Google LLC.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -eo pipefail
17+
18+
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
19+
function msg { println "$*" >&2 ;}
20+
function println { printf '%s\n' "$(now) $*" ;}
21+
22+
23+
# Populates requested secrets set in SECRET_MANAGER_KEYS from service account:
24+
# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com
25+
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
26+
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
27+
mkdir -p ${SECRET_LOCATION}
28+
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
29+
do
30+
msg "Retrieving secret ${key}"
31+
docker run --entrypoint=gcloud \
32+
--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \
33+
gcr.io/google.com/cloudsdktool/cloud-sdk \
34+
secrets versions access latest \
35+
--project cloud-devrel-kokoro-resources \
36+
--secret ${key} > \
37+
"${SECRET_LOCATION}/${key}"
38+
if [[ $? == 0 ]]; then
39+
msg "Secret written to ${SECRET_LOCATION}/${key}"
40+
else
41+
msg "Error retrieving secret ${key}"
42+
fi
43+
done

.kokoro/presubmit/integration.cfg

+4-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ env_vars: {
2424

2525
env_vars: {
2626
key: "GOOGLE_APPLICATION_CREDENTIALS"
27-
value: "keystore/73713_java_it_service_account"
27+
value: "secret_manager/java-it-service-account"
2828
}
2929

30-
before_action {
31-
fetch_keystore {
32-
keystore_resource {
33-
keystore_config_id: 73713
34-
keyname: "java_it_service_account"
35-
}
36-
}
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
3733
}

.kokoro/presubmit/samples.cfg

+5-9
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,10 @@ env_vars: {
2424

2525
env_vars: {
2626
key: "GOOGLE_APPLICATION_CREDENTIALS"
27-
value: "keystore/73713_java_it_service_account"
27+
value: "secret_manager/java-docs-samples-service-account"
2828
}
2929

30-
before_action {
31-
fetch_keystore {
32-
keystore_resource {
33-
keystore_config_id: 73713
34-
keyname: "java_it_service_account"
35-
}
36-
}
37-
}
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-docs-samples-service-account"
33+
}

.kokoro/presubmit/samples/common.cfg

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
env_vars: {
4+
key: "JOB_TYPE"
5+
value: "samples"
6+
}
7+
8+
# TODO: remove this after we've migrated all tests and scripts
9+
env_vars: {
10+
key: "GCLOUD_PROJECT"
11+
value: "java-docs-samples-testing"
12+
}
13+
14+
env_vars: {
15+
key: "GOOGLE_CLOUD_PROJECT"
16+
value: "java-docs-samples-testing"
17+
}
18+
19+
env_vars: {
20+
key: "GOOGLE_APPLICATION_CREDENTIALS"
21+
value: "secret_manager/java-docs-samples-service-account"
22+
}
23+
24+
env_vars: {
25+
key: "SECRET_MANAGER_KEYS"
26+
value: "java-docs-samples-service-account"
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java11"
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-kokoro-resources/java8"
7+
}

.kokoro/trampoline.sh

+2
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ function cleanup() {
2121
echo "cleanup";
2222
}
2323
trap cleanup EXIT
24+
25+
$(dirname $0)/populate-secrets.sh # Secret Manager secrets.
2426
python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py"

CHANGELOG.md

+52
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,57 @@
11
# Changelog
22

3+
## [1.58.0](https://github.com/googleapis/java-spanner/compare/v1.57.0...v1.58.0) (2020-07-07)
4+
5+
6+
### Features
7+
8+
* add async api ([#81](https://github.com/googleapis/java-spanner/issues/81)) ([462839b](https://github.com/googleapis/java-spanner/commit/462839b625e58e235581b8ba10b398e1d222eaaf))
9+
* support setting compression option ([#192](https://github.com/googleapis/java-spanner/issues/192)) ([965e95e](https://github.com/googleapis/java-spanner/commit/965e95e70ccd9c62abd6513b0011aab136e48e26))
10+
11+
12+
### Bug Fixes
13+
14+
* set default values for streaming retry ([#316](https://github.com/googleapis/java-spanner/issues/316)) ([543373b](https://github.com/googleapis/java-spanner/commit/543373b22336be72b10026fda9f0b55939ab94b4))
15+
16+
17+
### Performance Improvements
18+
19+
* use streaming RPC for PDML ([#287](https://github.com/googleapis/java-spanner/issues/287)) ([df47c13](https://github.com/googleapis/java-spanner/commit/df47c13a4c00bdf5e6eafa01bbb64c12a96d7fb8))
20+
21+
22+
### Dependencies
23+
24+
* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.8.2 ([#315](https://github.com/googleapis/java-spanner/issues/315)) ([3d6fb9f](https://github.com/googleapis/java-spanner/commit/3d6fb9fd7dc6b2b5b2ff9935228701ac795c9167))
25+
26+
## [1.57.0](https://github.com/googleapis/java-spanner/compare/v1.56.0...v1.57.0) (2020-06-29)
27+
28+
29+
### Features
30+
31+
* **deps:** adopt flatten plugin and google-cloud-shared-dependencies and update ExecutorProvider ([#302](https://github.com/googleapis/java-spanner/issues/302)) ([5aef6c3](https://github.com/googleapis/java-spanner/commit/5aef6c3f6d3e9564cb8728ad51718feb6b64475a))
32+
33+
## [1.56.0](https://github.com/googleapis/java-spanner/compare/v1.55.1...v1.56.0) (2020-06-17)
34+
35+
36+
### Features
37+
38+
* add num_sessions_in_pool metric ([#128](https://github.com/googleapis/java-spanner/issues/128)) ([3a7a8ad](https://github.com/googleapis/java-spanner/commit/3a7a8ad79f1de3371d32a1298406990cb7bbf5be))
39+
40+
41+
### Bug Fixes
42+
43+
* backend now supports optimizer version for DML ([#252](https://github.com/googleapis/java-spanner/issues/252)) ([24b986b](https://github.com/googleapis/java-spanner/commit/24b986b03a785f4c5ee978dcdc57f51687701e52))
44+
* include an explicit version for javax-annotations-api ([#261](https://github.com/googleapis/java-spanner/issues/261)) ([e256d22](https://github.com/googleapis/java-spanner/commit/e256d22f33d5f091ea90ed81c0b0f8600beae96c))
45+
* inconsistent json and yaml spanner configs ([#238](https://github.com/googleapis/java-spanner/issues/238)) ([627fdc1](https://github.com/googleapis/java-spanner/commit/627fdc13d64ab7b51934d4866ff753f7b08dabe4))
46+
* test allowed a too old staleness ([#214](https://github.com/googleapis/java-spanner/issues/214)) ([f4fa6bf](https://github.com/googleapis/java-spanner/commit/f4fa6bfca4bb821cbda426c4cb7bf32f091a2913))
47+
* use millis to prevent rounding errors ([#260](https://github.com/googleapis/java-spanner/issues/260)) ([22ed458](https://github.com/googleapis/java-spanner/commit/22ed45816098f5e50104935b66bc55297ea7f7b7))
48+
49+
50+
### Dependencies
51+
52+
* include test-jar in bom ([#253](https://github.com/googleapis/java-spanner/issues/253)) ([4e86a37](https://github.com/googleapis/java-spanner/commit/4e86a374aacbcfc34d64809b7d9606f21176f6b9))
53+
* update dependency org.json:json to v20200518 ([#239](https://github.com/googleapis/java-spanner/issues/239)) ([e3d7921](https://github.com/googleapis/java-spanner/commit/e3d79214ac4d6e72992acdddb7ddeb2148b1ae15))
54+
355
### [1.55.1](https://github.com/googleapis/java-spanner/compare/v1.55.0...v1.55.1) (2020-05-21)
456

557

0 commit comments

Comments
 (0)