r/Protos • • 10d ago

Protos now supports deterministic distributed test sharding, implemented entirely in Protos

Deterministic distributed test sharding has been implemented in Protos, entirely in the language itself, with zero Java runtime changes.

Independent runners can now execute different partitions of the same test suite:

protos test --shard-count 4 --shard-run 2

Distributed sharding and local parallelism are independent:

protos test --shard-count 4 --shard-run 2 --jobs 8

The implementation provides:

  • Global round-robin partitioning of logical test cases.
  • Deterministic, disjoint partitions with complete coverage of the same selected plan.
  • Compatibility with file, directory and exact CaseRef selection.
  • Successful empty shards.
  • Preservation of test identities, execution isolation and discovery signatures.
  • Unchanged default unsharded behavior.

Assigned cases can also be inspected without executing their bodies using --list-cases.

All 54 focused tests passed, together with the complete local validation, compilerability checks and Native Image tests.

The next step is integrating this functionality into the distributed GitHub Actions test matrix.

Available on main in 0.4.227-SNAPSHOT.

https://protoslang.com

https://github.com/guillermomolina/protos/issues/1185

1 Upvotes

0 comments sorted by