From 72cc32dc7cb27d36e20ce284329d208af84f81a5 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 02:08:04 +0000 Subject: [PATCH 1/8] wip --- .github/workflows/regenerate-all.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index 1cc79a531cbc..acf56b89075c 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -41,6 +41,20 @@ jobs: version=$(sed -n 's/^version: *//p' librarian.yaml) go run "github.com/googleapis/librarian/cmd/librarian@${version}" install + - name: Debug Git State + run: | + echo "Current directory: $(pwd)" + echo "Git status:" + git status + echo "Git branch output:" + git branch + echo "HEAD reference:" + git rev-parse HEAD + echo "Current branch:" + git branch --show-current + echo "Is this a shallow clone?" + [ -f .git/shallow ] && echo "Yes, it is shallow" || echo "No, it is not shallow" + - name: Regenerate run: | version=$(sed -n 's/^version: *//p' librarian.yaml) From c80da1effada10e310eeb62b5a0ff4f86f2b91ab Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 02:15:38 +0000 Subject: [PATCH 2/8] wip --- .github/workflows/regenerate-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index acf56b89075c..2861ab8e7808 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -1,7 +1,7 @@ name: Regenerate all packages after merging to main on: - push: + pull_request: branches: - main From 392f52eaf66111e92ca7465ad382d3867ee1e1d9 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 20:17:30 +0000 Subject: [PATCH 3/8] refresh cache --- .github/workflows/regenerate-all.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index 2861ab8e7808..778e533ab18d 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest env: PANDOC_VERSION: 3.8.2 + CACHE_VERSION: v2 steps: - name: Checkout From 6825c16788526a8061fd59df8cecb058f0239da0 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 20:32:30 +0000 Subject: [PATCH 4/8] force git env --- .github/workflows/regenerate-all.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index 778e533ab18d..1b85344ef00d 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -56,6 +56,18 @@ jobs: echo "Is this a shallow clone?" [ -f .git/shallow ] && echo "Yes, it is shallow" || echo "No, it is not shallow" + - name: Force Git Environment + run: | + # The runner image likely updated and is now stricter about git state. + # We force a valid git state so that synthtool doesn't panic. + git config --global user.email "ci@example.com" + git config --global user.name "CI Bot" + git config --global init.defaultBranch main + # Ensure current directory is a safe directory for git + git config --global --add safe.directory /home/runner/work/google-cloud-python/google-cloud-python + # Ensure a local branch exists + git checkout -B main + - name: Regenerate run: | version=$(sed -n 's/^version: *//p' librarian.yaml) From d02a45ceecf1d6a527c906408f1de1d5b12563a3 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 20:40:52 +0000 Subject: [PATCH 5/8] clean synthtool --- .github/workflows/regenerate-all.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index 1b85344ef00d..b99040d492fc 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -70,6 +70,9 @@ jobs: - name: Regenerate run: | + # 1. Clean the cache that synthtool uses + rm -rf $HOME/.cache/synthtool + version=$(sed -n 's/^version: *//p' librarian.yaml) PATH=$PATH:/tmp/pandoc/bin go run "github.com/googleapis/librarian/cmd/librarian@${version}" generate -all -v From d6d3e2c8404c2cbdeb927e0c3e34d8887eb5ce98 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 21:07:13 +0000 Subject: [PATCH 6/8] use librarian v0.13 --- .github/workflows/regenerate-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index b99040d492fc..fb62bcc79450 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -40,7 +40,7 @@ jobs: - name: Install Python packages for Librarian run: | version=$(sed -n 's/^version: *//p' librarian.yaml) - go run "github.com/googleapis/librarian/cmd/librarian@${version}" install + go run "github.com/googleapis/librarian/cmd/librarian@v0.13.0" install - name: Debug Git State run: | From ed84c7b4ada0c453717c9184a4c9f3119e2d20c3 Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 21 May 2026 21:33:50 +0000 Subject: [PATCH 7/8] update version in second spot --- .github/workflows/regenerate-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index fb62bcc79450..bd7e4b4aac2e 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -75,7 +75,7 @@ jobs: version=$(sed -n 's/^version: *//p' librarian.yaml) PATH=$PATH:/tmp/pandoc/bin - go run "github.com/googleapis/librarian/cmd/librarian@${version}" generate -all -v + go run "github.com/googleapis/librarian/cmd/librarian@v0.13.0" generate -all -v - name: Create issue on diff env: From 15d87e367ae133b8f1973bf13008646ee47172e0 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 21 May 2026 19:20:09 -0400 Subject: [PATCH 8/8] ci: update protoc version from 25.3 to 33.2 in regenerate-all.yml For https://github.com/googleapis/google-cloud-python/issues/17164 --- .github/workflows/regenerate-all.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/regenerate-all.yml b/.github/workflows/regenerate-all.yml index bd7e4b4aac2e..3cc5e49bbb70 100644 --- a/.github/workflows/regenerate-all.yml +++ b/.github/workflows/regenerate-all.yml @@ -28,7 +28,7 @@ jobs: - name: Install protoc uses: arduino/setup-protoc@v3 with: - version: "25.3" + version: "33.2" - name: Install pandoc run: |