chore(ci): Exclude a few additional modules from existing versions check#13658
Conversation
Update generation/check_existing_release_versions.sh to exclude all pom.xml files that contain samples in their path, rather than just java-samples. This ensures that java-<service>/samples/pom.xml modules (which are not released and may remain as SNAPSHOTs) are excluded from the duplicate version check on release PRs, preventing false positive failures.
…rom existing-versions-check Update generation/check_existing_release_versions.sh to exclude: - storage-shared-benchmarking - test-proxy - java-shared-config parent POM These are non-released modules or parent POMs that should not be verified for duplicate release versions.
There was a problem hiding this comment.
Code Review
This pull request updates the release version check script to exclude additional directories and POM files, specifically samples, storage-shared-benchmarking, test-proxy, and java-shared-config. Feedback is provided to replace the exact match pattern for java-shared-config with a wildcard pattern to maintain consistency and improve robustness against directory execution context changes.
| # We do not plan to release any new versions for it, so we don't want to check if its | ||
| # version (which already exists) is a duplicate. | ||
| if [[ "${pom_file}" == *java-samples* || "${pom_file}" == *showcase* || "${pom_file}" == *coverage-report* || "${pom_file}" == *sdk-platform-java/pom.xml || "${pom_file}" == *java-vertexai* ]]; then | ||
| if [[ "${pom_file}" == *samples* || "${pom_file}" == *showcase* || "${pom_file}" == *coverage-report* || "${pom_file}" == *sdk-platform-java/pom.xml || "${pom_file}" == *java-vertexai* || "${pom_file}" == *storage-shared-benchmarking* || "${pom_file}" == *test-proxy* || "${pom_file}" == "./java-shared-config/pom.xml" ]]; then |
There was a problem hiding this comment.
The pattern "${pom_file}" == "./java-shared-config/pom.xml" uses an exact match with a hardcoded ./ prefix, which is inconsistent with the other wildcard-based patterns in this conditional block (such as *sdk-platform-java/pom.xml or *storage-shared-benchmarking*).
Using a wildcard pattern like *java-shared-config/pom.xml or *java-shared-config* is more robust, less fragile to execution context/working directory changes, and maintains consistency with the rest of the conditions.
| if [[ "${pom_file}" == *samples* || "${pom_file}" == *showcase* || "${pom_file}" == *coverage-report* || "${pom_file}" == *sdk-platform-java/pom.xml || "${pom_file}" == *java-vertexai* || "${pom_file}" == *storage-shared-benchmarking* || "${pom_file}" == *test-proxy* || "${pom_file}" == "./java-shared-config/pom.xml" ]]; then | |
| if [[ "${pom_file}" == *samples* || "${pom_file}" == *showcase* || "${pom_file}" == *coverage-report* || "${pom_file}" == *sdk-platform-java/pom.xml || "${pom_file}" == *java-vertexai* || "${pom_file}" == *storage-shared-benchmarking* || "${pom_file}" == *test-proxy* || "${pom_file}" == *java-shared-config/pom.xml ]]; then |
Update generation/check_existing_release_versions.sh to use a more specific path pattern *java-bigtable/test-proxy* instead of *test-proxy* to exclude the bigtable test proxy. This prevents accidental exclusions of other modules that might contain 'test-proxy' in their path.
Besides the samples modules for all the veneers, these pom files are also failing: