Skip to content

Commit 6bdfb23

Browse files
authored
Merge branch 'main' into enable_launched_types_in_tests
2 parents 9746d61 + 1afd815 commit 6bdfb23

File tree

75 files changed

+4066
-1041
lines changed

Some content is hidden

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

75 files changed

+4066
-1041
lines changed

.kokoro/build.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ integration)
9898
-Dclirr.skip=true \
9999
-Denforcer.skip=true \
100100
-Dmaven.main.skip=true \
101-
-Dspanner.gce.config.project_id=gcloud-devel \
102-
-Dspanner.testenv.instance=projects/gcloud-devel/instances/java-client-integration-tests \
101+
-Dspanner.gce.config.server_url=https://staging-wrenchworks.sandbox.googleapis.com \
102+
-Dspanner.gce.config.project_id=span-cloud-testing \
103+
-Dspanner.testenv.instance=projects/span-cloud-testing/instances/java-client-integration-tests \
103104
-fae \
104105
verify
105106
RETURN_CODE=$?
@@ -113,6 +114,7 @@ integration-directpath-enabled)
113114
-Dclirr.skip=true \
114115
-Denforcer.skip=true \
115116
-Dmaven.main.skip=true \
117+
-Dspanner.gce.config.server_url=https://staging-wrenchworks.sandbox.googleapis.com \
116118
-Dspanner.testenv.instance=projects/span-cloud-testing/instances/spanner-java-client-directpath \
117119
-Dspanner.gce.config.project_id=span-cloud-testing \
118120
-fae \
@@ -128,8 +130,9 @@ integration-multiplexed-sessions-enabled)
128130
-Dclirr.skip=true \
129131
-Denforcer.skip=true \
130132
-Dmaven.main.skip=true \
131-
-Dspanner.gce.config.project_id=gcloud-devel \
132-
-Dspanner.testenv.instance=projects/gcloud-devel/instances/java-client-integration-tests-multiplexed-sessions \
133+
-Dspanner.gce.config.server_url=https://staging-wrenchworks.sandbox.googleapis.com \
134+
-Dspanner.gce.config.project_id=span-cloud-testing \
135+
-Dspanner.testenv.instance=projects/span-cloud-testing/instances/java-client-integration-tests-multiplexed-sessions \
133136
-fae \
134137
verify
135138
RETURN_CODE=$?

.kokoro/presubmit/integration-directpath-enabled.cfg

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,6 @@ env_vars: {
1111
value: "integration-directpath-enabled"
1212
}
1313

14-
# TODO: remove this after we've migrated all tests and scripts
15-
env_vars: {
16-
key: "GCLOUD_PROJECT"
17-
value: "gcloud-devel"
18-
}
19-
20-
env_vars: {
21-
key: "GOOGLE_CLOUD_PROJECT"
22-
value: "gcloud-devel"
23-
}
24-
2514
env_vars: {
2615
key: "GOOGLE_APPLICATION_CREDENTIALS"
2716
value: "secret_manager/java-client-testing"

.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,14 @@ env_vars: {
1111
value: "integration-multiplexed-sessions-enabled"
1212
}
1313

14-
# TODO: remove this after we've migrated all tests and scripts
15-
env_vars: {
16-
key: "GCLOUD_PROJECT"
17-
value: "gcloud-devel"
18-
}
19-
20-
env_vars: {
21-
key: "GOOGLE_CLOUD_PROJECT"
22-
value: "gcloud-devel"
23-
}
24-
2514
env_vars: {
2615
key: "GOOGLE_APPLICATION_CREDENTIALS"
27-
value: "secret_manager/java-it-service-account"
16+
value: "secret_manager/java-client-testing"
2817
}
2918

3019
env_vars: {
3120
key: "SECRET_MANAGER_KEYS"
32-
value: "java-it-service-account"
21+
value: "java-client-testing"
3322
}
3423

3524
env_vars: {

.kokoro/presubmit/integration.cfg

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,12 @@ env_vars: {
1111
value: "integration"
1212
}
1313

14-
# TODO: remove this after we've migrated all tests and scripts
15-
env_vars: {
16-
key: "GCLOUD_PROJECT"
17-
value: "gcloud-devel"
18-
}
19-
20-
env_vars: {
21-
key: "GOOGLE_CLOUD_PROJECT"
22-
value: "gcloud-devel"
23-
}
24-
2514
env_vars: {
2615
key: "GOOGLE_APPLICATION_CREDENTIALS"
27-
value: "secret_manager/java-it-service-account"
16+
value: "secret_manager/java-client-testing"
2817
}
2918

3019
env_vars: {
3120
key: "SECRET_MANAGER_KEYS"
32-
value: "java-it-service-account"
21+
value: "java-client-testing"
3322
}
34-

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>libraries-bom</artifactId>
22-
<version>26.54.0</version>
22+
<version>26.57.0</version>
2323
<type>pom</type>
2424
<scope>import</scope>
2525
</dependency>
@@ -525,6 +525,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-spanner/tree/
525525
| Create Sequence Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateSequenceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateSequenceSample.java) |
526526
| Create Table With Foreign Key Delete Cascade Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateTableWithForeignKeyDeleteCascadeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateTableWithForeignKeyDeleteCascadeSample.java) |
527527
| Custom Timeout And Retry Settings Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CustomTimeoutAndRetrySettingsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CustomTimeoutAndRetrySettingsExample.java) |
528+
| Database Add Split Points Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DatabaseAddSplitPointsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DatabaseAddSplitPointsSample.java) |
528529
| Delete Backup Schedule Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DeleteBackupScheduleSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DeleteBackupScheduleSample.java) |
529530
| Delete Instance Config Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DeleteInstanceConfigSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DeleteInstanceConfigSample.java) |
530531
| Delete Using Dml Returning Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DeleteUsingDmlReturningSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DeleteUsingDmlReturningSample.java) |

google-cloud-spanner/clirr-ignored-differences.xml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -597,16 +597,6 @@
597597
<className>com/google/cloud/spanner/StructReader</className>
598598
<method>java.util.List getIntervalList(java.lang.String)</method>
599599
</difference>
600-
<difference>
601-
<differenceType>7013</differenceType>
602-
<className>com/google/cloud/spanner/AbstractStructReader</className>
603-
<method>com.google.cloud.spanner.Interval getIntervalInternal(int)</method>
604-
</difference>
605-
<difference>
606-
<differenceType>7013</differenceType>
607-
<className>com/google/cloud/spanner/AbstractStructReader</className>
608-
<method>java.util.List getIntervalListInternal(int)</method>
609-
</difference>
610600
<difference>
611601
<differenceType>7013</differenceType>
612602
<className>com/google/cloud/spanner/Value</className>
@@ -937,5 +927,27 @@
937927
<className>com/google/cloud/spanner/connection/ConnectionOptions</className>
938928
<field>VALID_PROPERTIES</field>
939929
</difference>
940-
930+
931+
<!-- Remove supportsExplain() from the parser -->
932+
<difference>
933+
<differenceType>7002</differenceType>
934+
<className>com/google/cloud/spanner/connection/AbstractStatementParser</className>
935+
<method>boolean supportsExplain()</method>
936+
</difference>
937+
<difference>
938+
<differenceType>7002</differenceType>
939+
<className>com/google/cloud/spanner/connection/PostgreSQLStatementParser</className>
940+
<method>boolean supportsExplain()</method>
941+
</difference>
942+
<difference>
943+
<differenceType>7002</differenceType>
944+
<className>com/google/cloud/spanner/connection/SpannerStatementParser</className>
945+
<method>boolean supportsExplain()</method>
946+
</difference>
947+
948+
<difference>
949+
<differenceType>7012</differenceType>
950+
<className>com/google/cloud/spanner/DatabaseClient</className>
951+
<method>com.google.cloud.spanner.Statement$StatementFactory getStatementFactory()</method>
952+
</difference>
941953
</differences>

google-cloud-spanner/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,19 @@
517517
</execution>
518518
</executions>
519519
</plugin>
520+
<plugin>
521+
<groupId>org.apache.maven.plugins</groupId>
522+
<artifactId>maven-compiler-plugin</artifactId>
523+
<configuration>
524+
<annotationProcessorPaths>
525+
<path>
526+
<groupId>org.openjdk.jmh</groupId>
527+
<artifactId>jmh-generator-annprocess</artifactId>
528+
<version>1.37</version>
529+
</path>
530+
</annotationProcessorPaths>
531+
</configuration>
532+
</plugin>
520533
</plugins>
521534
</build>
522535
</profile>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbortedException.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,17 @@ public class AbortedException extends SpannerException {
3535
/** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */
3636
AbortedException(
3737
DoNotConstructDirectly token, @Nullable String message, @Nullable Throwable cause) {
38-
this(token, message, cause, null);
38+
this(token, message, cause, null, null);
3939
}
4040

4141
/** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */
4242
AbortedException(
4343
DoNotConstructDirectly token,
4444
@Nullable String message,
4545
@Nullable Throwable cause,
46-
@Nullable ApiException apiException) {
47-
super(token, ErrorCode.ABORTED, IS_RETRYABLE, message, cause, apiException);
46+
@Nullable ApiException apiException,
47+
@Nullable XGoogSpannerRequestId reqId) {
48+
super(token, ErrorCode.ABORTED, IS_RETRYABLE, message, cause, apiException, reqId);
4849
}
4950

5051
/**

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AbstractStructReader.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ protected String getPgJsonbInternal(int columnIndex) {
6767

6868
protected abstract Date getDateInternal(int columnIndex);
6969

70-
protected abstract Interval getIntervalInternal(int columnIndex);
70+
protected Interval getIntervalInternal(int columnIndex) {
71+
throw new UnsupportedOperationException("Not implemented");
72+
}
7173

7274
protected <T extends AbstractMessage> T getProtoMessageInternal(int columnIndex, T message) {
7375
throw new UnsupportedOperationException("Not implemented");
@@ -130,7 +132,9 @@ protected List<String> getPgJsonbListInternal(int columnIndex) {
130132

131133
protected abstract List<Date> getDateListInternal(int columnIndex);
132134

133-
protected abstract List<Interval> getIntervalListInternal(int columnIndex);
135+
protected List<Interval> getIntervalListInternal(int columnIndex) {
136+
throw new UnsupportedOperationException("Not implemented");
137+
}
134138

135139
protected abstract List<Struct> getStructListInternal(int columnIndex);
136140

google-cloud-spanner/src/main/java/com/google/cloud/spanner/AdminRequestsPerMinuteExceededException.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ public class AdminRequestsPerMinuteExceededException extends SpannerException {
3232
/** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */
3333
AdminRequestsPerMinuteExceededException(
3434
DoNotConstructDirectly token, @Nullable String message, @Nullable Throwable cause) {
35-
this(token, message, cause, null);
35+
this(token, message, cause, null, null);
3636
}
3737

3838
/** Private constructor. Use {@link SpannerExceptionFactory} to create instances. */
3939
AdminRequestsPerMinuteExceededException(
4040
DoNotConstructDirectly token,
4141
@Nullable String message,
4242
@Nullable Throwable cause,
43-
@Nullable ApiException apiException) {
44-
super(token, ErrorCode.RESOURCE_EXHAUSTED, true, message, cause, apiException);
43+
@Nullable ApiException apiException,
44+
@Nullable XGoogSpannerRequestId reqId) {
45+
super(token, ErrorCode.RESOURCE_EXHAUSTED, true, message, cause, apiException, reqId);
4546
}
4647
}

0 commit comments

Comments
 (0)