Skip to content

incompatible_check_sharding_supportΒ #18339

@fmeum

Description

@fmeum

Description of the flag

If enabled, Bazel will fail shared tests (those with shard_count greater than 1) if the test runner does not advertise support for sharding by touching the file indicated by the TEST_SHARD_STATUS_FILE.

If disabled, Bazel does not verify that this file had been touched, which can result in every shard running all tests if the runner doesn't support sharding.

Migration

If all test runners for tests with sharding enabled properly advertise sharding support, no migration is required.

If you see tests fail with an error message that contains Sharding requested, but the test runner did not advertise support for it, first check whether the test runner supports sharding.

  • If it does, but doesn't touch the file indicated by TEST_SHARD_STATUS_FILE, inform the maintainers of the test runner. You can temporarily disable the check via --noincompatible_check_sharding_support.
  • If it doesn't, remove the shard_count attribute from all test rules that use this runner.

Metadata

Metadata

Assignees

Labels

incompatible-changeIncompatible/breaking changemigration-readyIncompatible flag is ready for migration with Bazel rolling releases or Bazel@last_greentype: process

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions