Commit graph

1087 commits

Author SHA1 Message Date
Michael Derynck
febe1b2185 Add basic organization moved exception handling and middleware 2022-10-20 15:04:58 -06:00
Michael Derynck
0a1a9ab4d8 Add region object 2022-10-20 09:45:48 -06: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
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
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
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
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
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
Michael Derynck
03ac10d064 Add simple pull request template 2022-10-12 09:36:58 -06:00
Rares Mardare
1657eec1be
Merge pull request #568 from grafana/calendar-add-color-schema-to-avatar
1382 - Avatar color schema to match user's schedules
2022-10-12 17:01:19 +03:00
Rares Mardare
ae1a46aa3d linter 2022-10-12 15:54:42 +03:00
Rares Mardare
f689dad639 Merge branch 'dev' into calendar-add-color-schema-to-avatar 2022-10-12 15:47:48 +03:00
Maxim
e1360ced6c minor fix 2022-10-12 08:54:20 +01:00
Matias Bordese
9b65768495 Run migrate before run 2022-10-11 17:06:19 -03:00
Matias Bordese
6cafd07c15 Update running service rules to depend on bootstrap 2022-10-11 16:58:45 -03:00
Matias Bordese
b80cb0fcd6 Allow setting up a different dir for the virtualenv 2022-10-11 16:53:10 -03:00
Michael Derynck
fa5d4f2674 Add region_slug column to organization 2022-10-11 12:04:33 -06:00
Yulia Shanyrova
de3f45929b
Merge pull request #509 from grafana/500-user-in-incident-filters
Users from search results have been added to the state of options
2022-10-11 16:15:29 +02:00
Yulia Shanyrova
aedb6a52d5 Changed the order of concating values 2022-10-11 16:08:43 +02:00
Maxim
5b38b8deaf auto tune shift end, allow scrolling behind modal 2022-10-11 12:31:15 +01:00
Yulia Shanyrova
ed2ba6311f
Merge pull request #512 from grafana/191-connectivity-warning
191 connectivity warning
2022-10-11 12:28:50 +02:00
Yulia Shanyrova
8afeb5916b Merge branch 'dev' into 500-user-in-incident-filters 2022-10-11 11:39:50 +02:00
Matias Bordese
75d230fc4e Add simple Makefile 2022-10-07 16:50:00 -03:00
Ildar Iskhakov
8f051177fe
Merge branch 'dev' into disable-autorestarts 2022-10-07 10:34:01 +08:00
Ildar Iskhakov
bf8f20a1fb Enable restarts by default 2022-10-07 10:32:57 +08:00
Ildar Iskhakov
50c960038d Allow disabling autorestarts 2022-10-07 10:30:45 +08:00
Michael Derynck
1c0b51f811
Merge pull request #613 from grafana/249-improve-initialization-latency
Improve Plugin Initialization Latency
2022-10-06 13:29:16 -06:00
Rares Mardare
60f03ced66
Merge pull request #579 from grafana/rares/504-reload-incidents
504 - reload incidents every 15s
2022-10-06 16:56:37 +03:00