Don't file perfherder bugs in Web Compatibility :: Site Reports#9647
Don't file perfherder bugs in Web Compatibility :: Site Reports#9647jgraham wants to merge 1 commit into
Web Compatibility :: Site Reports#9647Conversation
This component is only for site reports, any perf regression must have come from an intervention, so put the bugs in the right component for interventions. This adds a generic mechanism for overridding the product/component of bugs, in case this same use case comes up in another context.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9647 +/- ##
==========================================
- Coverage 82.92% 82.91% -0.02%
==========================================
Files 618 618
Lines 36164 36170 +6
Branches 3239 3301 +62
==========================================
+ Hits 29989 29990 +1
+ Misses 6025 5802 -223
- Partials 150 378 +228 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| getBugComponent= (culpritDetails) => { | ||
| const overrides = new Map(); | ||
| overrides.set(["Web Compatbility", "Site Reports"], ["Web Compatbility", "Interventions"]); |
There was a problem hiding this comment.
Small typo in "Compatbility".
The logic looks clean, but there is a subtle JS bug here: overrides.get(inputs) will always fail and return undefined. In JavaScript, arrays are compared by reference (memory location), not by value. Even if the text matches perfectly, a newly created array like inputs won't match the array used as the key in .set(). To fix this, use a primitive string as the key instead:
overrides.set("Web Compatbility|Site Reports", ["Web Compatbility", "Interventions"]);
return overrides.get(inputs.join('|')) ?? inputs;
This component is only for site reports, any perf regression must have come from an intervention, so put the bugs in the right component for interventions.
This adds a generic mechanism for overridding the product/component of bugs, in case this same use case comes up in another context.