TRT-2795: Test Analysis: Regressions disappear when variant filters are applied - #331
Open
openshift-trt-agent[bot] wants to merge 1 commit into
Open
Conversation
The client-side variant filtering in TestRegressionsTable compared filter values (e.g. "Platform:gcp" from autocomplete) against only the parsed value part of regression variants (e.g. "gcp" from "Platform:gcp"). This mismatch caused all regressions to disappear when any variant filter was applied. The fix compares each regression variant against the filter value using both the full variant string and the parsed name, so both "Platform:gcp" (autocomplete) and "never-stable" (default filters) match correctly. Extracts the filtering logic into a testable exported function and adds unit tests covering positive, negated, combined, and case-insensitive filter scenarios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
TRT-2795: Fix regressions disappearing when variant filters are applied
Summary
Platform:gcp) were compared against only the parsed value part of regression variants (e.g.gcp), causing all regressions to disappear when any variant filter was applied.filterRegressionsByVariantsfunction and added comprehensive unit tests.Root Cause
The
TestRegressionsTablecomponent applied variant filters client-side by parsing regression variant strings throughparseVariantName(), which extracts just the value portion ("gcp"from"Platform:gcp"). However, filter values from the autocomplete dropdown retain the fullKey:Valueformat ("Platform:gcp"). The comparison"gcp" === "Platform:gcp"always failed, filtering out all regressions.Fix
The updated matching logic compares each regression variant against the filter value using both the full variant string and the parsed name. This correctly handles:
Key:Valuefilter values from autocomplete (e.g.Platform:gcp)never-stable,aggregated)not aggregated)Test plan
filterRegressionsByVariantscovering positive, negated, combined, case-insensitive, and null-variant scenariosmake testpasses (29/29 Jest + Go tests)make e2epasses (120/120 tests, 1 skipped)Platform:gcpvariant filter, and confirm regressions are filtered (not empty)Always review AI generated responses prior to use.
Generated with Claude Code via openshift-developer plugin
Generated with Claude Code