diff --git a/tests/webapp/api/test_performance_bug_template_api.py b/tests/webapp/api/test_performance_bug_template_api.py index 08aced1258b..f43401e1f95 100644 --- a/tests/webapp/api/test_performance_bug_template_api.py +++ b/tests/webapp/api/test_performance_bug_template_api.py @@ -15,6 +15,7 @@ def test_perf_bug_template_api(client, test_perf_framework): "default_product": f"dfprod{i}", "cc_list": f"foo{i}@bar.com", "text": f"my great text {i}", + "critical_text": f"my great critical text {i}", } PerformanceBugTemplate.objects.create(framework=framework, **dict) dict["framework"] = framework.id diff --git a/treeherder/perf/fixtures/performance_bug_templates.yaml b/treeherder/perf/fixtures/performance_bug_templates.yaml index 851799fbcff..9efafcaaa2b 100644 --- a/treeherder/perf/fixtures/performance_bug_templates.yaml +++ b/treeherder/perf/fixtures/performance_bug_templates.yaml @@ -20,6 +20,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 2 @@ -41,6 +57,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 4 @@ -64,6 +96,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 5 @@ -87,6 +135,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 6 @@ -110,6 +174,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 7 @@ -133,6 +213,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 8 @@ -156,6 +252,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 9 @@ -179,6 +291,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 10 @@ -202,6 +330,22 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. - model: perf.PerformanceBugTemplate pk: 11 @@ -225,4 +369,20 @@ You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. + critical_text: | + Perfherder has detected a {{ framework }} performance regression from push [{{ revision }}]({{ revisionHref }}). We would like to inform you that we are requesting an immediate back out from sheriffs@mozilla.bugs of the current patch due to performance regressions on the following critical test(s): {{ criticalTests }}. + + Please review our [regression policy](https://www.mozilla.org/en-US/about/governance/policies/regressions/) for additional details regarding the reasons for the immediate backout. + + If you have any questions or need any help with the investigation, 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). + + {{ alertSummary }} + + Details of the alert can be found in the [alert summary]({{ alertHref }}), including links to graphs and comparisons for each of the affected tests. + + If you need the profiling jobs [you can trigger them yourself from treeherder job view](https://firefox-source-docs.mozilla.org/testing/perfdocs/perftest-in-a-nutshell.html#using-the-firefox-profiler) or ask {{ user }} to do that for you. + + You can run all of these tests on try with `./mach try perf --alert {{ alertSummaryId }}` + 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. diff --git a/treeherder/perf/migrations/0059_performancebugtemplate_critical_text.py b/treeherder/perf/migrations/0059_performancebugtemplate_critical_text.py new file mode 100644 index 00000000000..e99f10b84b3 --- /dev/null +++ b/treeherder/perf/migrations/0059_performancebugtemplate_critical_text.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.4 on 2025-05-14 15:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("perf", "0058_performancealertsummary_original_prev_push_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="performancebugtemplate", + name="critical_text", + field=models.TextField(default="", max_length=4096), + ), + ] diff --git a/treeherder/perf/models.py b/treeherder/perf/models.py index f671f8f6a34..855fc32cb50 100644 --- a/treeherder/perf/models.py +++ b/treeherder/perf/models.py @@ -782,6 +782,7 @@ class PerformanceBugTemplate(models.Model): cc_list = models.CharField(max_length=255) text = models.TextField(max_length=4096) + critical_text = models.TextField(max_length=4096, default="") class Meta: db_table = "performance_bug_template" diff --git a/treeherder/webapp/api/performance_serializers.py b/treeherder/webapp/api/performance_serializers.py index e9c9a0b8f95..7edbcb9373b 100644 --- a/treeherder/webapp/api/performance_serializers.py +++ b/treeherder/webapp/api/performance_serializers.py @@ -371,6 +371,7 @@ class Meta: "default_product", "cc_list", "text", + "critical_text", ]