From 152d27163f475825822439a185aa954ee12ce66c Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 1 May 2026 19:17:57 +0000 Subject: [PATCH 1/2] tests: ensure system test script runs in release PRs --- .kokoro/system.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.kokoro/system.sh b/.kokoro/system.sh index 0da9ac7b7dec..25892de44843 100755 --- a/.kokoro/system.sh +++ b/.kokoro/system.sh @@ -133,14 +133,24 @@ for path in `find 'packages' \ package_path="packages/${package_name}" # Determine if we should skip based on git diff - files_to_check="${package_path}/CHANGELOG.md" + # We always check for changes in these specific versioning/config files + files_to_check=( + "${package_path}/CHANGELOG.md" + "${package_path}/setup.py" + "${package_path}/pyproject.toml" + "${package_path}/**/gapic_version.py" + "${package_path}/**/version.py" + ) + + # If the package is in our "always run full system tests" list, check the whole directory if [[ $package_name == @($packages_with_system_tests_pattern) ]]; then - files_to_check="${package_path}" + files_to_check=("${package_path}") fi - echo "checking changes with 'git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- ${files_to_check}'" + echo "checking changes with 'git diff ${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT} -- ${files_to_check[*]}'" set +e - package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- ${files_to_check} | wc -l) + # Passing the array expanded as arguments to git diff + package_modified=$(git diff "${KOKORO_GITHUB_PULL_REQUEST_TARGET_BRANCH}...${KOKORO_GITHUB_PULL_REQUEST_COMMIT}" -- "${files_to_check[@]}" | wc -l) set -e if [[ "${package_modified}" -gt 0 || "$KOKORO_BUILD_ARTIFACTS_SUBDIR" == *"continuous"* ]]; then From 936e27d777978c3b2c1cc2ec924aafd62ca24c83 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 1 May 2026 19:24:19 +0000 Subject: [PATCH 2/2] test trigger --- packages/google-auth/mypy.ini | 1 + packages/google-cloud-dlp/setup.py | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/google-auth/mypy.ini b/packages/google-auth/mypy.ini index c129006db138..b8a474e963d7 100644 --- a/packages/google-auth/mypy.ini +++ b/packages/google-auth/mypy.ini @@ -1,3 +1,4 @@ [mypy] python_version = 3.9 namespace_packages = True + diff --git a/packages/google-cloud-dlp/setup.py b/packages/google-cloud-dlp/setup.py index b67208d3ed9c..972a5a3ed74c 100644 --- a/packages/google-cloud-dlp/setup.py +++ b/packages/google-cloud-dlp/setup.py @@ -28,6 +28,7 @@ version = None + with open(os.path.join(package_root, "google/cloud/dlp/gapic_version.py")) as fp: version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read()) assert len(version_candidates) == 1