Commit graph

5007 commits

Author SHA1 Message Date
Ildar Iskhakov
a4471fc4d2
Merge pull request #677 from grafana/dev
Merge dev to main
2022-10-20 13:57:11 +08:00
Ildar Iskhakov
82d4746fd3
Merge pull request #665 from alfrunes/helm-fix-slack
fix(helm): Update the Slack helm values and environment variables
2022-10-20 13:41:58 +08:00
Ildar Iskhakov
2a9bcb4f7e
Merge pull request #669 from grafana/iskhakov/upgrade-helm
Bump oncall backend version
2022-10-20 13:40:08 +08:00
Matias Bordese
3d171f20f7 Defer large unused queryset fields when listing schedules 2022-10-19 17:07:06 -03:00
Matias Bordese
e4a7a5a23d Rework schedule escalation chains/policies count as a subquery 2022-10-19 17:07:06 -03:00
Michael Derynck
330f103844 Merge branch 'dev' into add-region-to-organization 2022-10-19 11:00:59 -06:00
Michael Derynck
5d20c60895
Add step to check docker build (#673)
* Add step to check docker build
2022-10-19 17:08:37 +02:00
David van der Spek
8eed99865a
fix using secret for smtp 2022-10-19 15:01:49 +02:00
DavidSpek
e8b34a895b fix missing env vars
Signed-off-by: DavidSpek <vanderspek.david@gmail.com>
2022-10-19 14:40:44 +02:00
DavidSpek
7ea9f3e7f8 add smtp settings to helm chart
Signed-off-by: DavidSpek <vanderspek.david@gmail.com>
2022-10-19 14:19:22 +02:00
Yulia Shanyrova
fbc672b2d1 Merge branch '318-slack-installation-ux' into 637-telegram-installation-redesign 2022-10-19 13:49:05 +02:00
Yulia Shanyrova
a5c9a364f2 Merge branch 'dev' into 637-telegram-installation-redesign 2022-10-19 13:48:12 +02:00
Ildar Iskhakov
8c7912c344 Bump oncall backend version 2022-10-19 19:39:11 +08:00
Vadim Stepanov
427c6c95c5
Edit docs for PagerDuty migrator scripts (#662)
* add docs on add_users_pagerduty_to_grafana.py

* spelling
2022-10-19 12:33:59 +01:00
Vadim Stepanov
e67d3519fe
Restore email notifications (#621)
* remove email verification related code

* remove email verification related code

* remove sendgrid callback

* remove sendgrid related code

* remove sendgrid related code

* rename sendgrid app to email

* remove email from built-in channels

* remove email from built-in channels

* remove email from built-in channels

* add email backend: https://github.com/grafana/oncall/pull/50

* add email templater

* add email templater

* convert md to html

* add email settings to live settings

* use task to send email, handle some exceptions to create logs

* remove ERROR_NOTIFICATION_MAIL_DELIVERY_FAILED usage

* add email limit logic

* fix tests

* add docs

* remove old email templates

* remove old email templates

* add template_fields to messaging backend

* add messaging backends templates to public api

* add comment for deprecated fields

* fix test

* fix tests

* disable email by default

* don't retry on SMTPException and TimeoutError

* add tests

* bring email back to public api docs

* return ERROR_NOTIFICATION_MAIL_LIMIT_EXCEEDED

* make template_fields tuple

* build_subject_and_title -> build_subject_and_message

* add one more comment about template deprecation

* use 8 as backend id

* add comment about gaierror and BadHeaderError

* add comment on importing in notify_user_async

* edit oss docs
2022-10-19 12:32:56 +01:00
Ben Sully
e36757b293
Allow non-JSON custom webhook templates, provided they render as valid JSON (#639)
* Allow non-JSON custom webhook templates, provided they render as valid JSON

Previously, both the provided template _and_ the rendered template had
to be valid JSON in order for validation to pass. This was unnecessarily
restrictive: really, only the rendered template needs to be valid JSON.
It also disallowed using templates such as:

    {
      "labels": {{ alert_payload.labels | tojson }}
    }

even though this would be valid JSON after rendering.

This commit relaxes the validation of custom webhook templates so that
they don't need to be valid JSON, provided that the rendered template
_is_ valid JSON. This is checked using a dummy dictionary of render
params, which use a constant string for the `alert_group_id` field
and a `defaultdict(dict)` for the `alert_payload` field. This should
permit templates like the one above, but still deny templates such as

    {
      "labels": {{ alert_payload.labels }}
    }

which would otherwise fail later if `labels` is not valid JSON.

This should resolve #638.

* Use defaultdict(str) instead of defaultdict(lambda: "")

* Add missing comment to resolution note validation code

* Update validation of resolution notes in public API, too

* Add extra test cases for JSON webhook templates endpoint of public API
2022-10-19 12:32:21 +01:00
Alf-Rune Siqveland
d48582d517
fix(helm): Update the Slack helm values and environment variables
The former helm values apiToken and apiTokenCommon were outdated/unused
by the application.

Signed-off-by: Alf-Rune Siqveland <alf.rune@northern.tech>
2022-10-19 13:00:34 +02:00
Michael Derynck
363f019356 Update CHANGELOG.md 2022-10-18 16:12:57 -06:00
Michael Derynck
0152c27f5e Re-validate all twilio settings when any change as they depend on each other 2022-10-18 16:05:49 -06:00
Jack Baldry
e5513d1275
Fix relref links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-10-18 14:41:22 -04:00
Michael Derynck
20a557b7a5 Merge branch 'dev' into mderynck/allow-twilio-api-keys 2022-10-18 11:55:16 -06:00
Michael Derynck
8e48c441e8
Merge pull request #651 from grafana/mderynck/handle-channel-filter-exception
Catch exception for parsing regex during channel filtering
2022-10-18 09:43:08 -06:00
Michael Derynck
8ad593b36f
Merge pull request #650 from grafana/mderynck/suppress-integration-exception
Add middleware to catch exception for missing integration
2022-10-18 09:16:09 -06:00
Yulia Shanyrova
6aac3f16e8 Telegram redesign 2022-10-18 17:09:15 +02:00
Vadim Stepanov
b9c543b0e8
PagerDuty migrator minor improvements (#659)
* tolerate ONCALL_API_URL without trailing slash

* tolerate ONCALL_API_URL without trailing slash

* show vendor name if integration type is not supported

* isort

* black
2022-10-18 15:32:07 +01:00
Michael Derynck
4eb814798c Make return value explicit 2022-10-18 08:05:01 -06:00
David van der Spek
292849e782
fix relation already exists (#660)
Signed-off-by: DavidSpek <vanderspek.david@gmail.com>

Signed-off-by: DavidSpek <vanderspek.david@gmail.com>
2022-10-18 14:04:27 +01:00
Ildar Iskhakov
e94fee1e25
Merge pull request #623 from grafana/disable-autorestarts
Allow disabling autorestarts in helm deployment
2022-10-18 09:42:05 +08:00
Ildar Iskhakov
161f012847
Merge pull request #655 from purwandi/dev
[helm] change telegram webhook host
2022-10-18 09:41:08 +08:00
Matias Bordese
0e79adfb60
Merge pull request #658 from grafana/matiasb/add-developer-makefile-notes
Add details about Makefile to DEVELOPER.md
2022-10-17 11:20:57 -03:00
Matias Bordese
8fb8adb315 Add details about Makefile to DEVELOPER.md 2022-10-17 10:45:49 -03:00
Matias Bordese
db5c34f3b7
Merge pull request #630 from grafana/matiasb/adding-makefile
Add simple Makefile
2022-10-17 09:31:43 -03:00
Anton Tokarev
96e2a7fba6
Fix anchor back too (#649) 2022-10-17 15:28:51 +03:00
purwandi
712b820eff
change telegram webhook host 2022-10-16 15:15:38 +07:00
Michael Derynck
c731b9b113 Catch exception for parsing regex during channel filtering 2022-10-13 18:34:04 -06:00
Michael Derynck
5f5f427c9f Add middleware to catch exception for missing integration, reduce spamminess of logs 2022-10-13 17:18:22 -06:00
Michael Derynck
80abd8b8e5
Merge pull request #647 from grafana/mderynck/add-pull-request-template
Add simple pull request template
2022-10-13 15:43:04 -06:00
Maxim Mordasov
680e11bb64
Merge pull request #617 from grafana/add-settings-button
New schedules 2nd bunch of fixes
2022-10-13 15:32:24 +01:00
Ildar Iskhakov
1155bc3f00
Update README.md 2022-10-13 21:41:42 +08:00
Ildar Iskhakov
a2529bbb78
Update README.md 2022-10-13 21:40:56 +08:00
Maxim Mordasov
f044731e2f
Merge pull request #648 from grafana/rares/fix-avatar
Rares/fix avatar
2022-10-13 14:30:59 +01:00
Rares Mardare
a5147a0215 package fix 2022-10-13 16:04:03 +03:00
Rares Mardare
d37779e3b0 update 2022-10-13 15:05:36 +03:00
Rares Mardare
cecfcb1d56 avatar fix 2022-10-13 15:03:27 +03:00
Maxim
b4a311e6ed fix props 2022-10-13 12:30:01 +01:00
Maxim
ba448809ac Merge branch 'dev' into add-settings-button 2022-10-13 11:43:26 +01:00
Maxim
2dcac2b9a9 review fixes 2022-10-13 11:02:00 +01:00
alyssa wada
8e21117821 relref fixes 2022-10-12 16:14:06 -06:00
alyssa wada
7d5d205996 restructure batch 2 2022-10-12 15:40:52 -06:00
alyssa wada
80c572ee23 relrefs for batch 1 2022-10-12 14:20:19 -06:00