Add per-test configuration overrides#770
Open
MatthewMckee4 wants to merge 1 commit into
Open
Conversation
Merging this PR will improve performance by 10.06%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | karva_benchmark |
56.9 s | 51.7 s | +10.06% |
Comparing worktree-nested-wandering-acorn (40c3e12) with main (eb3c800)
Introduces `[[profile.<name>.overrides]]` entries that pair a filter expression with one or more option fields. The first matching override wins, falling back to the profile-level value when no override matches. ```toml [profile.default.test] retry = 1 timeout = 30.0 [[profile.default.overrides]] filter = "tag(network)" retries = 5 timeout = 300.0 [[profile.default.overrides]] filter = "tag(unit)" retries = 0 slow-timeout = 0.5 ``` The override entry currently supports `retries`, `timeout`, and `slow-timeout`, mirroring the equivalent profile-level fields. A matching override with a non-positive `timeout` or `slow-timeout` disables the corresponding limit for the matched test even when the profile sets one. Filters use the existing filterset DSL (`tag(...)`, `test(...)`, and boolean combinators) and are validated at TOML parse time via a `ValidatedFilter` newtype, so the worker never re-parses or panics. Overrides defined under `[profile.default]` are layered beneath named- profile entries: a `[[profile.ci.overrides]]` block takes precedence when the `ci` profile is active, with default-profile entries as the fallback. Closes #555. Closes #577.
35ee942 to
40c3e12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
[[profile.<name>.overrides]]entries that pair a filter expression with one or more option fields. The first matching override wins for each test, falling back to the profile-level value when nothing matches.The override entry currently supports
retries,timeout, andslow-timeout, mirroring the equivalent profile-level fields. A matching override with a non-positivetimeoutorslow-timeoutdisables the corresponding limit for the matched test even when the profile sets one.Filters use the existing filterset DSL (
tag(...),test(...), and boolean combinators) and are validated at TOML parse time via aValidatedFilternewtype, so the worker never re-parses or panics. Overrides defined under[profile.default]are layered beneath named-profile entries: a[[profile.ci.overrides]]block takes precedence when theciprofile is active, with default-profile entries as the fallback. Overrides are forwarded from the main process to workers via a hidden, JSON-encoded--override-jsonflag.Closes #555. Closes #577.
Test Plan
ci