-
Notifications
You must be signed in to change notification settings - Fork 44
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
Test sharding #2810
Test sharding #2810
Conversation
bce5fde
to
fef033d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2810 +/- ##
==========================================
- Coverage 68.69% 68.69% -0.01%
==========================================
Files 325 325
Lines 41621 41621
==========================================
- Hits 28593 28590 -3
- Misses 11422 11424 +2
- Partials 1606 1607 +1 ☔ View full report in Codecov by Sentry. |
a542264
to
6a4085f
Compare
6a4085f
to
a4005fd
Compare
This change is part of the following stack:
Change managed by git-spice. |
2cba967
to
eb555c7
Compare
80ec996
to
77e23d4
Compare
4da1a4c
to
bc0f627
Compare
77e23d4
to
cf603be
Compare
bc0f627
to
a738145
Compare
5d5f628
to
3b7968c
Compare
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.
If I add new tests, do I need to re-run make test_profile
? If so, that means that I need to re-run the entire test suite on my laptop to add a single test (which is a major usability regression). If not, then I don't understand how the test profile gets updated.
github.com/pulumi/sharder's REAMDE is very sparse, which doesn't give me confidence. I'd like to be able to read the README and understand how the tool works, not just a short explanation of what it does. The README should also explain the irreconcilable differences between github.com/pulumi/sharder and github.com/pulumi/shard.
a738145
to
98c3684
Compare
3b7968c
to
fa4a969
Compare
32631d4
to
a541316
Compare
@iwahbe I've updated the README on
No, that is not necessary. I've added a description to the In practice, I think this will mean that we'll re-record them once we add a good chunk of tests but don't need to touch that otherwise. |
a541316
to
ae81692
Compare
I'm testing how much performance we gain with this method vs just using pulumi/shard. If the gain is significant, then I'll approve. |
Follow-up work on #2810. This PR aimed to validate the more complex test optimization strategy of #2810 (pre-calculated perfect allocation; implemented by github.com/pulumi/sharder) by demonstrating the effects of a simpler strategy (random allocation; implemented by github.com/pulumi/shard). Initial testing showed that both strategies were bounded by the 15 minute job [`Test and Lint / test (1.22.x, windows-latest, DEFAULT, 0)`](https://github.com/pulumi/pulumi-terraform-bridge/actions/runs/12770018688/job/35593903461?pr=2832#logs), which is not effected by sharding. Since both approaches appear identical, we will merge the simpler strategy. --------- Co-authored-by: Venelin <venelin@pulumi.com>
Closing in favor of #2832, which was stacked on top of this PR. |
This PR implements a test sharding strategy to speed up the bridge tests from 1 hour 30 minutes to under 15 minutes.
It uses https://github.com/VenelinMartinov/sharder which is a package for generating regexes to plug into
go test
based on the test profile data. The script is based on the previous work by @blampe in https://github.com/pulumi/shard.This PR also adds two new
make
commands:make test_profile
this regenerates the test profile data, so that shard partitioning can be more fairmake test_shard
. This is only run in CI. This command picks up theSHARD_CMD
env var to determine which tests to run.SHARD_CMD
is populated in CI by thesharder
package and contains a regex which should match the correct tests to run.Sharding is only done for
ubuntu
tests as they take the longest.Example run: https://github.com/pulumi/pulumi-terraform-bridge/actions/runs/12656374664