Skip to content
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

Sharding #621

Merged
merged 16 commits into from
Feb 26, 2020
Merged

Sharding #621

merged 16 commits into from
Feb 26, 2020

Conversation

bootstraponline
Copy link
Contributor

No description provided.

@codecov-io
Copy link

Codecov Report

Merging #621 into master will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #621      +/-   ##
============================================
- Coverage     76.31%   76.22%   -0.09%     
  Complexity      610      610              
============================================
  Files            81       81              
  Lines          2297     2297              
  Branches        327      327              
============================================
- Hits           1753     1751       -2     
  Misses          324      324              
- Partials        220      222       +2

andreschab90
andreschab90 previously approved these changes Dec 6, 2019
@@ -136,7 +136,8 @@ object Shard {
testcases.sortByDescending { it.time }

testcases.forEach { testMethod ->
val shard = shards.first()
// num_shards must be > 1, and <= 50
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for clarification. num shards must be less than 50 or number of tests per shard must be less than 50?

Copy link
Contributor Author

@bootstraponline bootstraponline Dec 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--num-uniform-shards=int

The number of shards should be less than the total number of test cases. The number of shards specified must be >= 1 and <= 50.

https://cloud.google.com/sdk/gcloud/reference/alpha/firebase/test/android/run

I think (hopefully) there's no limit on the number of tests per shard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is >= 1, and <= 50

@pawelpasterz pawelpasterz force-pushed the sharding branch 3 times, most recently from 5e98257 to 4827fe0 Compare February 18, 2020 06:03
@@ -136,7 +136,8 @@ object Shard {
testcases.sortByDescending { it.time }

testcases.forEach { testMethod ->
val shard = shards.first()
// num_shards must be > 1, and <= 50
val shard = shards.first { it.testMethods.size + args.testTargetsAlwaysRun.size < 50 }
Copy link
Contributor

@jan-goral jan-goral Feb 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a problem here. According to doc the number of shards should be less than 50, but this condition prevents from putting more than 50 test methods per shard, so probably it's not what we want.

@jan-goral
Copy link
Contributor

jan-goral commented Feb 21, 2020

Hi, I have added some additional apks for specific test cases. Currently we are checking if new sharding is working properly on android, also with num-flaky-test-attempts flag on. And if everything will be ok I guess we can merge that.
Additionally the output directory structure for shards will change slightly, because now gc API are handling shards and can returns correct directories in output.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2020

CLA Assistant Lite All Contributors have signed the CLA.

@bootstraponline
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@jan-goral
Copy link
Contributor

I have read the CLA Document and I hereby sign the CLA

@pawelpasterz
Copy link
Contributor

I have read the CLA Document and I hereby sign the CLA

@pawelpasterz
Copy link
Contributor

I have read the CLA Document and I hereby sign the CLA

@bootstraponline
Copy link
Contributor Author

@pawelpasterz hey, the code looks great. Let's move all the apks into https://github.com/Flank/test_artifacts

We don't want large binary files in the repo increasing the repo size. To solve for this, I publish the artifact bundle saparately which is downloaded as part of the test execution process.

For now, delete the apks and I can merge the PR. As a follow up, we can add the APKs to the test_artifacts repo and I'll publish a new test bundle.

@jan-goral
Copy link
Contributor

@bootstraponline @pawelpasterz I have removed test apks but there is still one bug during test results fetch related to output directory, so we cannot merge until it will be resolved. Also i have 404 error when i tried to upload test apks in to https://github.com/Flank/test_artifacts. I need some time to investigate it.

@bootstraponline
Copy link
Contributor Author

@jan-gogo I added you to Flank/test_artifacts with write access. Let me know when this PR is ready to merge.

Copy link
Contributor

@pawelpasterz pawelpasterz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
@bootstraponline
I've tested solution with various options, as much as I've been able to to verify -- works very well

@bootstraponline
Copy link
Contributor Author

@pawelpasterz Thank you so much! Awesome work. I'll merge this.

@bootstraponline bootstraponline merged commit 9871d9e into master Feb 26, 2020
@bootstraponline bootstraponline deleted the sharding branch February 26, 2020 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants