Skip to content

Conversation

afinder-mozilla
Copy link
Contributor

@afinder-mozilla afinder-mozilla commented Jun 26, 2025

This PR adds functionality for filtering the list of available alert summaries to only show the sheriffed framework alerts and exclude the non-sheriffed ones (for example, the platform_microbench alerts).

Selecting the "all sheriffed frameworks" option in the dropdown will only display the sheriffed framework alerts.

all_sheriffed_dropdown

@afinder-mozilla afinder-mozilla force-pushed the all_sheriffed_frameworks branch 4 times, most recently from 9b0ff0a to 2461797 Compare June 27, 2025 11:58
@afinder-mozilla afinder-mozilla force-pushed the all_sheriffed_frameworks branch 2 times, most recently from a9b64b9 to f7600ab Compare July 4, 2025 08:04
@afinder-mozilla afinder-mozilla marked this pull request as ready for review July 4, 2025 08:14
@@ -418,6 +419,19 @@ def _timerange(self, queryset, name, value):
push__time__gt=datetime.datetime.utcfromtimestamp(int(time.time() - int(value)))
)

def _show_sheriffed_frameworks(self, queryset, name, value):
return queryset.filter(
framework__name__in=[
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create a new constant and import it

    SHERIFFED_FRAMEWORKS = [
        "browsertime",
        "raptor",
        "talos",
        "awsy",
        "build_metrics",
        "js-bench",
        "devtools",
    ]

in ui/perfherder/perf-helpers/constants.js

@@ -207,6 +212,9 @@ class AlertsView extends React.Component {
if (listMode && params.framework === doNotFilter) {
delete params.framework;
}
if (listMode && params.framework === -2) {
Copy link
Collaborator

@beatrice-acasandrei beatrice-acasandrei Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new constant for the -2 value, similar to the doNotFilter constant with a proper comment explaining it's purpose - Constant created for UI purposes but is not a valid API parameter

Copy link
Collaborator

@beatrice-acasandrei beatrice-acasandrei Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further you can merge the if statements for the framework check since both do the same action - removing the framework url parameter

@@ -271,6 +279,9 @@ class AlertsView extends React.Component {
if (hideAssignedToOthers) {
params.with_assignee = user.username;
}
if (framework.id === -2) {
Copy link
Collaborator

@beatrice-acasandrei beatrice-acasandrei Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the new constant for the -2 value instead of hardcoding it

@@ -148,6 +148,11 @@ class AlertsView extends React.Component {
const frameworkOptions = cloneDeep(frameworks);
const ignoreFrameworks = { id: -1, name: 'all frameworks' };
frameworkOptions.unshift(ignoreFrameworks);
const ignoreNonSheriffedFrameworks = {
Copy link
Collaborator

@beatrice-acasandrei beatrice-acasandrei Jul 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better naming might be

Suggested change
const ignoreNonSheriffedFrameworks = {
const allSheriffedFrameworks = {

which aligns better with our approach here to filter by sheriffed frameworks instead of excluding the non-sheriffed ones

@jmaher
Copy link
Collaborator

jmaher commented Sep 5, 2025

this has been idle for 2 months, are there plans to pick this back up? if not, can you close this?

@afinder-mozilla
Copy link
Contributor Author

this has been idle for 2 months, are there plans to pick this back up? if not, can you close this?

Hi Joel! Sorry for the lack of communication here, I have plans to update the patch and address the code review requests soon. We should keep this PR open.

@afinder-mozilla afinder-mozilla force-pushed the all_sheriffed_frameworks branch 2 times, most recently from 457d3b4 to ec33da5 Compare September 11, 2025 07:13
Comment on lines 455 to 463
SHERIFFED_FRAMEWORKS = [
"browsertime",
"raptor",
"talos",
"awsy",
"build_metrics",
"js-bench",
"devtools",
]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SHERIFFED_FRAMEWORKS = [
"browsertime",
"raptor",
"talos",
"awsy",
"build_metrics",
"js-bench",
"devtools",
]
SHERIFFED_FRAMEWORKS = [
"browsertime",
"mozperftest",
"talos",
"awsy",
"build_metrics",
"js-bench",
"devtools",
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants