Skip to content

[4.x] Enforce maximum shard filter length#1673

Open
oddvalue wants to merge 1 commit intopestphp:4.xfrom
oddvalue:feat/shard-filter-optimisation
Open

[4.x] Enforce maximum shard filter length#1673
oddvalue wants to merge 1 commit intopestphp:4.xfrom
oddvalue:feat/shard-filter-optimisation

Conversation

@oddvalue
Copy link
Copy Markdown

What:

  • Bug Fix
  • New Feature

Description:

When using shards on a sufficiently large test suite, the filter argument generated by the shard can overflow the command argument limit.

This PR adds a safety check that throws a clear error when the generated filter exceeds the environment's argument length limit (32KB default, configurable via PEST_SHARD_MAX_FILTER_LENGTH env var), along with actionable guidance to increase the number of shards.

Also includes unit tests for the Shard plugin.

Related:

Following on from #1601

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant