From 4b2199439880ce4cb9a7b62b369cafefef56fbc8 Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Fri, 17 Apr 2026 23:37:00 -0400 Subject: [PATCH 1/2] ci(generation): skip files inheriting coordinates in release check Fixes #12840 --- generation/check_existing_release_versions.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/generation/check_existing_release_versions.sh b/generation/check_existing_release_versions.sh index 68f1d32afe20..c6a6d78f4957 100755 --- a/generation/check_existing_release_versions.sh +++ b/generation/check_existing_release_versions.sh @@ -18,8 +18,12 @@ function find_existing_version_pom() { local version=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' \ "${pom_file}") echo -n "Checking ${group_id}:${artifact_id}:${version}:" - if [ -z "${group_id}" ] || [ -z "${artifact_id}" ] || [ -z "${version}" ]; then - echo "Couldn't parse the pom file: $pom_file" + if [ -z "${group_id}" ] || [ -z "${version}" ]; then + echo " Skipping file without explicit coordinates (likely inherits): $pom_file" + return 0 + fi + if [ -z "${artifact_id}" ]; then + echo "Couldn't parse artifact_id in the pom file: $pom_file" exit 1 fi if [[ "${version}" == *SNAPSHOT* ]] && [ "${artifact_id}" != "google-cloud-java" ]; then From 06d6a508505d26bfe439f68e4a99efd3f162bc5e Mon Sep 17 00:00:00 2001 From: Mike Eltsufin Date: Fri, 17 Apr 2026 23:53:02 -0400 Subject: [PATCH 2/2] ci(generation): fail on missing artifactId before skipping --- generation/check_existing_release_versions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generation/check_existing_release_versions.sh b/generation/check_existing_release_versions.sh index c6a6d78f4957..d8b16503136b 100755 --- a/generation/check_existing_release_versions.sh +++ b/generation/check_existing_release_versions.sh @@ -18,14 +18,14 @@ function find_existing_version_pom() { local version=$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="version"]/text()' \ "${pom_file}") echo -n "Checking ${group_id}:${artifact_id}:${version}:" - if [ -z "${group_id}" ] || [ -z "${version}" ]; then - echo " Skipping file without explicit coordinates (likely inherits): $pom_file" - return 0 - fi if [ -z "${artifact_id}" ]; then echo "Couldn't parse artifact_id in the pom file: $pom_file" exit 1 fi + if [ -z "${group_id}" ] || [ -z "${version}" ]; then + echo "Skipping file without explicit coordinates (likely inherits): $pom_file" + return 0 + fi if [[ "${version}" == *SNAPSHOT* ]] && [ "${artifact_id}" != "google-cloud-java" ]; then echo " Release Please pull request contains SNAPSHOT version. Please investigate." return_code=1