Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
01d4753
added unit test sharding
daniel-sanche Jun 12, 2026
a7502d4
run system tests concurrently
daniel-sanche Jun 12, 2026
9ad0f0c
added changes to many packages for testing
daniel-sanche Jun 12, 2026
02c7653
added sharding test file
daniel-sanche Jun 12, 2026
3c8d057
added unit-complete to gather all shards
daniel-sanche Jun 12, 2026
73ab091
changed shard params
daniel-sanche Jun 12, 2026
74f1ef7
fixed tests
daniel-sanche Jun 12, 2026
a450254
fix coverage
daniel-sanche Jun 12, 2026
af4d10c
fix system tests
daniel-sanche Jun 12, 2026
15916df
split out system test logs
daniel-sanche Jun 12, 2026
49cac0f
attempt fix for lint
daniel-sanche Jun 12, 2026
d8dd522
update system tests to show logs for each target
daniel-sanche Jun 12, 2026
de74a68
update sharding logic
daniel-sanche Jun 12, 2026
46d1583
fixed lint/mypy runs
daniel-sanche Jun 12, 2026
6e3531d
removed sqlalchemy-spanner from touched packages
daniel-sanche Jun 12, 2026
e6167bd
system tests print all logs in main build log
daniel-sanche Jun 12, 2026
fd5792d
removed many SHARD_TEST files
daniel-sanche Jun 12, 2026
8b825d5
updated lint and mypy logic
daniel-sanche Jun 12, 2026
32968a9
add shard descriptions
daniel-sanche Jun 12, 2026
ff1274f
remove global run on ci/ change
daniel-sanche Jun 12, 2026
c49b06d
attempt cover fix
daniel-sanche Jun 12, 2026
1cd8c1f
attempt fix for cover
daniel-sanche Jun 12, 2026
a0f5c9a
allow hidden files for cover
daniel-sanche Jun 12, 2026
71f444a
fail fast
daniel-sanche Jun 12, 2026
cf1a1f1
use individual coverage checks
daniel-sanche Jun 12, 2026
b00967f
loosen firestore coverage requirement
daniel-sanche Jun 12, 2026
7bb323c
activated more packages
daniel-sanche Jun 12, 2026
3633089
10 packages total
daniel-sanche Jun 13, 2026
980d8eb
change default for coverage percent
daniel-sanche Jun 13, 2026
a5cc497
activated 11th package (enable sharding)
daniel-sanche Jun 13, 2026
b36b559
fixed typo
daniel-sanche Jun 13, 2026
c3cf49e
change shard logic
daniel-sanche Jun 13, 2026
acdfb18
iterating on shard logic
daniel-sanche Jun 13, 2026
9c80a51
rename tests
daniel-sanche Jun 13, 2026
cf554ca
add label to number in shard
daniel-sanche Jun 13, 2026
886d6d9
unit tests fail if initialize fails
daniel-sanche Jun 13, 2026
83ca04a
added known-bad package
daniel-sanche Jun 13, 2026
ae05642
added summary to cover step
daniel-sanche Jun 13, 2026
7b565a4
added no-fail .coveragerc to sqlalchemy-spanner
daniel-sanche Jun 13, 2026
72503de
Merge branch 'main' into ci_sharding
daniel-sanche Jun 18, 2026
e34b654
reverted systen test changes
daniel-sanche Jun 19, 2026
6c1be8b
added github tag to test all packages
daniel-sanche Jul 6, 2026
8fb68d3
re-run when label added
daniel-sanche Jul 6, 2026
fb90860
don't trigger on label changes
daniel-sanche Jul 6, 2026
6123e7a
revered unrelated changes
daniel-sanche Jul 6, 2026
c99a693
increased shard count
daniel-sanche Jul 6, 2026
ee7cabc
isolate specific packages
daniel-sanche Jul 6, 2026
40d31e3
isolated shards should be included in max_shard count
daniel-sanche Jul 6, 2026
89e5499
changed shard names
daniel-sanche Jul 6, 2026
a1fab95
use pacakge weights instead of isolation
daniel-sanche Jul 6, 2026
92626bd
parallelize final cover check
daniel-sanche Jul 6, 2026
8c4d2dd
resolve merge conflict
daniel-sanche Jul 6, 2026
7ccca59
Merge branch 'main' into ci_sharding
daniel-sanche Jul 6, 2026
2e9bafc
added additional weights
daniel-sanche Jul 6, 2026
f14d489
pack shards alphabetically
daniel-sanche Jul 6, 2026
e4495b8
fixed typo
daniel-sanche Jul 6, 2026
80f0061
avoid combining all coverage files
daniel-sanche Jul 6, 2026
964e142
optimized coverage step
daniel-sanche Jul 7, 2026
b4733da
fix coverage files
daniel-sanche Jul 7, 2026
8ea10ec
change MAX_JOBS
daniel-sanche Jul 7, 2026
bdc977a
end early if fail_under = 0
daniel-sanche Jul 7, 2026
5cb0e26
added pip cache
daniel-sanche Jul 7, 2026
deaabe7
fixing bug in coverage search
daniel-sanche Jul 7, 2026
b20bb1a
enable test against ces
daniel-sanche Jul 7, 2026
15421a7
removed empty file
daniel-sanche Jul 7, 2026
b4f9d9d
updated find call
daniel-sanche Jul 7, 2026
b9f750d
combine coverage in shards
daniel-sanche Jul 7, 2026
073dc07
Revert "combine coverage in shards"
daniel-sanche Jul 7, 2026
da2f41e
use RAM disk for coverage results
daniel-sanche Jul 7, 2026
e611fe7
made max shards configurable
daniel-sanche Jul 7, 2026
e453d2c
added test files
daniel-sanche Jul 7, 2026
45b5e68
define package weights in yaml
daniel-sanche Jul 7, 2026
fa06713
added fast path for coverage check
daniel-sanche Jul 7, 2026
cd33370
undo fast-path optimization
daniel-sanche Jul 7, 2026
5bfe2d1
only upload coverage for first and last supported version
daniel-sanche Jul 7, 2026
6c0566f
use 3.10 as lower bound
daniel-sanche Jul 7, 2026
e1bedf1
avoid going over max_shards
daniel-sanche Jul 7, 2026
60a3e74
fixed coverage condition
daniel-sanche Jul 7, 2026
a4566cf
use all runtimes in coverage
daniel-sanche Jul 7, 2026
010e1ad
remove empty files
daniel-sanche Jul 7, 2026
e35ea34
removed duplication
daniel-sanche Jul 7, 2026
d04104d
cleaned up conditional tests
daniel-sanche Jul 7, 2026
cf3de20
added back subdirs
daniel-sanche Jul 7, 2026
f1eb3a4
added comments to sharding script
daniel-sanche Jul 7, 2026
c70613a
moved script out of yaml
daniel-sanche Jul 7, 2026
eaf75e9
print only count for successes
daniel-sanche Jul 7, 2026
fb71278
Merge branch 'main' into ci_sharding
daniel-sanche Jul 17, 2026
a05d1fb
update spanner coveragerc
daniel-sanche Jul 17, 2026
04fb332
changed sqlalchemy-spanner coverage value
daniel-sanche Jul 17, 2026
4382fcc
added comment
daniel-sanche Jul 22, 2026
4e8892c
fixed truncation issues
daniel-sanche Jul 22, 2026
7ca0171
Merge branch 'main' into ci_sharding
daniel-sanche Jul 24, 2026
eefea36
Merge branch 'main' into ci_sharding
daniel-sanche Jul 27, 2026
e394b88
Merge branch 'main' into ci_sharding
daniel-sanche Jul 28, 2026
f8da556
Merge branch 'main' into ci_sharding
daniel-sanche Jul 29, 2026
4f3b012
show preview in shard name for preview packages
daniel-sanche Jul 29, 2026
09d705a
improved git diff logic for preview packages
daniel-sanche Jul 29, 2026
796eedb
improve how multiple package directories are handled
daniel-sanche Jul 30, 2026
36c55dc
adjust how package names are displayed
daniel-sanche Jul 30, 2026
4e6f3fc
group preview packages with main package in shards
daniel-sanche Jul 30, 2026
8f12c4e
improved sharding algorithnm
daniel-sanche Jul 30, 2026
9bd04b8
make sure up to MAX_SHARDS are used
daniel-sanche Jul 30, 2026
c16385f
trying different shard algorithm
daniel-sanche Jul 30, 2026
8816f61
revered back to simpler sharding algorithm
daniel-sanche Jul 30, 2026
b5639c6
fixing mypy check
daniel-sanche Jul 30, 2026
7c29040
obey test all flag in lint checks
daniel-sanche Jul 30, 2026
f40572c
use uv
daniel-sanche Jul 30, 2026
4822342
dded uv seed to allow pip in venvs
daniel-sanche Jul 30, 2026
73ed7ae
experiemting with inner-shard parallel runs
daniel-sanche Jul 30, 2026
ef002b7
added sharding to mypy
daniel-sanche Jul 30, 2026
a34aa54
Apply suggestions from code review
daniel-sanche Jul 30, 2026
df7f4f6
adjusting mypy sharding
daniel-sanche Jul 30, 2026
96de058
changed unit test shard number
daniel-sanche Jul 30, 2026
b8e1a7f
reducing shard count
daniel-sanche Jul 30, 2026
fb05653
use single process for unit tests
daniel-sanche Jul 30, 2026
b577b34
revert crc32c coverage change
daniel-sanche Jul 30, 2026
1805063
refactoring scripts
daniel-sanche Jul 30, 2026
8d8d45a
made diff smaller
daniel-sanche Jul 30, 2026
19fa8a5
touch 11 packages (2 shards)
daniel-sanche Jul 30, 2026
40b7f32
test with 10 packages (1 shard)
daniel-sanche Jul 30, 2026
6ec927a
corrected 10 packages (1 shard)
daniel-sanche Jul 30, 2026
0ada1a0
test with compute only (preview and non-preview)
daniel-sanche Jul 30, 2026
162b7f2
only test preview package if modified
daniel-sanche Jul 30, 2026
c727014
unselect preview package
daniel-sanche Jul 30, 2026
a49c7a1
revert changes to compute
daniel-sanche Jul 30, 2026
43cfe82
cover should always run
daniel-sanche Jul 30, 2026
941b128
update cover logic
daniel-sanche Jul 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 85 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,55 @@ name: lint
permissions:
contents: read

env:
NOX_REUSE_EXISTING_VIRTUALENVS: "true"
NOX_ENVDIR: "/tmp/shared_nox_envs"
NOX_DEFAULT_VENV_BACKEND: "uv"
UV_VENV_SEED: "1"
# Run checks in parallel using 4 cores
PARALLEL_WORKERS: "4"

jobs:
initialize:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
is_full_run: ${{ steps.check-label.outputs.is_full_run }}
env:
MAX_SHARDS: 4
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
# Use a fetch-depth of 2 to avoid error `fatal: origin/main...HEAD: no merge base`
# See https://github.com/googleapis/google-cloud-python/issues/12013
# and https://github.com/actions/checkout#checkout-head.
with:
fetch-depth: 2
persist-credentials: false
- name: Check for unit_test:all_packages label
id: check-label
run: |
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'unit_test:all_packages') }}" == "true" ]]; then
echo "is_full_run=true" >> $GITHUB_OUTPUT
else
echo "is_full_run=false" >> $GITHUB_OUTPUT
fi
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.10"
- name: Get package shards
id: set-matrix
env:
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_ALL_PACKAGES: ${{ steps.check-label.outputs.is_full_run }}
run: |
if [ -n "$TARGET_BRANCH" ]; then
git fetch origin "$TARGET_BRANCH" --depth=1 || true
fi
python3 ci/get_package_shards.py

lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -24,18 +72,27 @@ jobs:
with:
fetch-depth: 2
persist-credentials: false
- name: Check for unit_test:all_packages label
id: check-label
run: |
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'unit_test:all_packages') }}" == "true" ]]; then
echo "is_full_run=true" >> $GITHUB_OUTPUT
else
echo "is_full_run=false" >> $GITHUB_OUTPUT
fi
- name: Setup Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.14"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
python -m pip install nox uv
- name: Run lint
env:
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_ALL_PACKAGES: ${{ steps.check-label.outputs.is_full_run }}
TEST_TYPE: lint
# TODO(https://github.com/googleapis/google-cloud-python/issues/13775): Specify `PY_VERSION` rather than relying on the default python version of the nox session.
PY_VERSION: "unused"
Expand All @@ -45,13 +102,22 @@ jobs:
env:
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_ALL_PACKAGES: ${{ steps.check-label.outputs.is_full_run }}
TEST_TYPE: lint_setup_py
# TODO(https://github.com/googleapis/google-cloud-python/issues/13775): Specify `PY_VERSION` rather than relying on the default python version of the nox session.
PY_VERSION: "unused"
run: |
ci/run_conditional_tests.sh
mypy:

mypy-shard:
needs: initialize
if: needs.initialize.outputs.matrix != '[]' && needs.initialize.outputs.matrix != ''
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
package_shard: ${{ fromJson(needs.initialize.outputs.matrix) }}
name: ${{ matrix.package_shard.is_sharded && format('mypy ({0})', matrix.package_shard.name) || format('mypy ({0})', matrix.package_shard.description) }}
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
Expand All @@ -68,13 +134,28 @@ jobs:
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run mypy
python -m pip install nox uv
- name: Run mypy for ${{ matrix.package_shard.description }}
env:
BUILD_TYPE: presubmit
TARGET_BRANCH: ${{ github.base_ref || github.event.merge_group.base_ref }}
TEST_TYPE: mypy
PACKAGE_LIST: ${{ matrix.package_shard.packages }}
# TODO(https://github.com/googleapis/google-cloud-python/issues/13775): Specify `PY_VERSION` rather than relying on the default python version of the nox session.
PY_VERSION: "unused"
run: |
ci/run_conditional_tests.sh

mypy-status:
if: always()
needs: [initialize, mypy-shard]
runs-on: ubuntu-latest
name: mypy-status
steps:
- name: Check mypy job status
run: |
if [[ "${{ needs['mypy-shard'].result }}" != "success" && "${{ needs['mypy-shard'].result }}" != "skipped" ]]; then
echo "mypy failed with result: ${{ needs['mypy-shard'].result }}"
exit 1
fi
echo "All mypy shards passed successfully!"
Loading
Loading