Always pass perf filters to card artifacts call for correct benchmark counts regardless of toggle state#2188
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
e38834c to
157b48c
Compare
There was a problem hiding this comment.
+1 to @ppadti 's comment - right now the default perf filter values don't end up in state until the first time the perf view toggle is turned on. we might just want to change that behavior so we put those perf filter defaults in state as soon as the page loads. That should be safe now that we have excluded those elsewhere when the toggle is off.
… counts Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
Signed-off-by: manaswinidas <dasmanaswini10@gmail.com>
157b48c to
c815b8d
Compare
| if (filterOptionsLoaded && filterOptions?.namedQueries) { | ||
| resetPerformanceFiltersToDefaults(); | ||
| } |
There was a problem hiding this comment.
Hm, I wonder if we should only have this trigger if there are no perf filters in state (or maybe if at least one of the filters present in namedQueries has no value in state) so we don't accidentally reset them to defaults when filter options are fetched again

Description
Now the benchmark counts are same whether the performance filters toggle is ON or OFF
Added a Cypress test and edited mocks
How Has This Been Tested?
Tested midstream - On the model catalog landing page cards, benchmark counts on “View N benchmarks” links should be the same both without the toggle enabled and with the toggle enabled (while filters are set to default), and be the same as the number of benchmarks as seen on the details page with default filters applied.
Merge criteria:
DCOcheck)ok-to-testhas been added to the PR.If you have UI changes