Skip to content

Commit fb71278

Browse files
Merge branch 'main' into ci_sharding
2 parents eaf75e9 + 95da740 commit fb71278

2,642 files changed

Lines changed: 314222 additions & 31940 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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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: Run import profiler
30+
env:
31+
BUILD_TYPE: presubmit
32+
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
33+
TEST_TYPE: import_profile
34+
PY_VERSION: "3.15"
35+
# Workaround: Allows libcst to compile on Python 3.15+ while PyO3 catches up
36+
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
37+
run: |
38+
ci/run_conditional_tests.sh

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
strategy:
7373
fail-fast: true
7474
matrix:
75-
python: ['3.9', '3.10', "3.11", "3.12", "3.13", "3.14"]
75+
python: ['3.10', "3.11", "3.12", "3.13", "3.14"]
7676
package_shard: ${{ fromJson(needs.initialize.outputs.matrix) }}
7777
name: ${{ matrix.package_shard.is_sharded && format('unit ({0}, {1})', matrix.python, matrix.package_shard.name) || format('unit ({0})', matrix.python) }}
7878
steps:

.librarian/generator-input/client-post-processing/bigtable-integration.yaml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -357,52 +357,6 @@ replacements:
357357
358358
Quick Start
359359
count: 1
360-
- paths: [
361-
packages/google-cloud-bigtable/mypy.ini
362-
]
363-
before: |
364-
\[mypy\]
365-
[\s\S]*?incremental = True
366-
after: |
367-
[mypy]
368-
python_version = 3.13
369-
namespace_packages = True
370-
check_untyped_defs = True
371-
warn_unreachable = True
372-
disallow_any_generics = True
373-
exclude = tests/unit/gapic/
374-
375-
[mypy-grpc.*]
376-
ignore_missing_imports = True
377-
378-
[mypy-google.auth.*]
379-
ignore_missing_imports = True
380-
381-
[mypy-google.iam.*]
382-
ignore_missing_imports = True
383-
384-
[mypy-google.longrunning.*]
385-
ignore_missing_imports = True
386-
387-
[mypy-google.oauth2.*]
388-
ignore_missing_imports = True
389-
390-
[mypy-google.rpc.*]
391-
ignore_missing_imports = True
392-
393-
[mypy-proto.*]
394-
ignore_missing_imports = True
395-
396-
[mypy-pytest]
397-
ignore_missing_imports = True
398-
399-
[mypy-google.cloud.*]
400-
ignore_errors = True
401-
402-
# only verify data client
403-
[mypy-google.cloud.bigtable.data.*]
404-
ignore_errors = False
405-
count: 1
406360
# Note: noxfile.py is heavily customized so we clobber the whole file.
407361
- paths: [
408362
packages/google-cloud-bigtable/noxfile.py

.librarian/generator-input/client-post-processing/datastore-integration.yaml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,42 +39,6 @@ replacements:
3939
"google-cloud-core >= 2.0.0, <3.0.0",
4040
"grpcio >= 1.59.0, < 2.0.0",
4141
count: 1
42-
- paths: [
43-
"packages/google-cloud-datastore/mypy.ini",
44-
]
45-
before: |-
46-
# Performance: reuse results from previous runs to speed up 'nox'
47-
incremental = True
48-
after: |-
49-
# Performance: reuse results from previous runs to speed up "nox"
50-
incremental = True
51-
52-
[mypy-google.cloud.datastore._app_engine_key_pb2]
53-
ignore_errors = True
54-
55-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
56-
# Remove once this generator bug is fixed
57-
[mypy-google.cloud.datastore_v1.services.datastore.async_client]
58-
ignore_errors = True
59-
60-
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2410):
61-
# Remove once this generator bug is fixed
62-
[mypy-google.cloud.datastore_v1.services.datastore.client]
63-
ignore_errors = True
64-
count: 1
65-
- paths: [
66-
"packages/google-cloud-datastore/mypy.ini",
67-
]
68-
before: |
69-
ignore_missing_imports = False
70-
71-
# TODO\(https://github.com/googleapis/gapic-generator-python/issues/2563\):
72-
# Dependencies that historically lacks py.typed markers
73-
\[mypy-google\.iam\.\*\]
74-
ignore_missing_imports = True
75-
after: |
76-
ignore_missing_imports = True
77-
count: 1
7842
- paths: [
7943
"packages/google-cloud-datastore/docs/index.rst",
8044
]

0 commit comments

Comments
 (0)