Skip to content

Commit

Permalink
feat: add support for new cloud client test framework in google-cloud…
Browse files Browse the repository at this point in the history
…-spanner-executor (#2217)

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Fix error code mapping.

* Remove read_timestamp field in read result as it will never use it.(for optimistic only)

* Mark all fields in spanner action outcome as optional.

* Refactored existing protos according to api dev lint.
Prepare new protos for existing executor features.

* Added DML/batch DML/query features.
Commented out Batch txns and change stream for future support.

* Added support to Write.

* Update batch txn related protos.

* Add support for batch txn feature.

* Add metadata for batch read.
Prepare protos for change stream.

* Implement the support for change stream.

* Update change stream proto fields.

* Fix create cloud backup bug.

* Fix numeric related issue.
Fix partition token.
Fix request index for batch read.

* Make all calls to streamObserver synchronized to prevent concurrency issue. This is achieved by wrapping streamObserver into executionFlowContext and make all the calls synchronized.

* Rebase onto java-spanner changes.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Add Spanner executor proto and implementation for Read/Mutation and admin actions.

* Fix error code mapping.

* Remove read_timestamp field in read result as it will never use it.(for optimistic only)

* Mark all fields in spanner action outcome as optional.

* Refactored existing protos according to api dev lint.
Prepare new protos for existing executor features.

* Added DML/batch DML/query features.
Commented out Batch txns and change stream for future support.

* Added support to Write.

* Update batch txn related protos.

* Add support for batch txn feature.

* Add metadata for batch read.
Prepare protos for change stream.

* Implement the support for change stream.

* Update change stream proto fields.

* Fix create cloud backup bug.

* Fix numeric related issue.
Fix partition token.
Fix request index for batch read.

* Make all calls to streamObserver synchronized to prevent concurrency issue. This is achieved by wrapping streamObserver into executionFlowContext and make all the calls synchronized.

* Replaces protos with the final released version.

* Apply maven-protobuf-plugin to generate grpc stubs, remove grpc folder for executor proto.
Add key file option to client creation.

* Remove partitionTestUtil since partitionToken can be fetched now.

* Remove partitionTestUtil since partitionToken can be fetched now.

* Cleanup.

* Fix pageToken for all the list operations.
Reformat code.

* Rephrase some comments.
Add createUserInstanceConfig and deleteUserInstanceConfig.
Fix instanceConfig conversion issue.

* Fix key flag issue.
Fix replicas in createUserInstanceConfig.

* Fix some admin actions regarding instanceId args.

* Remove unused stuff in metadata.
Fix numeric key issue.

* Remove debug message.

* Remove debug message.

* Update build files to accommodate with proto dependency changes.

* Update pom file.

* Update pom file.

* fix: update comments

* fix: clean up dependencies.

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: addressed comments.

* 🦉 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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gyang-google and gcf-owl-bot[bot] authored Jan 10, 2023
1 parent d5372e6 commit d75ebc1
Show file tree
Hide file tree
Showing 12 changed files with 4,527 additions and 0 deletions.
5 changes: 5 additions & 0 deletions google-cloud-spanner-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
<artifactId>google-cloud-spanner</artifactId>
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-executor</artifactId>
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner-executor:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
Expand Down
27 changes: 27 additions & 0 deletions google-cloud-spanner-executor/assembly-descriptor.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
<id>jar-with-dependencies</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>false</useProjectArtifact>
<unpack>true</unpack>
<unpackOptions>
<excludes>
<exclude>io.grpc.LoadBalancerProvider</exclude>
</excludes>
</unpackOptions>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
<outputDirectory>.</outputDirectory>
</fileSet>
</fileSets>
</assembly>
165 changes: 165 additions & 0 deletions google-cloud-spanner-executor/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-executor</artifactId>
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner-executor:current} -->
<packaging>jar</packaging>
<name>Google Cloud Spanner Executor</name>

<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-parent</artifactId>
<version>6.34.2-SNAPSHOT</version><!-- {x-version-update:google-cloud-spanner:current} -->
</parent>

<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-api</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty-shaded</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>api-common</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-admin-instance-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-admin-database-v1</artifactId>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-spanner-executor-v1</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax</artifactId>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</dependency>
<dependency>
<groupId>org.threeten</groupId>
<artifactId>threetenbp</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-credentials</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>google-spanner-cloud-executor</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<descriptors>
<descriptor>assembly-descriptor.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass>com.google.cloud.executor.spanner.WorkerProxy</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
</plugins>
</build>
</project>
Loading

0 comments on commit d75ebc1

Please sign in to comment.