From 9cb08b0e6ccc2e0fd171361bbb5ca78052a6360f Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 17:37:39 +0000 Subject: [PATCH 01/13] Cause an error in maven and remove extra error handling --- .github/workflows/test_java.yml | 1 - java/bom/pom.xml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_java.yml b/.github/workflows/test_java.yml index 2c8461d07c1e3..de160e2ee283e 100644 --- a/.github/workflows/test_java.yml +++ b/.github/workflows/test_java.yml @@ -110,7 +110,6 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: java_linux/11 bash: | - set -ex bazel build //java:release mvn install:install-file -Dfile=java/bom/pom.xml -DpomFile=java/bom/pom.xml mvn install:install-file -Dfile=java/pom.xml -DpomFile=java/pom.xml diff --git a/java/bom/pom.xml b/java/bom/pom.xml index f20325ebb1c22..e321c5088f265 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-bom - 4.29.0 + 4.2.0 pom Protocol Buffers [BOM] From 51041f2297d03731fe3f6d2518ee43133b1d7ae1 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 18:08:02 +0000 Subject: [PATCH 02/13] Make it fail --- java/bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/bom/pom.xml b/java/bom/pom.xml index e321c5088f265..f66a405099d0b 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -4,7 +4,7 @@ com.google.protobuf protobuf-bom - 4.2.0 + 4.23.3 pom Protocol Buffers [BOM] From 1aa139b1cbc3397c0c1472b5e01f6c9999debf6c Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 20:31:51 +0000 Subject: [PATCH 03/13] Cause this to fail --- java/core/pom_template.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/java/core/pom_template.xml b/java/core/pom_template.xml index 11bd41964f8d1..36dcee0b9f687 100644 --- a/java/core/pom_template.xml +++ b/java/core/pom_template.xml @@ -2,7 +2,6 @@ 4.0.0 - {groupId} protobuf-parent {version} From f55ecde5d96ada9a66afed5e90e5aead0d770330 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 21:06:20 +0000 Subject: [PATCH 04/13] Use my protobuf-ci change --- .github/workflows/test_java.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_java.yml b/.github/workflows/test_java.yml index de160e2ee283e..defba22013973 100644 --- a/.github/workflows/test_java.yml +++ b/.github/workflows/test_java.yml @@ -104,7 +104,7 @@ jobs: with: ref: ${{ inputs.safe-checkout }} - name: Generate maven artifacts with bazel and install using maven - uses: protocolbuffers/protobuf-ci/bazel-docker@v3 + uses: deannagarcia/protobuf-ci/bazel-docker@set-ex-test with: image: us-docker.pkg.dev/protobuf-build/containers/test/linux/java:11-1fdbb997433cb22c1e49ef75ad374a8d6bb88702 credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} From 5c81f37bc51414151b61349bf9ffcce4d04e96ca Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 21:20:50 +0000 Subject: [PATCH 05/13] Add failures for every protobuf-ci action changed --- .github/workflows/staleness_check.yml | 2 +- .github/workflows/test_csharp.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index de40b0d4aed56..ffe25652d2458 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -64,7 +64,7 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > - set -ex; + false; echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index ae0b76d40bd4a..848857c755728 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -76,6 +76,7 @@ jobs: with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | + false dotnet build csharp/src/Google.Protobuf.sln dotnet test csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj From de671dc966d36b41784eba1e146722df3cb2454c Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 21:48:43 +0000 Subject: [PATCH 06/13] make them fail a different way --- .github/workflows/staleness_check.yml | 5 ++--- .github/workflows/test_csharp.yml | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index ffe25652d2458..18971de716c8b 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -64,10 +64,9 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > - false; echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then - bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; + bazel quey 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; else - bazel query 'attr(tags, "staleness_test", //...)'; + bazel quey 'attr(tags, "staleness_test", //...)'; fi diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index 848857c755728..ce6140b163842 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -76,9 +76,8 @@ jobs: with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | - false dotnet build csharp/src/Google.Protobuf.sln - dotnet test csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj + dotnet test cshar/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj linux-aarch64: name: Linux aarch64 From 41bcb91475ce6a5418554da6f01befd1bb0d613e Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 22:00:36 +0000 Subject: [PATCH 07/13] Try different kinds of failures --- .github/workflows/staleness_check.yml | 5 +++-- .github/workflows/test_csharp.yml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index 18971de716c8b..41549431394a4 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -64,9 +64,10 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > + bazel build //nothing echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then - bazel quey 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; + bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; else - bazel quey 'attr(tags, "staleness_test", //...)'; + bazel query 'attr(tags, "staleness_test", //...)'; fi diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index ce6140b163842..f0534255ecc53 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -76,6 +76,7 @@ jobs: with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | + dotnet build . dotnet build csharp/src/Google.Protobuf.sln dotnet test cshar/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj From d03a3663c747b4889a182a12149122bc170db241 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Wed, 21 Aug 2024 22:25:07 +0000 Subject: [PATCH 08/13] New ways to fail --- .github/workflows/staleness_check.yml | 2 +- .github/workflows/test_csharp.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index 41549431394a4..5fae7d21a130b 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -64,7 +64,7 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > - bazel build //nothing + false || true echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index f0534255ecc53..97a42f97f133c 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -76,7 +76,8 @@ jobs: with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | - dotnet build . + false + echo "It still got here" dotnet build csharp/src/Google.Protobuf.sln dotnet test cshar/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj From 74d0b482c2912211de0f8fd870fad5e0ceeb329a Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Thu, 22 Aug 2024 16:47:05 +0000 Subject: [PATCH 09/13] Use my new prootbuf-ci commit --- .github/workflows/staleness_check.yml | 2 +- .github/workflows/test_csharp.yml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index 5fae7d21a130b..b0e31c1957b81 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -59,7 +59,7 @@ jobs: # In branches where automatic updates work as post-submits, we don't want to run staleness # tests along with user changes. Any stale files will be automatically fixed in a follow-up # commit. - uses: protocolbuffers/protobuf-ci/bazel@v3 + uses: deannagarcia/protobuf-ci/bazel@set-ex-test with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index 97a42f97f133c..a7e02f1ff6392 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -72,12 +72,11 @@ jobs: shell: bash - name: Run tests - uses: protocolbuffers/protobuf-ci/bash@v3 + uses: deannagarcia/protobuf-ci/bash@set-ex-test with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | - false - echo "It still got here" + false || true dotnet build csharp/src/Google.Protobuf.sln dotnet test cshar/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj From f6a02b87d2ddaa4313bf7b8e0cd95948cc96628e Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Thu, 22 Aug 2024 21:04:46 +0000 Subject: [PATCH 10/13] Try different failure cases --- .github/workflows/staleness_check.yml | 2 +- .github/workflows/test_csharp.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index b0e31c1957b81..937e9a97e7d8f 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -64,7 +64,7 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > - false || true + echo "Pipe test:" | grep "foo" || echo "grep failed" echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index a7e02f1ff6392..ce6140b163842 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -72,11 +72,10 @@ jobs: shell: bash - name: Run tests - uses: deannagarcia/protobuf-ci/bash@set-ex-test + uses: protocolbuffers/protobuf-ci/bash@v3 with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | - false || true dotnet build csharp/src/Google.Protobuf.sln dotnet test cshar/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj From 4101f5a71373ad9c4785737e69f091af74854043 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Thu, 22 Aug 2024 21:24:36 +0000 Subject: [PATCH 11/13] Try again --- .github/workflows/staleness_check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index 937e9a97e7d8f..864a28ac7a11a 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -64,7 +64,7 @@ jobs: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > - echo "Pipe test:" | grep "foo" || echo "grep failed" + echo "Pipe test:" | grep "foo"; echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; From 85945dfd59e05c22cf50adfa4e62160cf1456ac2 Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Fri, 23 Aug 2024 16:56:41 +0000 Subject: [PATCH 12/13] Maybe these will pass --- .github/workflows/staleness_check.yml | 2 +- .github/workflows/test_csharp.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index 864a28ac7a11a..33b1d5ad16c8f 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -59,7 +59,7 @@ jobs: # In branches where automatic updates work as post-submits, we don't want to run staleness # tests along with user changes. Any stale files will be automatically fixed in a follow-up # commit. - uses: deannagarcia/protobuf-ci/bazel@set-ex-test + uses: protocolbuffers/protobuf-ci/bazel@v3 with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index ce6140b163842..15fdcbf951ad9 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -76,8 +76,9 @@ jobs: with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | + echo "Pipe test:" | grep "foo" dotnet build csharp/src/Google.Protobuf.sln - dotnet test cshar/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj + dotnet test csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj linux-aarch64: name: Linux aarch64 From f662e0d55026c970d590a16431a646bfb12ba18a Mon Sep 17 00:00:00 2001 From: Deanna Garcia Date: Fri, 23 Aug 2024 17:41:19 +0000 Subject: [PATCH 13/13] Use my new commit --- .github/workflows/staleness_check.yml | 3 +-- .github/workflows/test_csharp.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/staleness_check.yml b/.github/workflows/staleness_check.yml index 33b1d5ad16c8f..8e54da370b17b 100644 --- a/.github/workflows/staleness_check.yml +++ b/.github/workflows/staleness_check.yml @@ -59,12 +59,11 @@ jobs: # In branches where automatic updates work as post-submits, we don't want to run staleness # tests along with user changes. Any stale files will be automatically fixed in a follow-up # commit. - uses: protocolbuffers/protobuf-ci/bazel@v3 + uses: deannagarcia/protobuf-ci/bazel@set-ex-test with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} bazel-cache: staleness bash: > - echo "Pipe test:" | grep "foo"; echo "Please run ./regenerate_stale_files.sh to regenerate stale files"; if [[ -z $COMMIT_TRIGGERED_RUN || -z $MAIN_RUN ]]; then bazel query 'attr(tags, "staleness_test", //...)' | xargs bazel test $BAZEL_FLAGS; diff --git a/.github/workflows/test_csharp.yml b/.github/workflows/test_csharp.yml index 15fdcbf951ad9..a1aa5174b1d2b 100644 --- a/.github/workflows/test_csharp.yml +++ b/.github/workflows/test_csharp.yml @@ -72,11 +72,10 @@ jobs: shell: bash - name: Run tests - uses: protocolbuffers/protobuf-ci/bash@v3 + uses: deannagarcia/protobuf-ci/bash@set-ex-test with: credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} command: | - echo "Pipe test:" | grep "foo" dotnet build csharp/src/Google.Protobuf.sln dotnet test csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj