From 1ae9b9ca9acbc814ca236bc378b4aa46ce952ead Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 24 Jul 2025 12:11:30 -0400 Subject: [PATCH 01/12] chore: manual update of update_generation_config.sh Unfortunately, https://github.com/googleapis/sdk-platform-java/pull/3853 cannot be automatically propagated. This PR manually updates this script with the latest. --- .github/scripts/update_generation_config.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index fff56bf5ddf..92efcf88191 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,8 +15,10 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") - latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" From 4e14f6c538a6543c0ec01ba5f986013882df888c Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Jul 2025 16:14:40 +0000 Subject: [PATCH 02/12] chore: generate libraries at Thu Jul 24 16:12:02 UTC 2025 --- .github/scripts/update_generation_config.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index 92efcf88191..fff56bf5ddf 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ex +set -e # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,10 +15,8 @@ set -ex function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" - url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" - xml_content=$(curl -s --fail "${url}") - latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") + latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" From 73feb75d7490e0700dff8e260f1867f90257c3e6 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 24 Jul 2025 12:15:38 -0400 Subject: [PATCH 03/12] chore: update yaml as well --- .github/workflows/update_generation_config.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index cd2d5fd5a8e..7b14069ced8 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,7 +18,6 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -30,6 +29,9 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -40,5 +42,4 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file From 8d861e52485f23341e14ae43ab5782f18212d767 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 24 Jul 2025 12:17:01 -0400 Subject: [PATCH 04/12] chore: bring back the script --- .github/scripts/update_generation_config.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index fff56bf5ddf..a0b95de6c0d 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,8 +15,10 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") - latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -172,4 +174,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi +fi \ No newline at end of file From e9c852e0372d0e31b06076ad302c6bba447b1c4d Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Jul 2025 16:20:04 +0000 Subject: [PATCH 05/12] chore: generate libraries at Thu Jul 24 16:17:24 UTC 2025 --- .github/scripts/update_generation_config.sh | 10 ++++------ .github/workflows/update_generation_config.yaml | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index a0b95de6c0d..fff56bf5ddf 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ex +set -e # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,10 +15,8 @@ set -ex function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" - url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" - xml_content=$(curl -s --fail "${url}") - latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") + latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -174,4 +172,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi \ No newline at end of file +fi diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index 7b14069ced8..cd2d5fd5a8e 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,6 +18,7 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: + jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -29,9 +30,6 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - name: Install Dependencies - shell: bash - run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -42,4 +40,5 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + From 8cf88fe408f77986926f3cb425a00a65a2601f74 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Thu, 24 Jul 2025 13:52:20 -0400 Subject: [PATCH 06/12] chore: include yaml changes as well --- .github/scripts/update_generation_config.sh | 10 ++++++---- .github/workflows/update_generation_config.yaml | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index fff56bf5ddf..a0b95de6c0d 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,8 +15,10 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") - latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -172,4 +174,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi +fi \ No newline at end of file diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index cd2d5fd5a8e..7b14069ced8 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,7 +18,6 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -30,6 +29,9 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -40,5 +42,4 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file From 33225137ea9bcebb6e0398e4fde631f4df86e0bc Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Jul 2025 17:55:17 +0000 Subject: [PATCH 07/12] chore: generate libraries at Thu Jul 24 17:52:43 UTC 2025 --- .github/scripts/update_generation_config.sh | 10 ++++------ .github/workflows/update_generation_config.yaml | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index a0b95de6c0d..fff56bf5ddf 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ex +set -e # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,10 +15,8 @@ set -ex function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" - url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" - xml_content=$(curl -s --fail "${url}") - latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") + latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -174,4 +172,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi \ No newline at end of file +fi diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index 7b14069ced8..cd2d5fd5a8e 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,6 +18,7 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: + jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -29,9 +30,6 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - name: Install Dependencies - shell: bash - run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -42,4 +40,5 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + From 1e72ae75352f8d336e246500653beebb75a3fe5d Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Thu, 24 Jul 2025 18:49:49 +0000 Subject: [PATCH 08/12] Revert "chore: generate libraries at Thu Jul 24 17:52:43 UTC 2025" This reverts commit 33225137ea9bcebb6e0398e4fde631f4df86e0bc. --- .github/scripts/update_generation_config.sh | 10 ++++++---- .github/workflows/update_generation_config.yaml | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index fff56bf5ddf..a0b95de6c0d 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,8 +15,10 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") - latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -172,4 +174,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi +fi \ No newline at end of file diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index cd2d5fd5a8e..7b14069ced8 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,7 +18,6 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -30,6 +29,9 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -40,5 +42,4 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file From a1c59561503ab874150cabfe75fef96a832b8542 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Jul 2025 18:53:10 +0000 Subject: [PATCH 09/12] chore: generate libraries at Thu Jul 24 18:50:37 UTC 2025 --- .github/scripts/update_generation_config.sh | 10 ++++------ .github/workflows/update_generation_config.yaml | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index a0b95de6c0d..fff56bf5ddf 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ex +set -e # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,10 +15,8 @@ set -ex function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" - url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" - xml_content=$(curl -s --fail "${url}") - latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") + latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -174,4 +172,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi \ No newline at end of file +fi diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index 7b14069ced8..cd2d5fd5a8e 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,6 +18,7 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: + jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -29,9 +30,6 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - name: Install Dependencies - shell: bash - run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -42,4 +40,5 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + From b554a92fedfa69356afc4847825d25ac88b4ed47 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Thu, 24 Jul 2025 18:54:06 +0000 Subject: [PATCH 10/12] Revert "chore: generate libraries at Thu Jul 24 18:50:37 UTC 2025" This reverts commit a1c59561503ab874150cabfe75fef96a832b8542. --- .github/scripts/update_generation_config.sh | 10 ++++++---- .github/workflows/update_generation_config.yaml | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index fff56bf5ddf..a0b95de6c0d 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,8 +15,10 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") - latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -172,4 +174,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi +fi \ No newline at end of file diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index cd2d5fd5a8e..7b14069ced8 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,7 +18,6 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -30,6 +29,9 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -40,5 +42,4 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file From 53c4dd7b318b04255b1cbd4c76c6498189c2860b Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 24 Jul 2025 18:57:13 +0000 Subject: [PATCH 11/12] chore: generate libraries at Thu Jul 24 18:54:36 UTC 2025 --- .github/scripts/update_generation_config.sh | 10 ++++------ .github/workflows/update_generation_config.yaml | 7 +++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index a0b95de6c0d..fff56bf5ddf 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -ex +set -e # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,10 +15,8 @@ set -ex function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" - url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" - xml_content=$(curl -s --fail "${url}") - latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") + json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") + latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -174,4 +172,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi \ No newline at end of file +fi diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index 7b14069ced8..cd2d5fd5a8e 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,6 +18,7 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: + jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -29,9 +30,6 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - name: Install Dependencies - shell: bash - run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -42,4 +40,5 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + From e80b5d31a30b38e0aee7a35a1d18e56f75c3ed64 Mon Sep 17 00:00:00 2001 From: diegomarquezp Date: Thu, 24 Jul 2025 19:00:25 +0000 Subject: [PATCH 12/12] Revert "chore: generate libraries at Thu Jul 24 18:54:36 UTC 2025" This reverts commit 53c4dd7b318b04255b1cbd4c76c6498189c2860b. --- .github/scripts/update_generation_config.sh | 10 ++++++---- .github/workflows/update_generation_config.yaml | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh index fff56bf5ddf..a0b95de6c0d 100644 --- a/.github/scripts/update_generation_config.sh +++ b/.github/scripts/update_generation_config.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -e +set -ex # This script should be run at the root of the repository. # This script is used to update googleapis_commitish, gapic_generator_version, # and libraries_bom_version in generation configuration at the time of running @@ -15,8 +15,10 @@ set -e function get_latest_released_version() { local group_id=$1 local artifact_id=$2 - json_content=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json") - latest=$(jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' <<< "${json_content}" | sort -V | tail -n 1) + group_id_url_path="$(sed 's|\.|/|g' <<< "${group_id}")" + url="https://repo1.maven.org/maven2/${group_id_url_path}/${artifact_id}/maven-metadata.xml" + xml_content=$(curl -s --fail "${url}") + latest=$(xmllint --xpath 'metadata/versioning/latest/text()' - <<< "${xml_content}") if [[ -z "${latest}" ]]; then echo "The latest version of ${group_id}:${artifact_id} is empty." echo "The returned json from maven.org is invalid: ${json_content}" @@ -172,4 +174,4 @@ if [ -z "${pr_num}" ]; then else git push gh pr edit "${pr_num}" --title "${title}" --body "${title}" -fi +fi \ No newline at end of file diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml index cd2d5fd5a8e..7b14069ced8 100644 --- a/.github/workflows/update_generation_config.yaml +++ b/.github/workflows/update_generation_config.yaml @@ -18,7 +18,6 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - jobs: update-generation-config: runs-on: ubuntu-24.04 @@ -30,6 +29,9 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} + - name: Install Dependencies + shell: bash + run: sudo apt-get update && sudo apt-get install -y libxml2-utils - name: Update params in generation config to latest shell: bash run: | @@ -40,5 +42,4 @@ jobs: --base_branch "${base_branch}" \ --repo ${{ github.repository }} env: - GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - + GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} \ No newline at end of file