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

Fix #4255: Double number of shards available for app tests #4313

Merged
merged 2 commits into from
Apr 26, 2022

Conversation

BenHenning
Copy link
Sponsor Member

@BenHenning BenHenning commented Apr 19, 2022

Explanation

Fixes #4255

App module tests are still running into memory issues (specifically shards 2 & 3). This change doubles the number of shards available so that hopefully the tests are better distributes and have a smaller chance of hitting memory limitations.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

For UI-specific PRs only

N/A -- This is an infrastructure change that doesn't affect app behavior.

App module tests are still running into memory issues (specifically shards 2 & 3). This change doubles the number of shards available so that hopefully the tests are better distributes and have a smaller chance of hitting memory limitations.
@BenHenning BenHenning marked this pull request as ready for review April 19, 2022 22:44
@BenHenning
Copy link
Sponsor Member Author

@anandwana001 PTAL when you get a chance (this isn't urgent, but it'll be nice to get in since I have to occasionally restart CI workflows at the moment).

Copy link
Contributor

@anandwana001 anandwana001 left a comment

Choose a reason for hiding this comment

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

LGTM

@oppiabot
Copy link

oppiabot bot commented Apr 22, 2022

Hi @BenHenning, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@BenHenning
Copy link
Sponsor Member Author

Ah, I apparently didn't do this correctly since the latest CI only ran 4. I suspect that I need to change something in the workflow, too.

Ensure new shards are run in CI.
@BenHenning
Copy link
Sponsor Member Author

Ah there we go. Needed to make sure all of the new shards are being run (otherwise it's more or less cutting the app module tests in half).

@BenHenning
Copy link
Sponsor Member Author

Welp looks like the same problem (exit code 134) happens even with 8 shards. It seems that this happened with StateFragmentLocalTest, so I'm wondering if we'll need to separate out the two state fragment tests into their own special shard since they clearly use far too many resources to be shared with a bunch of other app module tests.

That being said, I'm going to restart the workflow for this PR and try to merge it since 8 shards is still better than 4 for restarting, and hopefully lowers the chance of the Gradle tests failing.

@BenHenning BenHenning enabled auto-merge (squash) April 26, 2022 21:38
@BenHenning BenHenning merged commit caced66 into develop Apr 26, 2022
@BenHenning BenHenning deleted the increase-gradle-app-module-shards branch April 26, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gradle app module tests frequently fail in CI
2 participants