Repository: GoogleCloudPlatform/pgadapter
Pull request #1269 (2023-12-15 15:06:28)

build(deps): bump google-github-actions/upload-cloud-storage from 1 to 2
Bumps [google-github-actions/upload-cloud-storage](https://github.com/google-github-actions/upload-cloud-storage) from 1 to 2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/google-github-actions/upload-cloud-storage/releases">google-github-actions/upload-cloud-storage's releases</a>.</em></p>
<blockquote>
<h2>v2</h2>
<p>Floating v2 alias</p>
<h2>v2.0.0</h2>
<p><strong>:warning: This version requires Node 20 or later!</strong></p>
<h2>What's Changed</h2>
<ul>
<li>Fix README gzip description by <a href="https://github.com/NickDub"><code>@​NickDub</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/329">google-github-actions/upload-cloud-storage#329</a></li>
<li>checkout is mandatory by <a href="https://github.com/SyPRX"><code>@​SyPRX</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/330">google-github-actions/upload-cloud-storage#330</a></li>
<li>dependabot: only do security updates by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/334">google-github-actions/upload-cloud-storage#334</a></li>
<li>update all deps by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/335">google-github-actions/upload-cloud-storage#335</a></li>
<li>Allow integration tests on dispatch by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/338">google-github-actions/upload-cloud-storage#338</a></li>
<li>Add CI for release branches by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/345">google-github-actions/upload-cloud-storage#345</a></li>
<li>Upgrade deps and drop unnecessary dependencies by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/346">google-github-actions/upload-cloud-storage#346</a></li>
<li>Release: v2.0.0 by <a href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/347">google-github-actions/upload-cloud-storage#347</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/NickDub"><code>@​NickDub</code></a> made their first contribution in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/329">google-github-actions/upload-cloud-storage#329</a></li>
<li><a href="https://github.com/SyPRX"><code>@​SyPRX</code></a> made their first contribution in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/330">google-github-actions/upload-cloud-storage#330</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/upload-cloud-storage/compare/v1...v2.0.0">https://github.com/google-github-actions/upload-cloud-storage/compare/v1...v2.0.0</a></p>
<h2>v1.0.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Add support info by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/325">google-github-actions/upload-cloud-storage#325</a></li>
<li>chore: update dependencies (automated) by <a href="https://github.com/verbanicm"><code>@​verbanicm</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/327">google-github-actions/upload-cloud-storage#327</a></li>
<li>Release: v1.0.3 by <a href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/328">google-github-actions/upload-cloud-storage#328</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/upload-cloud-storage/compare/v1.0.2...v1.0.3">https://github.com/google-github-actions/upload-cloud-storage/compare/v1.0.2...v1.0.3</a></p>
<h2>v1.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Use client-side retries for failed uploads by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/321">google-github-actions/upload-cloud-storage#321</a></li>
<li>Release: v1.0.2 by <a href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/322">google-github-actions/upload-cloud-storage#322</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/google-github-actions/upload-cloud-storage/compare/v1.0.1...v1.0.2">https://github.com/google-github-actions/upload-cloud-storage/compare/v1.0.1...v1.0.2</a></p>
<h2>v1.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Clean up unit and integration tests, remove labeler by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/305">google-github-actions/upload-cloud-storage#305</a></li>
<li>Update CI and deps by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/306">google-github-actions/upload-cloud-storage#306</a></li>
<li>Drop unused configPath field by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/307">google-github-actions/upload-cloud-storage#307</a></li>
<li>Update README.md headers settable field casing by <a href="https://github.com/robertvanhoesel"><code>@​robertvanhoesel</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/312">google-github-actions/upload-cloud-storage#312</a></li>
<li>chore: update dependencies (automated) by <a href="https://github.com/verbanicm"><code>@​verbanicm</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/315">google-github-actions/upload-cloud-storage#315</a></li>
<li>Print warnings when a gcloudignore is not found by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/313">google-github-actions/upload-cloud-storage#313</a></li>
<li>Switch to pull non-secret values from env by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/316">google-github-actions/upload-cloud-storage#316</a></li>
<li>Update deps by <a href="https://github.com/sethvargo"><code>@​sethvargo</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/318">google-github-actions/upload-cloud-storage#318</a></li>
<li>Release: v1.0.1 by <a href="https://github.com/google-github-actions-bot"><code>@​google-github-actions-bot</code></a> in <a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/pull/319">google-github-actions/upload-cloud-storage#319</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/d278d8c542c8229c29658d48b399fe9383a47a5f"><code>d278d8c</code></a> Release: v2.0.0 (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/347">#347</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/5d472e41b13b5ab762b844d6e383efd73ede9095"><code>5d472e4</code></a> Upgrade deps and drop unnecessary dependencies (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/346">#346</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/490e8b90f36f517307d4a62ed4b05e8e38e6afcd"><code>490e8b9</code></a> Add CI for release branches (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/345">#345</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/fa45b5cc3ce8024c4914bb36acf4838463ca07c1"><code>fa45b5c</code></a> Allow integration tests on dispatch (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/338">#338</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/ff23d2d4c9c07cbdb0d4fc76361b80f2b0d9e2d7"><code>ff23d2d</code></a> update all deps (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/335">#335</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/9824cc93d87d9c5ee53a74340334430066d89dca"><code>9824cc9</code></a> dependabot: only do security updates (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/334">#334</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/99ea8dc1736216914793b531e7f7c206ce82c160"><code>99ea8dc</code></a> checkout is mandatory (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/330">#330</a>)</li>
<li><a href="https://github.com/google-github-actions/upload-cloud-storage/commit/5e040a77328bc3e3e49185990acd0f63e026b6ef"><code>5e040a7</code></a> Fix README gzip description (<a href="https://redirect.github.com/google-github-actions/upload-cloud-storage/issues/329">#329</a>)</li>
<li>See full diff in <a href="https://github.com/google-github-actions/upload-cloud-storage/compare/v1...v2">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google-github-actions/upload-cloud-storage&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/cloud-storage-build-and-push-assembly.yaml b/.github/workflows/cloud-storage-build-and-push-assembly.yaml
index 82cc98ea..25317072 100644
--- a/.github/workflows/cloud-storage-build-and-push-assembly.yaml
+++ b/.github/workflows/cloud-storage-build-and-push-assembly.yaml
@@ -43,13 +43,13 @@ jobs:
 
       # Upload the assembly to Google Cloud Storage
       - id: 'upload-versioned-file'
-        uses: 'google-github-actions/upload-cloud-storage@v1'
+        uses: 'google-github-actions/upload-cloud-storage@v2'
         with:
           path: ${{ env.assembly }}
           destination: 'pgadapter-jar-releases'
           parent: false
       - id: 'overwrite-current-file'
-        uses: 'google-github-actions/upload-cloud-storage@v1'
+        uses: 'google-github-actions/upload-cloud-storage@v2'
         with:
           path: ${{ env.assembly_current }}
           destination: 'pgadapter-jar-releases'
diff --git a/.github/workflows/cloud-storage-build-and-push.yaml b/.github/workflows/cloud-storage-build-and-push.yaml
index aa78721e..5cda49d0 100644
--- a/.github/workflows/cloud-storage-build-and-push.yaml
+++ b/.github/workflows/cloud-storage-build-and-push.yaml
@@ -40,13 +40,13 @@ jobs:
 
       # Upload the jar to Google Cloud Storage
       - id: 'upload-versioned-file'
-        uses: 'google-github-actions/upload-cloud-storage@v1'
+        uses: 'google-github-actions/upload-cloud-storage@v2'
         with:
           path: ${{ env.uber_jar }}
           destination: 'pgadapter-jar-releases'
           parent: false
       - id: 'overwrite-current-file'
-        uses: 'google-github-actions/upload-cloud-storage@v1'
+        uses: 'google-github-actions/upload-cloud-storage@v2'
         with:
           path: ${{ env.uber_jar_current }}
           destination: 'pgadapter-jar-releases'
diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml
index 681b6196..4e223c7a 100644
--- a/.github/workflows/integration.yaml
+++ b/.github/workflows/integration.yaml
@@ -123,7 +123,7 @@ jobs:
         uses: codecov/codecov-action@v3
         with:
           directory: ./target/site/jacoco-merged-test-coverage-report
-          fail_ci_if_error: true
+          fail_ci_if_error: false
           flags: all_tests
           name: codecov-umbrella
           path_to_write_report: ./coverage/codecov_report.txt
diff --git a/README.md b/README.md
index 3da9c19c..116430ba 100644
--- a/README.md
+++ b/README.md
@@ -157,19 +157,16 @@ This option is only available for Java/JVM-based applications.
 
 ```java
 class PGProxyRunner {
-    public static void main() {
-      String[] arguments =
-              new String[] {
-                      "-p",
-                      "my-project",
-                      "-i",
-                      "my-instance",
-                      "-d",
-                      "my-database",
-                      "-c",
-                      "/path/to/credentials.json"
-              };
-      ProxyServer server = new ProxyServer(new OptionsMetadata(arguments));
+  public static void main(String[] args) {
+      OptionsMetadata.Builder builder =
+          OptionsMetadata.newBuilder()
+              .setProject("my-project")
+              .setInstance("my-instance")
+              .setDatabase("my-database")
+              .setCredentialsFile("/path/to/credentials.json")
+              // Start PGAdapter on any available port.
+              .setPort(0);
+      ProxyServer server = new ProxyServer(builder.build());
       server.startServer();
       server.awaitRunning();
     }
diff --git a/benchmarks/ycsb/Dockerfile b/benchmarks/ycsb/Dockerfile
index 6833f3de..43bcf5f5 100644
--- a/benchmarks/ycsb/Dockerfile
+++ b/benchmarks/ycsb/Dockerfile
@@ -18,7 +18,9 @@ RUN mvn package -Passembly -DskipTests
 
 
 # Docker image for the YCSB runner.
-FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:slim
+# We pin the version to 455.0.0, because YCSB requires Python 2.x, and this is the last
+# version of the gcloud-cli Docker image that supports Python 2.x.
+FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:455.0.0-slim
 
 RUN apt update && apt -y install postgresql-client
 RUN apt -y install default-jre
diff --git a/src/main/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutor.java b/src/main/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutor.java
index 6f87e64f..fc64aeab 100644
--- a/src/main/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutor.java
+++ b/src/main/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutor.java
@@ -383,7 +383,7 @@ class DdlExecutor {
     }
   }
 
-  private static final class Table implements Comparable<Table> {
+  static final class Table implements Comparable<Table> {
     private final String schema;
     private final String name;
     private final String parent;


Test patch:
diff --git a/src/test/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutorTest.java b/src/test/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutorTest.java
index 75399ceb..3fb05b16 100644
--- a/src/test/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutorTest.java
+++ b/src/test/java/com/google/cloud/spanner/pgadapter/statements/DdlExecutorTest.java
@@ -26,6 +26,7 @@ import com.google.cloud.spanner.Statement;
 import com.google.cloud.spanner.connection.AbstractStatementParser;
 import com.google.cloud.spanner.connection.AbstractStatementParser.ParsedStatement;
 import com.google.cloud.spanner.pgadapter.session.SessionState;
+import com.google.cloud.spanner.pgadapter.statements.DdlExecutor.Table;
 import com.google.cloud.spanner.pgadapter.statements.SimpleParser.TableOrIndexName;
 import com.google.cloud.spanner.pgadapter.utils.RegexQueryPartReplacer;
 import com.google.common.base.Suppliers;
@@ -256,6 +257,12 @@ public class DdlExecutorTest {
             "create table databasechangelog_replaced (id bigint primary key)"));
   }
 
+  @Test
+  public void testTableComparison() {
+    assertEquals(1, new Table("public", "foo", "bar").compareTo(new Table("public", "baz", "foo")));
+    assertEquals(-1, new Table("public", "foo", "bar").compareTo(new Table("public", "bar", null)));
+  }
+
   private String applyReplacers(DdlExecutor ddlExecutor, String sql) {
     Statement statement = Statement.of(sql);
     ParsedStatement parsedStatement = PARSER.parse(Statement.of(sql));