Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Custom sharding JSON #1665

Closed
asadsalman opened this issue Mar 5, 2021 · 2 comments · Fixed by #1779
Closed

Custom sharding JSON #1665

asadsalman opened this issue Mar 5, 2021 · 2 comments · Fixed by #1779
Assignees
Labels
Feature New Option Used to track PR with new configuration option (useful when updating fladle) Tiger 🐯
Milestone

Comments

@asadsalman
Copy link
Contributor

I want to be able to provide a custom android_shards.json to Flank, so I can write custom sharding logic for my tests.

Solution
Flank produces an android_shards.json file after parsing APK etc. I want to be able to provide a custom one myself. Flank will construct and execute whatever shards are declared in the custom android_shards.json.

Alternatives
Flank (and gcloud) do provide test-targets-for-shard flag. That will achieve what I'm looking for but, in its current form, it would be pretty hard to use since I would have to write a flank.yml file for each shard.

@jan-goral jan-goral added Tiger 🐯 New Option Used to track PR with new configuration option (useful when updating fladle) labels Mar 10, 2021
@jan-goral
Copy link
Contributor

Looks like a really nice feature.

TODO:

  1. New config option
  2. android_shards.json to InstrumentationTestContext mapper
  3. Update List<AndroidTestContext>.setupShards function for using shards from android_shards.json if option is specified.
    • Validate data loaded from android_shards.json in AndroidArgs context
    • Print proper log if some error occurs.
  4. Test the happy path and each known exception.

Just leaving a quick note for estimation.

@bootstraponline
Copy link
Contributor

I think we should also support custom sharding JSON on iOS.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Feature New Option Used to track PR with new configuration option (useful when updating fladle) Tiger 🐯
Projects
None yet
5 participants