Skip to content

Commit 8454b17

Browse files
committed
Merge branch 'origin/main' into feature/lazy-imports-google-auth
2 parents faa70d1 + b2f7cb0 commit 8454b17

56 files changed

Lines changed: 1480 additions & 259 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/gapic-generator-tests.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@ name: Gapic Generator Specialized Tests
55

66
on:
77
pull_request:
8-
paths:
9-
- 'packages/gapic-generator/**'
10-
- '.github/workflows/gapic-generator-tests.yml'
118
push:
129
branches: [main]
13-
paths:
14-
- 'packages/gapic-generator/**'
1510

1611
concurrency:
1712
group: gapic-gen-${{ github.head_ref || github.run_id }}
@@ -30,11 +25,8 @@ env:
3025
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
3126

3227
jobs:
28+
# Check if the gapic-generator was changed. If so, execute specialized tests
3329
check_changes:
34-
# We use a job-level 'if' with dorny/paths-filter because GitHub's top-level
35-
# 'on: pull_request: paths' can be bypassed during repository-wide migrations
36-
# or structural changes. This ensures these specialized (and heavy) matrix
37-
# jobs stay silent on PRs that do not touch the generator.
3830
runs-on: ubuntu-latest
3931
outputs:
4032
run_generator: ${{ steps.filter.outputs.generator }}
@@ -59,7 +51,7 @@ jobs:
5951
all_python: ${{ env.ALL_PYTHON }}
6052
latest_stable_python: ${{ env.LATEST_STABLE_PYTHON }}
6153
prerelease_python: ${{ env.PRERELEASE_PYTHON }}
62-
trimmed_python: $${{ env.TRIMMED_PYTHON }}
54+
trimmed_python: ${{ env.TRIMMED_PYTHON }}
6355
steps:
6456
- run: echo "Initializing config for gapic-generator"
6557

@@ -232,7 +224,6 @@ jobs:
232224
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
233225
with:
234226
persist-credentials: false
235-
236227
- name: Cache Bazel files
237228
id: cache-bazel
238229
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5
@@ -247,3 +238,27 @@ jobs:
247238
# WORKSPACE file is located there.
248239
cd packages/gapic-generator
249240
bazelisk test //tests/integration/... --test_output=errors
241+
242+
# Final job to simplify branch protection rules.
243+
# This job will be reported as 'Success' if all its dependencies either
244+
# pass or are skipped due to path filtering.
245+
status:
246+
needs: [check_changes, python_config, showcase-unit, showcase-mypy, goldens, goldens-prerelease, fragment-snippet, integration]
247+
if: always()
248+
runs-on: ubuntu-latest
249+
steps:
250+
- name: Check all jobs for failure
251+
env:
252+
NEEDS_JSON: ${{ toJson(needs) }}
253+
run: |
254+
# 1. Print a human-readable list of each dependency job and its final status.
255+
echo "Job Results:"
256+
echo "$NEEDS_JSON" | jq -r 'to_entries[] | " - \(.key): \(.value.result)"'
257+
258+
# 2. Evaluate if any job actually failed or was cancelled.
259+
if echo "$NEEDS_JSON" | jq -e 'to_entries[].value | select(.result == "failure" or .result == "cancelled")' >/dev/null; then
260+
echo "Error: One or more required jobs failed or were cancelled."
261+
exit 1
262+
fi
263+
echo "All checks passed or were successfully skipped."
264+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: import-profiler
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- preview
8+
# Trigger workflow on GitHub merge queue events
9+
merge_group:
10+
types: [checks_requested]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
import-profile:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 60
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
with:
23+
fetch-depth: 2
24+
- name: Setup Python
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version: "3.15"
28+
allow-prereleases: true
29+
- name: Upgrade pip, setuptools, and wheel
30+
run: |
31+
python -m pip install --upgrade setuptools pip wheel
32+
- name: Run import profiler
33+
env:
34+
BUILD_TYPE: presubmit
35+
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
36+
TEST_TYPE: import_profile
37+
PY_VERSION: "3.15"
38+
run: |
39+
ci/run_conditional_tests.sh

.release-please-bulk-manifest.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"packages/google-analytics-data": "0.23.0",
1313
"packages/google-api-core": "2.31.0",
1414
"packages/google-apps-card": "0.7.0",
15-
"packages/google-apps-chat": "0.10.1",
15+
"packages/google-apps-chat": "0.10.2",
1616
"packages/google-apps-events-subscriptions": "0.6.0",
1717
"packages/google-apps-meet": "0.5.0",
1818
"packages/google-apps-script-type": "0.8.0",
1919
"packages/google-area120-tables": "0.15.0",
20-
"packages/google-auth": "2.55.2",
20+
"packages/google-auth": "2.56.0",
2121
"packages/google-auth-httplib2": "0.4.0",
2222
"packages/google-auth-oauthlib": "1.4.0",
2323
"packages/google-backstory": "0.1.0",
@@ -31,7 +31,7 @@
3131
"packages/google-cloud-api-gateway": "1.16.0",
3232
"packages/google-cloud-api-keys": "0.9.0",
3333
"packages/google-cloud-apigee-connect": "1.16.0",
34-
"packages/google-cloud-apigee-registry": "0.10.0",
34+
"packages/google-cloud-apigee-registry": "0.10.1",
3535
"packages/google-cloud-apihub": "0.7.0",
3636
"packages/google-cloud-apiregistry": "0.3.0",
3737
"packages/google-cloud-appengine-admin": "1.18.0",
@@ -68,7 +68,7 @@
6868
"packages/google-cloud-bigtable": "2.40.0",
6969
"packages/google-cloud-billing": "1.20.0",
7070
"packages/google-cloud-billing-budgets": "1.21.0",
71-
"packages/google-cloud-binary-authorization": "1.18.0",
71+
"packages/google-cloud-binary-authorization": "1.19.0",
7272
"packages/google-cloud-build": "3.38.0",
7373
"packages/google-cloud-capacityplanner": "0.5.0",
7474
"packages/google-cloud-certificate-manager": "1.14.0",
@@ -113,7 +113,7 @@
113113
"packages/google-cloud-dms": "1.16.0",
114114
"packages/google-cloud-dns": "0.37.0",
115115
"packages/google-cloud-documentai": "3.15.0",
116-
"packages/google-cloud-documentai-toolbox": "0.17.0",
116+
"packages/google-cloud-documentai-toolbox": "0.17.1",
117117
"packages/google-cloud-domains": "1.14.0",
118118
"packages/google-cloud-edgecontainer": "0.8.1",
119119
"packages/google-cloud-edgenetwork": "0.5.1",
@@ -154,7 +154,7 @@
154154
"packages/google-cloud-managedkafka-schemaregistry": "0.4.1",
155155
"packages/google-cloud-media-translation": "0.14.1",
156156
"packages/google-cloud-memcache": "1.16.0",
157-
"packages/google-cloud-memorystore": "0.5.1",
157+
"packages/google-cloud-memorystore": "0.5.2",
158158
"packages/google-cloud-migrationcenter": "0.4.1",
159159
"packages/google-cloud-modelarmor": "0.7.1",
160160
"packages/google-cloud-monitoring": "2.31.0",
@@ -210,7 +210,7 @@
210210
"packages/google-cloud-source-context": "1.11.0",
211211
"packages/google-cloud-spanner": "3.69.0",
212212
"packages/google-cloud-speech": "2.40.0",
213-
"packages/google-cloud-storage": "3.12.1",
213+
"packages/google-cloud-storage": "3.13.0",
214214
"packages/google-cloud-storage-control": "1.12.0",
215215
"packages/google-cloud-storage-transfer": "1.21.0",
216216
"packages/google-cloud-storagebatchoperations": "0.8.0",
@@ -240,7 +240,7 @@
240240
"packages/google-cloud-workloadmanager": "0.2.1",
241241
"packages/google-cloud-workstations": "0.8.1",
242242
"packages/google-developer-knowledge": "0.1.0",
243-
"packages/google-devicesandservices-health": "0.1.0",
243+
"packages/google-devicesandservices-health": "0.1.1",
244244
"packages/google-geo-type": "0.7.0",
245245
"packages/google-maps-addressvalidation": "0.7.0",
246246
"packages/google-maps-areainsights": "0.5.0",

ci/run_single_test.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,62 @@ case ${TEST_TYPE} in
105105
;;
106106
esac
107107
;;
108+
import_profile)
109+
if [ -f setup.py ] || [ -f pyproject.toml ]; then
110+
echo "Creating temporary virtualenv for import profile..."
111+
python3 -m venv .venv-profiler
112+
source .venv-profiler/bin/activate
113+
python -m pip install --upgrade pip setuptools
114+
115+
PACKAGE_NAME=$(basename $(pwd))
116+
PROFILER_TEMP_DIR=$(mktemp -d)
117+
cp ../../scripts/import_profiler/profiler.py "${PROFILER_TEMP_DIR}/profiler.py"
118+
PROFILER_SCRIPT="${PROFILER_TEMP_DIR}/profiler.py"
119+
BASELINE_CSV="${PROFILER_TEMP_DIR}/baseline_${PACKAGE_NAME}.csv"
120+
121+
if [ -n "${TARGET_BRANCH}" ]; then
122+
# Try upstream first (for forks), then origin
123+
BASELINE_COMMIT=$(git merge-base HEAD "upstream/${TARGET_BRANCH}" 2>/dev/null || \
124+
git merge-base HEAD "origin/${TARGET_BRANCH}" 2>/dev/null || \
125+
git merge-base HEAD "${TARGET_BRANCH}" 2>/dev/null || true)
126+
if [ -n "${BASELINE_COMMIT}" ]; then
127+
echo "Checking out baseline commit ${BASELINE_COMMIT} in a temporary worktree..."
128+
REPO_PREFIX=$(git rev-parse --show-prefix)
129+
WORKTREE_DIR=$(mktemp -d)
130+
rmdir "${WORKTREE_DIR}"
131+
if git worktree add "${WORKTREE_DIR}" "${BASELINE_COMMIT}" 2>/dev/null; then
132+
(
133+
cd "${WORKTREE_DIR}/${REPO_PREFIX}"
134+
if [ -f setup.py ] || [ -f pyproject.toml ]; then
135+
pip install -e .
136+
python "${PROFILER_SCRIPT}" --package "${PACKAGE_NAME}" --iterations 11 --csv "${BASELINE_CSV}"
137+
fi
138+
)
139+
git worktree remove -f "${WORKTREE_DIR}"
140+
else
141+
echo "Failed to create git worktree for baseline. Skipping baseline generation."
142+
fi
143+
else
144+
echo "Could not find baseline commit for ${TARGET_BRANCH:-main}. Skipping baseline generation."
145+
fi
146+
fi
147+
148+
pip install -e .
149+
150+
if [ -f "${BASELINE_CSV}" ]; then
151+
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000 --diff-baseline "${BASELINE_CSV}" --diff-threshold 100
152+
else
153+
python ${PROFILER_SCRIPT} --package ${PACKAGE_NAME} --iterations 11 --fail-threshold 5000
154+
fi
155+
retval=$?
156+
deactivate
157+
rm -rf .venv-profiler
158+
rm -rf "${PROFILER_TEMP_DIR}"
159+
else
160+
echo "Skipping import_profile as this does not appear to be a Python package (no setup.py or pyproject.toml)."
161+
retval=0
162+
fi
163+
;;
108164
*)
109165
nox -s ${TEST_TYPE}
110166
retval=$?

librarian.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ libraries:
146146
python:
147147
default_version: v1
148148
- name: google-apps-chat
149-
version: 0.10.1
149+
version: 0.10.2
150150
apis:
151151
- path: google/chat/v1
152152
python:
@@ -227,7 +227,7 @@ libraries:
227227
metadata_name_override: area120tables
228228
default_version: v1alpha1
229229
- name: google-auth
230-
version: 2.55.2
230+
version: 2.56.0
231231
python:
232232
library_type: AUTH
233233
- name: google-auth-httplib2
@@ -348,7 +348,7 @@ libraries:
348348
metadata_name_override: apigeeconnect
349349
default_version: v1
350350
- name: google-cloud-apigee-registry
351-
version: 0.10.0
351+
version: 0.10.1
352352
skip_generate: true
353353
- name: google-cloud-apihub
354354
version: 0.7.0
@@ -670,7 +670,7 @@ libraries:
670670
metadata_name_override: billingbudgets
671671
default_version: v1
672672
- name: google-cloud-binary-authorization
673-
version: 1.18.0
673+
version: 1.19.0
674674
apis:
675675
- path: google/cloud/binaryauthorization/v1
676676
- path: google/cloud/binaryauthorization/v1beta1
@@ -1045,7 +1045,7 @@ libraries:
10451045
metadata_name_override: documentai
10461046
default_version: v1
10471047
- name: google-cloud-documentai-toolbox
1048-
version: 0.17.0
1048+
version: 0.17.1
10491049
python:
10501050
library_type: OTHER
10511051
metadata_name_override: documentai-toolbox
@@ -1429,7 +1429,7 @@ libraries:
14291429
metadata_name_override: memcache
14301430
default_version: v1
14311431
- name: google-cloud-memorystore
1432-
version: 0.5.1
1432+
version: 0.5.2
14331433
apis:
14341434
- path: google/cloud/memorystore/v1
14351435
- path: google/cloud/memorystore/v1beta
@@ -1956,7 +1956,7 @@ libraries:
19561956
metadata_name_override: speech
19571957
default_version: v1
19581958
- name: google-cloud-storage
1959-
version: 3.12.1
1959+
version: 3.13.0
19601960
apis:
19611961
- path: google/storage/v2
19621962
python:
@@ -2234,7 +2234,7 @@ libraries:
22342234
- python-gapic-name=developer_knowledge
22352235
default_version: v1
22362236
- name: google-devicesandservices-health
2237-
version: 0.1.0
2237+
version: 0.1.1
22382238
apis:
22392239
- path: google/devicesandservices/health/v4
22402240
copyright_year: "2026"

0 commit comments

Comments
 (0)