Repository: googleapis/java-datastore
Pull request #506 (2021-08-20 21:00:20)

feat: Change checksum algorithm to CRC32C. And localize checksum handling t…
…o one file.



Patch:
diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index b2d114f2..250e22d8 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,14 +4,14 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-datastore.git",
-        "sha": "60a95791ffe048e87fa6b0ad2c43bbc1b1838a24"
+        "sha": "b1932d97b8263c2bcfdf31179bb5705988d8d516"
       }
     },
     {
       "git": {
         "name": "synthtool",
         "remote": "https://github.com/googleapis/synthtool.git",
-        "sha": "9a238a0623879c3de129a376c6085d4a862f6eb9"
+        "sha": "17ee6e5c08f2eb47029beee4776ce990e56b3925"
       }
     }
   ]
diff --git a/.github/readme/synth.py b/.github/readme/synth.py
deleted file mode 100644
index 7b48cc28..00000000
--- a/.github/readme/synth.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-"""This script is used to synthesize generated the README for this library."""
-
-from synthtool.languages import java
-
-java.custom_templates(["java_library/README.md"])
diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml
index f247d5c7..a0ba1f7d 100644
--- a/.github/trusted-contribution.yml
+++ b/.github/trusted-contribution.yml
@@ -1,2 +1,3 @@
 trustedContributors:
-- renovate-bot
\ No newline at end of file
+- renovate-bot
+- gcf-owl-bot[bot]
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index d510359d..3becb5c0 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -12,6 +12,9 @@ jobs:
         java: [8, 11]
     steps:
     - uses: actions/checkout@v2
+    - uses: stCarolas/setup-maven@v4
+      with:
+        maven-version: 3.8.1
     - uses: actions/setup-java@v1
       with:
         java-version: ${{matrix.java}}
@@ -23,6 +26,9 @@ jobs:
     runs-on: windows-latest
     steps:
     - uses: actions/checkout@v2
+    - uses: stCarolas/setup-maven@v4
+      with:
+        maven-version: 3.8.1
     - uses: actions/setup-java@v1
       with:
         java-version: 8
@@ -37,6 +43,9 @@ jobs:
         java: [8, 11]
     steps:
     - uses: actions/checkout@v2
+    - uses: stCarolas/setup-maven@v4
+      with:
+        maven-version: 3.8.1
     - uses: actions/setup-java@v1
       with:
         java-version: ${{matrix.java}}
@@ -46,6 +55,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v2
+    - uses: stCarolas/setup-maven@v4
+      with:
+        maven-version: 3.8.1
     - uses: actions/setup-java@v1
       with:
         java-version: 8
@@ -57,6 +69,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v2
+    - uses: stCarolas/setup-maven@v4
+      with:
+        maven-version: 3.8.1
     - uses: actions/setup-java@v1
       with:
         java-version: 8
diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg
deleted file mode 100644
index 8df31c59..00000000
--- a/.kokoro/continuous/readme.cfg
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 2020 Google LLC
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Format: //devtools/kokoro/config/proto/build.proto
-
-env_vars: {
-  key: "TRAMPOLINE_IMAGE"
-  value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
-}
-
-env_vars: {
-  key: "TRAMPOLINE_BUILD_FILE"
-  value: "github/java-datastore/.kokoro/readme.sh"
-}
-
-# Build logs will be here
-action {
-  define_artifacts {
-    regex: "**/*sponge_log.xml"
-    regex: "**/*sponge_log.log"
-  }
-}
-
-# The github token is stored here.
-before_action {
-  fetch_keystore {
-    keystore_resource {
-      keystore_config_id: 73713
-      keyname: "yoshi-automation-github-key"
-      # TODO(theacodes): remove this after secrets have globally propagated
-      backend_type: FASTCONFIGPUSH
-    }
-  }
-}
-
-# Common env vars for all repositories and builds.
-env_vars: {
-    key: "GITHUB_USER"
-    value: "yoshi-automation"
-}
-env_vars: {
-    key: "GITHUB_EMAIL"
-    value: "yoshi-automation@google.com"
-}
diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh
index 6e3f6599..7f78ee41 100755
--- a/.kokoro/release/common.sh
+++ b/.kokoro/release/common.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh
index 5c4551ef..742ec1a8 100755
--- a/.kokoro/release/drop.sh
+++ b/.kokoro/release/drop.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh
index 1fa95fa5..3cac3d8a 100755
--- a/.kokoro/release/promote.sh
+++ b/.kokoro/release/promote.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh
index 18b3da58..89872968 100755
--- a/.kokoro/release/publish_javadoc.sh
+++ b/.kokoro/release/publish_javadoc.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2019 Google Inc.
+# Copyright 2019 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh
index 4a661986..b3887101 100755
--- a/.kokoro/release/publish_javadoc11.sh
+++ b/.kokoro/release/publish_javadoc11.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2021 Google Inc.
+# Copyright 2021 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh
index 8a103384..77dc4e8f 100755
--- a/.kokoro/release/stage.sh
+++ b/.kokoro/release/stage.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh
index 9da0f839..8b69b793 100644
--- a/.kokoro/trampoline.sh
+++ b/.kokoro/trampoline.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2018 Google Inc.
+# Copyright 2018 Google LLC
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b4bc7af..a17b52c1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,31 @@
 # Changelog
 
+### [2.1.2](https://www.github.com/googleapis/java-datastore/compare/v2.1.1...v2.1.2) (2021-09-22)
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#543](https://www.github.com/googleapis/java-datastore/issues/543)) ([3d1a18a](https://www.github.com/googleapis/java-datastore/commit/3d1a18a984ec9c0610c0d10e720ea06fe2369695))
+
+### [2.1.1](https://www.github.com/googleapis/java-datastore/compare/v2.1.0...v2.1.1) (2021-09-14)
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#536](https://www.github.com/googleapis/java-datastore/issues/536)) ([b9b0e79](https://www.github.com/googleapis/java-datastore/commit/b9b0e79f6510311666b1ba442cab124d9c6c547f))
+
+## [2.1.0](https://www.github.com/googleapis/java-datastore/compare/v2.0.3...v2.1.0) (2021-08-31)
+
+
+### Features
+
+* support overriding the emulator download URL in LocalDatastoreHelper ([#492](https://www.github.com/googleapis/java-datastore/issues/492)) ([76397bf](https://www.github.com/googleapis/java-datastore/commit/76397bf7ce27804101a1622e82f436cac0dcd605)), closes [#376](https://www.github.com/googleapis/java-datastore/issues/376)
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#524](https://www.github.com/googleapis/java-datastore/issues/524)) ([81b9de5](https://www.github.com/googleapis/java-datastore/commit/81b9de5b8bc6e788618b2530a9f47ca97aa30d98))
+
 ### [2.0.3](https://www.github.com/googleapis/java-datastore/compare/v2.0.2...v2.0.3) (2021-08-24)
 
 
diff --git a/README.md b/README.md
index 466574ff..cdb33ce1 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
     <dependency>
       <groupId>com.google.cloud</groupId>
       <artifactId>libraries-bom</artifactId>
-      <version>22.0.0</version>
+      <version>23.0.0</version>
       <type>pom</type>
       <scope>import</scope>
     </dependency>
@@ -41,7 +41,7 @@ If you are using Maven without BOM, add this to your dependencies:
 <dependency>
   <groupId>com.google.cloud</groupId>
   <artifactId>google-cloud-datastore</artifactId>
-  <version>2.0.3</version>
+  <version>2.1.0</version>
 </dependency>
 
 ```
@@ -49,20 +49,20 @@ If you are using Maven without BOM, add this to your dependencies:
 If you are using Gradle 5.x or later, add this to your dependencies
 
 ```Groovy
-implementation platform('com.google.cloud:libraries-bom:22.0.0')
+implementation platform('com.google.cloud:libraries-bom:23.0.0')
 
 implementation 'com.google.cloud:google-cloud-datastore'
 ```
 If you are using Gradle without BOM, add this to your dependencies
 
 ```Groovy
-implementation 'com.google.cloud:google-cloud-datastore:2.0.3'
+implementation 'com.google.cloud:google-cloud-datastore:2.1.0'
 ```
 
 If you are using SBT, add this to your dependencies
 
 ```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.0.3"
+libraryDependencies += "com.google.cloud" % "google-cloud-datastore" % "2.1.0"
 ```
 
 ## Authentication
diff --git a/datastore-v1-proto-client/pom.xml b/datastore-v1-proto-client/pom.xml
index a78ed634..b44aed20 100644
--- a/datastore-v1-proto-client/pom.xml
+++ b/datastore-v1-proto-client/pom.xml
@@ -19,12 +19,12 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.cloud.datastore</groupId>
   <artifactId>datastore-v1-proto-client</artifactId>
-  <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
+  <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
 
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-datastore-parent</artifactId>
-    <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
+    <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
   </parent>
 
   <packaging>jar</packaging>
diff --git a/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/ChecksumEnforcingInputStream.java b/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/ChecksumEnforcingInputStream.java
index 2b967491..0b91f18e 100644
--- a/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/ChecksumEnforcingInputStream.java
+++ b/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/ChecksumEnforcingInputStream.java
@@ -19,25 +19,22 @@ import com.google.api.client.http.HttpResponse;
 import com.google.common.annotations.VisibleForTesting;
 import java.io.IOException;
 import java.io.InputStream;
-import java.security.MessageDigest;
 
 /** This class provides End-to-End Checksum API for http protocol. */
 class ChecksumEnforcingInputStream extends InputStream {
   private final InputStream delegate;
-  private final MessageDigest messageDigest;
+  private final EndToEndChecksumHandler endToEndChecksumHandler;
   private final String expectedChecksum;
 
-  ChecksumEnforcingInputStream(
-      InputStream originalInputStream, HttpResponse response, MessageDigest digest) {
-    this(originalInputStream, EndToEndChecksumHandler.getChecksumHeader(response), digest);
+  ChecksumEnforcingInputStream(InputStream originalInputStream, HttpResponse response) {
+    this(originalInputStream, EndToEndChecksumHandler.getChecksumHeader(response));
   }
 
   @VisibleForTesting
-  ChecksumEnforcingInputStream(
-      InputStream originalInputStream, String checksum, MessageDigest digest) {
+  ChecksumEnforcingInputStream(InputStream originalInputStream, String checksum) {
     delegate = originalInputStream;
     expectedChecksum = checksum;
-    messageDigest = digest;
+    endToEndChecksumHandler = new EndToEndChecksumHandler();
   }
 
   @Override
@@ -76,11 +73,10 @@ class ChecksumEnforcingInputStream extends InputStream {
     if (len <= 0) return 0;
     int i = delegate.read(b, off, len);
     if (i > 0) {
-      messageDigest.update(b, off, i);
+      endToEndChecksumHandler.update(b, off, i);
     } else {
       // no more payload to read. compute checksum and verify
-      if (!expectedChecksum.equalsIgnoreCase(
-          com.google.common.io.BaseEncoding.base16().encode(messageDigest.digest()))) {
+      if (!expectedChecksum.equalsIgnoreCase(endToEndChecksumHandler.hash())) {
         throw new IOException("possible memory corruption on payload detected");
       }
     }
diff --git a/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/EndToEndChecksumHandler.java b/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/EndToEndChecksumHandler.java
index 06d08d49..01aa303c 100644
--- a/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/EndToEndChecksumHandler.java
+++ b/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/EndToEndChecksumHandler.java
@@ -16,8 +16,9 @@
 package com.google.datastore.v1.client;
 
 import com.google.api.client.http.HttpResponse;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
+import com.google.common.hash.HashCode;
+import com.google.common.hash.Hasher;
+import com.google.common.hash.Hashing;
 
 /** This class provides End-to-End Checksum API for http protocol. */
 class EndToEndChecksumHandler {
@@ -25,22 +26,25 @@ class EndToEndChecksumHandler {
   static final String HTTP_REQUEST_CHECKSUM_HEADER = "x-request-checksum-348659783";
   /** The checksum http header on http responses */
   static final String HTTP_RESPONSE_CHECKSUM_HEADER = "x-response-checksum-348659783";
-  /** Algorithm used for checksum */
-  private static final String MD5 = "MD5";
+
+  final Hasher hasher = EndToEndChecksumHandler.getNewCrc32cHasher();
 
   /**
    * Create and return checksum as a string value for the input 'bytes'.
    *
    * @param bytes raw message for which the checksum is being computed
    * @return computed checksum as a hex string
-   * @throws RuntimeException if MD5 Algorithm is not found in the VM
    */
   static String computeChecksum(byte[] bytes) {
     if (bytes == null || (bytes.length == 0)) {
       return null;
     }
-    return com.google.common.io.BaseEncoding.base16()
-        .encode(getMessageDigestInstance().digest(bytes));
+    HashCode hc = getNewCrc32cHasher().putBytes(bytes).hash();
+    return hc.toString();
+  }
+
+  private static Hasher getNewCrc32cHasher() {
+    return Hashing.crc32c().newHasher();
   }
 
   /**
@@ -58,14 +62,6 @@ class EndToEndChecksumHandler {
         && checksum.equalsIgnoreCase(computeChecksum(bytes));
   }
 
-  static MessageDigest getMessageDigestInstance() {
-    try {
-      return MessageDigest.getInstance(MD5);
-    } catch (NoSuchAlgorithmException e) {
-      throw new RuntimeException("MD5 algorithm is not found when computing checksum!");
-    }
-  }
-
   static boolean hasChecksumHeader(HttpResponse response) {
     String checksum = getChecksumHeader(response);
     return checksum != null && !checksum.isEmpty();
@@ -74,4 +70,12 @@ class EndToEndChecksumHandler {
   static String getChecksumHeader(HttpResponse response) {
     return response.getHeaders().getFirstHeaderStringValue(HTTP_RESPONSE_CHECKSUM_HEADER);
   }
+
+  void update(byte[] bytes, int off, int len) {
+    hasher.putBytes(bytes, off, len);
+  }
+
+  String hash() {
+    return hasher.hash().toString();
+  }
 }
diff --git a/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/RemoteRpc.java b/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/RemoteRpc.java
index 2c9d4d34..321eea72 100644
--- a/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/RemoteRpc.java
+++ b/datastore-v1-proto-client/src/main/java/com/google/datastore/v1/client/RemoteRpc.java
@@ -109,8 +109,7 @@ class RemoteRpc {
         }
         InputStream inputStream = httpResponse.getContent();
         return enableE2EChecksum && EndToEndChecksumHandler.hasChecksumHeader(httpResponse)
-            ? new ChecksumEnforcingInputStream(
-                inputStream, httpResponse, EndToEndChecksumHandler.getMessageDigestInstance())
+            ? new ChecksumEnforcingInputStream(inputStream, httpResponse)
             : inputStream;
       } catch (SocketTimeoutException e) {
         throw makeException(url, methodName, Code.DEADLINE_EXCEEDED, "Deadline exceeded", e);
diff --git a/google-cloud-datastore-bom/pom.xml b/google-cloud-datastore-bom/pom.xml
index 3c0e6751..f112d1d1 100644
--- a/google-cloud-datastore-bom/pom.xml
+++ b/google-cloud-datastore-bom/pom.xml
@@ -3,12 +3,12 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.cloud</groupId>
   <artifactId>google-cloud-datastore-bom</artifactId>
-  <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-bom:current} -->
+  <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-bom:current} -->
   <packaging>pom</packaging>
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-shared-config</artifactId>
-    <version>1.0.1</version>
+    <version>1.0.3</version>
   </parent>
 
   <name>Google Cloud datastore BOM</name>
@@ -52,12 +52,12 @@
       <dependency>
         <groupId>com.google.api.grpc</groupId>
         <artifactId>proto-google-cloud-datastore-v1</artifactId>
-        <version>0.91.4-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
+        <version>0.92.3-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.cloud</groupId>
         <artifactId>google-cloud-datastore</artifactId>
-        <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
+        <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
       </dependency>
     </dependencies>
   </dependencyManagement>
diff --git a/google-cloud-datastore/pom.xml b/google-cloud-datastore/pom.xml
index e9886588..10f31ce5 100644
--- a/google-cloud-datastore/pom.xml
+++ b/google-cloud-datastore/pom.xml
@@ -2,7 +2,7 @@
 <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>
   <artifactId>google-cloud-datastore</artifactId>
-  <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
+  <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore:current} -->
   <packaging>jar</packaging>
   <name>Google Cloud Datastore</name>
   <url>https://github.com/googleapis/java-datastore</url>
@@ -12,7 +12,7 @@
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-datastore-parent</artifactId>
-    <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
+    <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
   </parent>
   <properties>
     <site.installationModule>google-cloud-datastore</site.installationModule>
diff --git a/pom.xml b/pom.xml
index 9c3dc645..3379ec9b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   <groupId>com.google.cloud</groupId>
   <artifactId>google-cloud-datastore-parent</artifactId>
   <packaging>pom</packaging>
-  <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
+  <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
   <name>Google Cloud Datastore Parent</name>
   <url>https://github.com/googleapis/java-datastore</url>
   <description>
@@ -14,7 +14,7 @@
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-shared-config</artifactId>
-    <version>1.0.1</version>
+    <version>1.0.3</version>
   </parent>
 
   <developers>
@@ -150,7 +150,7 @@
       <dependency>
         <groupId>com.google.cloud</groupId>
         <artifactId>google-cloud-shared-dependencies</artifactId>
-        <version>2.2.0</version>
+        <version>2.3.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
@@ -158,12 +158,12 @@
       <dependency>
         <groupId>com.google.api.grpc</groupId>
         <artifactId>proto-google-cloud-datastore-v1</artifactId>
-        <version>0.91.4-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
+        <version>0.92.3-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
       </dependency>
       <dependency>
         <groupId>com.google.cloud.datastore</groupId>
         <artifactId>datastore-v1-proto-client</artifactId>
-        <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
+        <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:datastore-v1-proto-client:current} -->
         <exclusions>
           <exclusion>
             <groupId>com.google.api.grpc</groupId>
diff --git a/proto-google-cloud-datastore-v1/pom.xml b/proto-google-cloud-datastore-v1/pom.xml
index 5334b781..2717c63c 100644
--- a/proto-google-cloud-datastore-v1/pom.xml
+++ b/proto-google-cloud-datastore-v1/pom.xml
@@ -4,13 +4,13 @@
   <modelVersion>4.0.0</modelVersion>
   <groupId>com.google.api.grpc</groupId>
   <artifactId>proto-google-cloud-datastore-v1</artifactId>
-  <version>0.91.4-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
+  <version>0.92.3-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-datastore-v1:current} -->
   <name>proto-google-cloud-datastore-v1</name>
   <description>PROTO library for proto-google-cloud-datastore-v1</description>
   <parent>
     <groupId>com.google.cloud</groupId>
     <artifactId>google-cloud-datastore-parent</artifactId>
-    <version>2.0.4-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
+    <version>2.1.3-SNAPSHOT</version><!-- {x-version-update:google-cloud-datastore-parent:current} -->
   </parent>
   <dependencies>
     <dependency>
diff --git a/renovate.json b/renovate.json
index 7bbedfd5..2f6e8a06 100644
--- a/renovate.json
+++ b/renovate.json
@@ -70,8 +70,5 @@
     }
   ],
   "semanticCommits": true,
-  "dependencyDashboard": true,
-  "dependencyDashboardLabels": [
-    "type: process"
-  ]
+  "dependencyDashboard": true
 }
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 3c31e1b0..9ebf579a 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
     <dependency>
       <groupId>com.google.cloud</groupId>
       <artifactId>google-cloud-datastore</artifactId>
-      <version>2.0.3</version>
+      <version>2.1.2</version>
     </dependency>
     <!-- [END datastore_install_without_bom] -->
 
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 5a5231b4..99bd4d93 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
     <dependency>
       <groupId>com.google.cloud</groupId>
       <artifactId>google-cloud-datastore</artifactId>
-      <version>2.0.3</version>
+      <version>2.1.2</version>
     </dependency>
 
     <dependency>
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 13f5ff1b..58abbe3d 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -30,7 +30,7 @@
       <dependency>
         <groupId>com.google.cloud</groupId>
         <artifactId>libraries-bom</artifactId>
-        <version>22.0.0</version>
+        <version>23.0.0</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
diff --git a/synth.metadata b/synth.metadata
index aafeb97e..5872b771 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -4,7 +4,7 @@
       "git": {
         "name": ".",
         "remote": "https://github.com/googleapis/java-datastore.git",
-        "sha": "81b9de5b8bc6e788618b2530a9f47ca97aa30d98"
+        "sha": "bd22515ba6670dd9cf56bd82ff4cdd0b40b5b106"
       }
     },
     {
@@ -19,7 +19,7 @@
       "git": {
         "name": "synthtool",
         "remote": "https://github.com/googleapis/synthtool.git",
-        "sha": "9a238a0623879c3de129a376c6085d4a862f6eb9"
+        "sha": "0752ff727a19a467dffed335d5e59303689cf0d1"
       }
     }
   ],
@@ -42,7 +42,6 @@
     ".github/PULL_REQUEST_TEMPLATE.md",
     ".github/blunderbuss.yml",
     ".github/generated-files-bot.yml",
-    ".github/readme/synth.py",
     ".github/release-please.yml",
     ".github/release-trigger.yml",
     ".github/snippet-bot.yml",
@@ -59,7 +58,6 @@
     ".kokoro/common.sh",
     ".kokoro/continuous/common.cfg",
     ".kokoro/continuous/java8.cfg",
-    ".kokoro/continuous/readme.cfg",
     ".kokoro/dependencies.sh",
     ".kokoro/nightly/common.cfg",
     ".kokoro/nightly/integration.cfg",
diff --git a/versions.txt b/versions.txt
index f394d63a..2442a729 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,9 +1,9 @@
 # Format:
 # module:released-version:current-version
 
-google-cloud-datastore:2.0.3:2.0.4-SNAPSHOT
-google-cloud-datastore-bom:2.0.3:2.0.4-SNAPSHOT
-google-cloud-datastore-parent:2.0.3:2.0.4-SNAPSHOT
-proto-google-cloud-datastore-v1:0.91.3:0.91.4-SNAPSHOT
-datastore-v1-proto-client:2.0.3:2.0.4-SNAPSHOT
+google-cloud-datastore:2.1.2:2.1.3-SNAPSHOT
+google-cloud-datastore-bom:2.1.2:2.1.3-SNAPSHOT
+google-cloud-datastore-parent:2.1.2:2.1.3-SNAPSHOT
+proto-google-cloud-datastore-v1:0.92.2:0.92.3-SNAPSHOT
+datastore-v1-proto-client:2.1.2:2.1.3-SNAPSHOT
 


Test patch:
diff --git a/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/ChecksumEnforcingInputStreamTest.java b/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/ChecksumEnforcingInputStreamTest.java
index 47592f98..dbe0e766 100644
--- a/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/ChecksumEnforcingInputStreamTest.java
+++ b/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/ChecksumEnforcingInputStreamTest.java
@@ -21,7 +21,6 @@ import static org.junit.Assert.fail;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
-import java.security.MessageDigest;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
@@ -29,8 +28,6 @@ import org.junit.runners.JUnit4;
 /** Test for {@link ChecksumEnforcingInputStream}. */
 @RunWith(JUnit4.class)
 public class ChecksumEnforcingInputStreamTest {
-  private final MessageDigest digest = EndToEndChecksumHandler.getMessageDigestInstance();
-
   public void test(int payloadSize) throws Exception {
     // read 1000 bytes at a time
     // Since checksum should be correct, do not expect IOException
@@ -40,7 +37,7 @@ public class ChecksumEnforcingInputStreamTest {
         // do nothing with the bytes read
       }
     } catch (IOException e) {
-      fail("checksum verification failed!");
+      fail("checksum verification failed! " + e.getMessage());
     }
   }
 
@@ -66,9 +63,7 @@ public class ChecksumEnforcingInputStreamTest {
     // Since checksum should be correct, do not expect IOException
     try (ChecksumEnforcingInputStream instance =
         new ChecksumEnforcingInputStream(
-            new ByteArrayInputStream("hello there".getBytes(UTF_8)),
-            "this checksum is invalid",
-            digest)) {
+            new ByteArrayInputStream("hello there".getBytes(UTF_8)), "this checksum is invalid")) {
       byte[] buf = new byte[1000];
       while (instance.read(buf, 0, 1000) != -1) {
         // do nothing with the bytes read
@@ -103,7 +98,6 @@ public class ChecksumEnforcingInputStreamTest {
     }
     byte[] bytes = payload.getBytes(UTF_8);
     String expectedChecksum = EndToEndChecksumHandler.computeChecksum(bytes);
-    return new ChecksumEnforcingInputStream(
-        new ByteArrayInputStream(bytes), expectedChecksum, digest);
+    return new ChecksumEnforcingInputStream(new ByteArrayInputStream(bytes), expectedChecksum);
   }
 }
diff --git a/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/RemoteRpcTest.java b/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/RemoteRpcTest.java
index b5f82369..ebcb1239 100644
--- a/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/RemoteRpcTest.java
+++ b/datastore-v1-proto-client/src/test/java/com/google/datastore/v1/client/RemoteRpcTest.java
@@ -174,7 +174,7 @@ public class RemoteRpcTest {
         httpRequest
             .getHeaders()
             .getFirstHeaderStringValue(EndToEndChecksumHandler.HTTP_REQUEST_CHECKSUM_HEADER);
-    assertEquals(32, header.length());
+    assertEquals(8, header.length());
   }
 
   @Test