Skip to content

Commit 6af4f33

Browse files
authored
Merge branch 'main' into feat/version-scanner-pr3
2 parents a015856 + 8539a8c commit 6af4f33

2,824 files changed

Lines changed: 224122 additions & 37233 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/django-spanner-django5.2_tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
outputs:
2222
run_django_spanner: ${{ steps.filter.outputs.django_spanner }}
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v6
2525
- uses: dorny/paths-filter@v3
2626
id: filter
2727
with:
@@ -68,9 +68,9 @@ jobs:
6868

6969
steps:
7070
- name: Checkout code
71-
uses: actions/checkout@v4
71+
uses: actions/checkout@v6
7272
- name: Setup Python
73-
uses: actions/setup-python@v5
73+
uses: actions/setup-python@v6
7474
with:
7575
python-version: "3.10"
7676
- name: Run Django tests

.github/workflows/gapic-generator-tests.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ env:
1818
SHOWCASE_VERSION: 0.35.0
1919
PROTOC_VERSION: 3.20.2
2020
LATEST_STABLE_PYTHON: 3.14
21-
ALL_PYTHON: "['3.10', '3.11', '3.12', '3.13', '3.14']"
21+
PRERELEASE_PYTHON: 3.15
22+
ALL_PYTHON: "['3.10', '3.11', '3.12', '3.13', '3.14', '3.15']"
23+
TRIMMED_PYTHON: "['3.10', '3.14', '3.15']"
24+
# Workaround: Allows libcst to compile on Python 3.15+ while PyO3 catches up
25+
# Can be removed once libcst releases a version with native Python 3.15 wheels
26+
# Follow https://github.com/Instagram/LibCST/issues/1445 for updates.
27+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
2228

2329
jobs:
2430
check_changes:
@@ -47,6 +53,8 @@ jobs:
4753
outputs:
4854
all_python: ${{ env.ALL_PYTHON }}
4955
latest_stable_python: ${{ env.LATEST_STABLE_PYTHON }}
56+
prerelease_python: ${{ env.PRERELEASE_PYTHON }}
57+
trimmed_python: $${{ env.TRIMMED_PYTHON }}
5058
steps:
5159
- run: echo "Initializing config for gapic-generator"
5260

@@ -65,6 +73,12 @@ jobs:
6573
uses: actions/setup-python@v6
6674
with:
6775
python-version: "${{ matrix.python }}"
76+
allow-prereleases: true
77+
# Caches compiled wheels locally to prevent building heavy libraries
78+
# such as grpcio, which we build from scratch on every run for Python 3.15+.
79+
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
80+
cache: 'pip'
81+
cache-dependency-path: '**/requirements*.txt'
6882
- name: Install System Deps & Protoc
6983
run: |
7084
sudo apt-get update && sudo apt-get install -y curl pandoc unzip
@@ -132,10 +146,16 @@ jobs:
132146
runs-on: ubuntu-latest
133147
steps:
134148
- uses: actions/checkout@v6
135-
- name: Set up Python
149+
- name: Set up Python ${{ needs.python_config.outputs.prerelease_python }}
136150
uses: actions/setup-python@v6
137151
with:
138-
python-version: ${{ needs.python_config.outputs.latest_stable_python }}
152+
python-version: ${{ needs.python_config.outputs.prerelease_python }}
153+
allow-prereleases: true
154+
# Caches compiled wheels locally to prevent building heavy libraries
155+
# such as grpcio, which we build from scratch on every run for Python 3.15+.
156+
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
157+
cache: 'pip'
158+
cache-dependency-path: '**/requirements*.txt'
139159
- name: Install System Deps
140160
run: sudo apt-get update && sudo apt-get install -y pandoc
141161
- name: Run Goldens (Prerelease)
@@ -150,15 +170,20 @@ jobs:
150170
needs: python_config
151171
strategy:
152172
matrix:
153-
python: ["3.10", "3.14"]
173+
python: ${{ fromJSON(needs.python_config.outputs.trimmed_python) }}
154174
runs-on: ubuntu-latest
155175
steps:
156176
- uses: actions/checkout@v6
157177
- name: Set up Python
158178
uses: actions/setup-python@v6
159179
with:
160180
python-version: ${{ matrix.python }}
161-
# This fixes the Pandoc error
181+
allow-prereleases: true
182+
# Caches compiled wheels locally to prevent building heavy libraries
183+
# such as grpcio, which we build from scratch on every run for Python 3.15+.
184+
# Follow https://github.com/grpc/grpc/issues/41010 for updates.
185+
cache: 'pip'
186+
cache-dependency-path: '**/requirements*.txt'
162187
- name: Install System Deps & Protoc
163188
run: |
164189
sudo apt-get update && sudo apt-get install -y curl pandoc unzip

.github/workflows/regenerate-all.yml

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -43,44 +43,28 @@ jobs:
4343
run: |
4444
PATH=$PATH:/tmp/pandoc/bin
4545
librarian generate -all -v
46-
git diff --exit-code
4746
48-
- name: Create issue on diff
49-
if: failure()
50-
env:
51-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
- name: Check for generated code changes
5248
run: |
5349
if [ -n "$(git status --porcelain)" ]; then
54-
TITLE="Regeneration check found diff"
55-
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
56-
DIFF_STAT=$(git diff --stat)
57-
BODY="The post-submit [regeneration check]($RUN_URL) found a diff.
50+
git status
51+
echo "==================== GIT DIFF ===================="
52+
git diff
53+
echo "=================================================="
54+
echo "Regeneration produced code changes! Please run 'librarian generate -all -v' to update the generated files."
55+
exit 1
56+
fi
5857
59-
Diff summary:
60-
\`\`\`
61-
$DIFF_STAT
62-
\`\`\`"
58+
- name: Create issue if previous step fails
59+
if: ${{ failure() }}
60+
uses: googleapis/librarian/.github/actions/create-issue-on-failure@main
61+
with:
62+
title: "Regeneration failed"
63+
body: |
64+
The post-submit [regeneration check](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed.
6365
64-
EXISTING_ISSUE=$(gh issue list --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number')
65-
if [ -z "$EXISTING_ISSUE" ]; then
66-
gh issue create --title "$TITLE" --body "$BODY"
67-
else
68-
echo "Issue #$EXISTING_ISSUE already exists, adding a comment."
69-
gh issue comment "$EXISTING_ISSUE" --body "Another failure with diff occurred: $RUN_URL"
70-
fi
71-
fi
72-
- name: Create issue on generation failure
73-
if: failure()
74-
env:
75-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76-
run: |
77-
TITLE="Regeneration failed"
78-
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
79-
BODY="The post-submit [regeneration check]($RUN_URL) failed."
80-
EXISTING_ISSUE=$(gh issue list --state open --search "in:title \"$TITLE\"" --json number --jq '.[0].number')
81-
if [ -z "$EXISTING_ISSUE" ]; then
82-
gh issue create --title "$TITLE" --body "$BODY"
83-
else
84-
echo "Issue #$EXISTING_ISSUE already exists, adding a comment."
85-
gh issue comment "$EXISTING_ISSUE" --body "Another regeneration failure occurred: $RUN_URL"
86-
fi
66+
Please investigate the failure. To keep the `main` branch healthy, please consider **reverting the triggering change** first.
67+
68+
You can identify the cause from the workflow logs:
69+
- If the step 'Check for generated code changes' failed, there are pending code changes that need to be committed.
70+
- If the step 'Regenerate' failed, the generation script itself encountered an error.

.github/workflows/unittest.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ jobs:
1616
unit:
1717
runs-on: ubuntu-22.04
1818
strategy:
19+
fail-fast: true
1920
matrix:
2021
python: ['3.9', '3.10', "3.11", "3.12", "3.13", "3.14"]
2122
steps:
2223
- name: Checkout
23-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2425
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
2526
# See https://github.com/googleapis/google-cloud-python/issues/12013
2627
# and https://github.com/actions/checkout#checkout-head.
2728
with:
2829
fetch-depth: 2
2930
- name: Setup Python
30-
uses: actions/setup-python@v5
31+
uses: actions/setup-python@v6
3132
with:
3233
python-version: ${{ matrix.python }}
3334
- name: Install nox
@@ -79,7 +80,7 @@ jobs:
7980
python -m pip install coverage
8081
- name: Download coverage results
8182
if: ${{ steps.packages.outputs.num_files_changed > 0 }}
82-
uses: actions/download-artifact@v4
83+
uses: actions/download-artifact@v5
8384
with:
8485
path: .coverage-results/
8586
- name: Report coverage results
@@ -116,21 +117,23 @@ jobs:
116117
echo "============================================================"
117118
118119
set +e
119-
if [ -f "${pkg}/.coveragerc" ]; then
120+
pushd "${pkg}" > /dev/null
121+
if [ -f ".coveragerc" ]; then
120122
echo "Using package-specific configuration: ${pkg}/.coveragerc"
121123
# If fail_under is specified in the package-specific .coveragerc, coverage report
122124
# will automatically enforce it. Otherwise, we enforce the default.
123-
if grep -q "fail_under" "${pkg}/.coveragerc"; then
124-
coverage report --rcfile="${pkg}/.coveragerc" --include="${pkg}/**"
125+
if grep -q "fail_under" ".coveragerc"; then
126+
COVERAGE_FILE=../../.coverage coverage report --include="$PWD/**"
125127
else
126128
echo "No fail_under specified in ${pkg}/.coveragerc, enforcing default"
127-
coverage report --rcfile="${pkg}/.coveragerc" --include="${pkg}/**" --fail-under="${DEFAULT_FAIL_UNDER}"
129+
COVERAGE_FILE=../../.coverage coverage report --include="$PWD/**" --fail-under="${DEFAULT_FAIL_UNDER}"
128130
fi
129131
else
130132
echo "No .coveragerc found for ${pkg}, enforcing default"
131-
coverage report --include="${pkg}/**" --fail-under="${DEFAULT_FAIL_UNDER}"
133+
COVERAGE_FILE=../../.coverage coverage report --include="$PWD/**" --fail-under="${DEFAULT_FAIL_UNDER}"
132134
fi
133135
status=$?
136+
popd > /dev/null
134137
set -e
135138
136139
if [ ${status} -ne 0 ]; then

.kokoro/system.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,15 @@ run_package_test() {
6060

6161
PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/google-auth-project-id.json")
6262
GOOGLE_APPLICATION_CREDENTIALS="${KOKORO_GFILE_DIR}/google-auth-service-account.json"
63-
NOX_FILE="system_tests/noxfile.py"
64-
NOX_SESSION=""
63+
# Note: system.sh is also reused for monorepo-wide continuous unit test jobs
64+
# like `core_deps_from_source` and `prerelease_deps`. For google-auth, we only
65+
# want to override NOX_FILE to system_tests/noxfile.py when running actual system tests.
66+
if [[ -z "${NOX_SESSION}" || "${NOX_SESSION}" == "system-"* ]]; then
67+
NOX_FILE="system_tests/noxfile.py"
68+
NOX_SESSION=""
69+
else
70+
NOX_FILE="noxfile.py"
71+
fi
6572
;;
6673
*)
6774
PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")

.librarian/generator-input/client-post-processing/add-dependency-google-cloud-common.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ replacements:
1919
]
2020
before: |
2121
dependencies = \[
22-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
22+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
2323
# Exclude incompatible versions of `google-auth`
2424
# See https://github.com/googleapis/google-cloud-python/issues/12364
2525
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
2626
"grpcio >= 1.59.0, < 2.0.0",
2727
after: |
2828
dependencies = [
29-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
29+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
3030
# Exclude incompatible versions of `google-auth`
3131
# See https://github.com/googleapis/google-cloud-python/issues/12364
3232
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",

.librarian/generator-input/client-post-processing/add-missing-dependencies-to-setup-py-constraints.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ replacements:
1919
]
2020
before: |
2121
dependencies = \[
22-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
22+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
2323
# Exclude incompatible versions of `google-auth`
2424
# See https://github.com/googleapis/google-cloud-python/issues/12364
2525
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
2626
"grpcio >= 1.59.0, < 2.0.0",
2727
after: |
2828
dependencies = [
29-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
29+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
3030
# Exclude incompatible versions of `google-auth`
3131
# See https://github.com/googleapis/google-cloud-python/issues/12364
3232
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
@@ -38,14 +38,14 @@ replacements:
3838
]
3939
before: |
4040
dependencies = \[
41-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
41+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
4242
# Exclude incompatible versions of `google-auth`
4343
# See https://github.com/googleapis/google-cloud-python/issues/12364
4444
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
4545
"grpcio >= 1.59.0, < 2.0.0",
4646
after: |
4747
dependencies = [
48-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
48+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
4949
# Exclude incompatible versions of `google-auth`
5050
# See https://github.com/googleapis/google-cloud-python/issues/12364
5151
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
@@ -57,14 +57,14 @@ replacements:
5757
]
5858
before: |
5959
dependencies = \[
60-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
60+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
6161
# Exclude incompatible versions of `google-auth`
6262
# See https://github.com/googleapis/google-cloud-python/issues/12364
6363
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
6464
"grpcio >= 1.59.0, < 2.0.0",
6565
after: |
6666
dependencies = [
67-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
67+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
6868
# Exclude incompatible versions of `google-auth`
6969
# See https://github.com/googleapis/google-cloud-python/issues/12364
7070
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
@@ -76,14 +76,14 @@ replacements:
7676
]
7777
before: |
7878
dependencies = \[
79-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
79+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
8080
# Exclude incompatible versions of `google-auth`
8181
# See https://github.com/googleapis/google-cloud-python/issues/12364
8282
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
8383
"grpcio >= 1.59.0, < 2.0.0",
8484
after: |
8585
dependencies = [
86-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
86+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
8787
# Exclude incompatible versions of `google-auth`
8888
# See https://github.com/googleapis/google-cloud-python/issues/12364
8989
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
@@ -95,33 +95,33 @@ replacements:
9595
]
9696
before: |
9797
dependencies = \[
98-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
98+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
9999
# Exclude incompatible versions of `google-auth`
100100
# See https://github.com/googleapis/google-cloud-python/issues/12364
101101
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
102102
"grpcio >= 1.59.0, < 2.0.0",
103103
after: |
104104
dependencies = [
105-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
105+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
106106
# Exclude incompatible versions of `google-auth`
107107
# See https://github.com/googleapis/google-cloud-python/issues/12364
108108
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
109-
"google-cloud-org-policy >= 1.11.1, <2.0.0",
109+
"google-cloud-org-policy >= 1.13.1, <2.0.0",
110110
"grpcio >= 1.59.0, < 2.0.0",
111111
count: 1
112112
- paths: [
113113
packages/google-shopping-merchant-notifications/setup.py
114114
]
115115
before: |
116116
dependencies = \[
117-
"google-api-core\[grpc\] >= 2.17.1, <3.0.0",
117+
"google-api-core\[grpc\] >= 2.24.2, <3.0.0",
118118
# Exclude incompatible versions of `google-auth`
119119
# See https://github.com/googleapis/google-cloud-python/issues/12364
120120
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
121121
"grpcio >= 1.59.0, < 2.0.0",
122122
after: |
123123
dependencies = [
124-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
124+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
125125
# Exclude incompatible versions of `google-auth`
126126
# See https://github.com/googleapis/google-cloud-python/issues/12364
127127
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",

0 commit comments

Comments
 (0)