-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore: add test sharding to unit tests #17438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
daniel-sanche
wants to merge
93
commits into
main
Choose a base branch
from
ci_sharding
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 86 commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
01d4753
added unit test sharding
daniel-sanche a7502d4
run system tests concurrently
daniel-sanche 9ad0f0c
added changes to many packages for testing
daniel-sanche 02c7653
added sharding test file
daniel-sanche 3c8d057
added unit-complete to gather all shards
daniel-sanche 73ab091
changed shard params
daniel-sanche 74f1ef7
fixed tests
daniel-sanche a450254
fix coverage
daniel-sanche af4d10c
fix system tests
daniel-sanche 15916df
split out system test logs
daniel-sanche 49cac0f
attempt fix for lint
daniel-sanche d8dd522
update system tests to show logs for each target
daniel-sanche de74a68
update sharding logic
daniel-sanche 46d1583
fixed lint/mypy runs
daniel-sanche 6e3531d
removed sqlalchemy-spanner from touched packages
daniel-sanche e6167bd
system tests print all logs in main build log
daniel-sanche fd5792d
removed many SHARD_TEST files
daniel-sanche 8b825d5
updated lint and mypy logic
daniel-sanche 32968a9
add shard descriptions
daniel-sanche ff1274f
remove global run on ci/ change
daniel-sanche c49b06d
attempt cover fix
daniel-sanche 1cd8c1f
attempt fix for cover
daniel-sanche a0f5c9a
allow hidden files for cover
daniel-sanche 71f444a
fail fast
daniel-sanche cf1a1f1
use individual coverage checks
daniel-sanche b00967f
loosen firestore coverage requirement
daniel-sanche 7bb323c
activated more packages
daniel-sanche 3633089
10 packages total
daniel-sanche 980d8eb
change default for coverage percent
daniel-sanche a5cc497
activated 11th package (enable sharding)
daniel-sanche b36b559
fixed typo
daniel-sanche c3cf49e
change shard logic
daniel-sanche acdfb18
iterating on shard logic
daniel-sanche 9c80a51
rename tests
daniel-sanche cf554ca
add label to number in shard
daniel-sanche 886d6d9
unit tests fail if initialize fails
daniel-sanche 83ca04a
added known-bad package
daniel-sanche ae05642
added summary to cover step
daniel-sanche 7b565a4
added no-fail .coveragerc to sqlalchemy-spanner
daniel-sanche 72503de
Merge branch 'main' into ci_sharding
daniel-sanche e34b654
reverted systen test changes
daniel-sanche 6c1be8b
added github tag to test all packages
daniel-sanche 8fb68d3
re-run when label added
daniel-sanche fb90860
don't trigger on label changes
daniel-sanche 6123e7a
revered unrelated changes
daniel-sanche c99a693
increased shard count
daniel-sanche ee7cabc
isolate specific packages
daniel-sanche 40d31e3
isolated shards should be included in max_shard count
daniel-sanche 89e5499
changed shard names
daniel-sanche a1fab95
use pacakge weights instead of isolation
daniel-sanche 92626bd
parallelize final cover check
daniel-sanche 8c4d2dd
resolve merge conflict
daniel-sanche 7ccca59
Merge branch 'main' into ci_sharding
daniel-sanche 2e9bafc
added additional weights
daniel-sanche f14d489
pack shards alphabetically
daniel-sanche e4495b8
fixed typo
daniel-sanche 80f0061
avoid combining all coverage files
daniel-sanche 964e142
optimized coverage step
daniel-sanche b4733da
fix coverage files
daniel-sanche 8ea10ec
change MAX_JOBS
daniel-sanche bdc977a
end early if fail_under = 0
daniel-sanche 5cb0e26
added pip cache
daniel-sanche deaabe7
fixing bug in coverage search
daniel-sanche b20bb1a
enable test against ces
daniel-sanche 15421a7
removed empty file
daniel-sanche b4f9d9d
updated find call
daniel-sanche b9f750d
combine coverage in shards
daniel-sanche 073dc07
Revert "combine coverage in shards"
daniel-sanche da2f41e
use RAM disk for coverage results
daniel-sanche e611fe7
made max shards configurable
daniel-sanche e453d2c
added test files
daniel-sanche 45b5e68
define package weights in yaml
daniel-sanche fa06713
added fast path for coverage check
daniel-sanche cd33370
undo fast-path optimization
daniel-sanche 5bfe2d1
only upload coverage for first and last supported version
daniel-sanche 6c0566f
use 3.10 as lower bound
daniel-sanche e1bedf1
avoid going over max_shards
daniel-sanche 60a3e74
fixed coverage condition
daniel-sanche a4566cf
use all runtimes in coverage
daniel-sanche 010e1ad
remove empty files
daniel-sanche e35ea34
removed duplication
daniel-sanche d04104d
cleaned up conditional tests
daniel-sanche cf3de20
added back subdirs
daniel-sanche f1eb3a4
added comments to sharding script
daniel-sanche c70613a
moved script out of yaml
daniel-sanche eaf75e9
print only count for successes
daniel-sanche fb71278
Merge branch 'main' into ci_sharding
daniel-sanche a05d1fb
update spanner coveragerc
daniel-sanche 04fb332
changed sqlalchemy-spanner coverage value
daniel-sanche 4382fcc
added comment
daniel-sanche 4e8892c
fixed truncation issues
daniel-sanche 7ca0171
Merge branch 'main' into ci_sharding
daniel-sanche eefea36
Merge branch 'main' into ci_sharding
daniel-sanche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know the concurrency limit for our org?
In cases where we do 20*5 runtimes that we support, we might end up bloating the CI and see queued jobs in any PRs opened up in parallel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know the exact numbers, but I think it's O(500). I set this as 20 to try to strike a good balance between time vs jobs, but we can tune it if needed.
(Note that the 20 shards will only be used for PRs touching 200 packages, so we shouldn't expect to have too many of those running in parallel)