Skip to content

Commit 38433ad

Browse files
Add option to copy a message tailored for replying to bugs
1 parent 4bf709d commit 38433ad

File tree

9 files changed

+193
-71
lines changed

9 files changed

+193
-71
lines changed

tests/ui/perfherder/alerts-view/status_dropdown_test.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const testStatusDropdown = (summaryTags, alertSummary) => {
4040
repoModel={testRepoModel}
4141
updateViewState={() => {}}
4242
issueTrackers={testIssueTrackers}
43-
bugTemplate={null}
4443
filteredAlerts={testAlerts}
4544
performanceTags={testPerformanceTags}
4645
frameworks={[{ id: 1, name: dummyFrameworkName }]}

treeherder/perf/fixtures/performance_bug_templates.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@
3737
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
3838
3939
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
40+
no_action_required_text: |
41+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
42+
43+
_**No action is required from the author; this comment is provided for informational purposes only.**_
44+
45+
{{ alertSummary }}
46+
47+
### Need Help or Information?
48+
49+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
50+
51+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
4052
- model: perf.PerformanceBugTemplate
4153
pk: 2
4254
fields:
@@ -74,6 +86,18 @@
7486
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
7587
7688
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
89+
no_action_required_text: |
90+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
91+
92+
_**No action is required from the author; this comment is provided for informational purposes only.**_
93+
94+
{{ alertSummary }}
95+
96+
### Need Help or Information?
97+
98+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
99+
100+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
77101
- model: perf.PerformanceBugTemplate
78102
pk: 4
79103
fields:
@@ -113,6 +137,18 @@
113137
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
114138
115139
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
140+
no_action_required_text: |
141+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
142+
143+
_**No action is required from the author; this comment is provided for informational purposes only.**_
144+
145+
{{ alertSummary }}
146+
147+
### Need Help or Information?
148+
149+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
150+
151+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
116152
- model: perf.PerformanceBugTemplate
117153
pk: 5
118154
fields:
@@ -152,6 +188,18 @@
152188
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
153189
154190
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
191+
no_action_required_text: |
192+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
193+
194+
_**No action is required from the author; this comment is provided for informational purposes only.**_
195+
196+
{{ alertSummary }}
197+
198+
### Need Help or Information?
199+
200+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
201+
202+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
155203
- model: perf.PerformanceBugTemplate
156204
pk: 6
157205
fields:
@@ -191,6 +239,18 @@
191239
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
192240
193241
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
242+
no_action_required_text: |
243+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
244+
245+
_**No action is required from the author; this comment is provided for informational purposes only.**_
246+
247+
{{ alertSummary }}
248+
249+
### Need Help or Information?
250+
251+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
252+
253+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
194254
- model: perf.PerformanceBugTemplate
195255
pk: 7
196256
fields:
@@ -230,6 +290,18 @@
230290
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
231291
232292
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
293+
no_action_required_text: |
294+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
295+
296+
_**No action is required from the author; this comment is provided for informational purposes only.**_
297+
298+
{{ alertSummary }}
299+
300+
### Need Help or Information?
301+
302+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
303+
304+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
233305
- model: perf.PerformanceBugTemplate
234306
pk: 8
235307
fields:
@@ -269,6 +341,18 @@
269341
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
270342
271343
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
344+
no_action_required_text: |
345+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
346+
347+
_**No action is required from the author; this comment is provided for informational purposes only.**_
348+
349+
{{ alertSummary }}
350+
351+
### Need Help or Information?
352+
353+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
354+
355+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
272356
- model: perf.PerformanceBugTemplate
273357
pk: 9
274358
fields:
@@ -308,6 +392,18 @@
308392
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
309393
310394
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
395+
no_action_required_text: |
396+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
397+
398+
_**No action is required from the author; this comment is provided for informational purposes only.**_
399+
400+
{{ alertSummary }}
401+
402+
### Need Help or Information?
403+
404+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
405+
406+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
311407
- model: perf.PerformanceBugTemplate
312408
pk: 10
313409
fields:
@@ -347,6 +443,18 @@
347443
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
348444
349445
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
446+
no_action_required_text: |
447+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
448+
449+
_**No action is required from the author; this comment is provided for informational purposes only.**_
450+
451+
{{ alertSummary }}
452+
453+
### Need Help or Information?
454+
455+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
456+
457+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
350458
- model: perf.PerformanceBugTemplate
351459
pk: 11
352460
fields:
@@ -386,3 +494,15 @@
386494
You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}`
387495
388496
The following [documentation link](https://firefox-source-docs.mozilla.org/testing/perfdocs/mach-try-perf.html#running-alert-tests) provides more information about this command.
497+
no_action_required_text: |
498+
Perfherder has detected a {{ framework }} performance change from push [{{ revision }}]({{ revisionHref }}).
499+
500+
_**No action is required from the author; this comment is provided for informational purposes only.**_
501+
502+
{{ alertSummary }}
503+
504+
### Need Help or Information?
505+
506+
If you have any questions, please reach out to {{ user }}. Alternatively, you can find help on Slack by joining [#perf-help](https://mozilla.enterprise.slack.com/archives/C03U19JCSFQ), and on Matrix you can find help by joining [#perftest](https://matrix.to/#/#perftest:mozilla.org).
507+
508+
Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.12 on 2025-10-26 16:46
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("perf", "0061_performancedatum_os_name_and_more"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="performancebugtemplate",
15+
name="no_action_required_text",
16+
field=models.TextField(default="", max_length=4096),
17+
),
18+
]

treeherder/perf/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ class PerformanceBugTemplate(models.Model):
790790

791791
text = models.TextField(max_length=4096)
792792
critical_text = models.TextField(max_length=4096, default="")
793+
no_action_required_text = models.TextField(max_length=4096, default="")
793794

794795
class Meta:
795796
db_table = "performance_bug_template"

treeherder/webapp/api/performance_serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ class Meta:
374374
"cc_list",
375375
"text",
376376
"critical_text",
377+
"no_action_required_text",
377378
]
378379

379380

ui/perfherder/alerts/AlertTable.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ export default class AlertTable extends React.Component {
299299
issueTrackers,
300300
fetchAlertSummaries,
301301
updateViewState,
302-
bugTemplate,
303302
modifyAlert,
304303
performanceTags,
305304
} = this.props;
@@ -360,7 +359,6 @@ export default class AlertTable extends React.Component {
360359
repoModel={repoModel}
361360
updateViewState={updateViewState}
362361
issueTrackers={issueTrackers}
363-
bugTemplate={bugTemplate}
364362
user={user}
365363
filteredAlerts={filteredAlerts}
366364
frameworks={frameworks}
@@ -533,7 +531,6 @@ AlertTable.propTypes = {
533531
}).isRequired,
534532
fetchAlertSummaries: PropTypes.func.isRequired,
535533
updateViewState: PropTypes.func.isRequired,
536-
bugTemplate: PropTypes.shape({}),
537534
modifyAlert: PropTypes.func,
538535
updateAlertSummary: PropTypes.func,
539536
projects: PropTypes.arrayOf(PropTypes.shape({})).isRequired,
@@ -543,7 +540,6 @@ AlertTable.propTypes = {
543540
AlertTable.defaultProps = {
544541
alertSummary: null,
545542
issueTrackers: [],
546-
bugTemplate: null,
547543
modifyAlert: undefined,
548544
// leverage dependency injection
549545
// to improve code testability

ui/perfherder/alerts/AlertsView.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class AlertsView extends React.Component {
4848
optionCollectionMap: null,
4949
count: 0,
5050
id: validated.id,
51-
bugTemplate: null,
5251
totalPages: 0,
5352
};
5453
}
@@ -347,7 +346,6 @@ class AlertsView extends React.Component {
347346
issueTrackers,
348347
notSupportedAlertFilters,
349348
optionCollectionMap,
350-
bugTemplate,
351349
page,
352350
count,
353351
} = this.state;
@@ -396,7 +394,6 @@ class AlertsView extends React.Component {
396394
}
397395
updateViewState={(state) => this.setState(state)}
398396
setFiltersState={this.setFiltersState}
399-
bugTemplate={bugTemplate}
400397
user={user}
401398
page={page}
402399
count={count}

ui/perfherder/alerts/AlertsViewControls.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default class AlertsViewControls extends React.Component {
8282
const framework = frameworkOptions.find(
8383
(item) => item.name === selectedFramework,
8484
);
85-
updateViewState({ bugTemplate: null, page: 1 });
85+
updateViewState({ page: 1 });
8686
setFiltersState({ framework }, this.fetchAlertSummaries);
8787
};
8888

0 commit comments

Comments
 (0)