Skip to content

Add track parameter validation hook#2144

Open
reugn wants to merge 3 commits into
elastic:masterfrom
reugn:feat/track-param-validator-hook
Open

Add track parameter validation hook#2144
reugn wants to merge 3 commits into
elastic:masterfrom
reugn:feat/track-param-validator-hook

Conversation

@reugn

@reugn reugn commented Jun 15, 2026

Copy link
Copy Markdown
Member

Tracks can already register custom param sources, runners, and schedulers, but there was no way to validate track parameters before a benchmark runs. This adds that missing hook.

  • Adds register_validator(challenge_name, fn) so a track's register(registry) can register one or more validators for a challenge.
  • A validator receives the resolved track parameters and raises TrackConfigError when they are invalid.
  • Rally runs the validators for the selected challenge in BenchmarkCoordinator.setup(), after the track is loaded but before it provisions nodes or starts the benchmark, so bad parameters fail fast with a clear message.

This change is additive and non-breaking. Tracks that do not register a validator behave exactly as before, since the hook is a no-op for them. No existing function signature changes in a way that affects current callers.

Closes #2143

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

Labels

enhancement Improves the status quo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add extension point to support per-track parameter validation

2 participants