Commit graph

1941 commits

Author SHA1 Message Date
Yulia Shanyrova
db8914bdf7
319 telegram warning bug (#1424)
# What this PR does
When you disable Telegram feature we did not handle it in our frontend.
Now if the fieture is disabled we do not shoe Telegram at Chat-ops, at
Users.
Also some crarification was added to the instructions that discussion
group should be unique for each channel

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/319
https://github.com/grafana/oncall/issues/938
2023-03-20 14:53:12 +00:00
Joey Orlando
7ea5b07704
change escalation chains searching to allow for partial searching (#1578)
# Which issue(s) this PR fixes

Previously if you had an Escalation Chain named "Something Critical" and
tried searching for "Critical", it would return no results. This was
because the backend was using a "starts-with" search on the `name`
attribute.

This PR changes that to use "partial searching" + adds a few e2e test
cases.

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-03-20 15:51:39 +01:00
Yulia Shanyrova
046d1dcbcf
1124 viewers are not allowed in rotations (#1577)
# What this PR does
Added additional filtering for roles 0 and 1 for rodations. Only Editors
and Admins are allowed to be in rotation

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1124
2023-03-20 13:52:58 +00:00
Rares Mardare
ad8ec64e34
UI Tweaks on schedules (#1538)
# What this PR does

Adds a few display tweaks to schedules score quality display
2023-03-20 12:11:48 +00:00
Joey Orlando
35fb5ff695
update integration heartbeat description to use 'alert group' instead of 'incident' (#1576)
## Which issue(s) this PR fixes
![Screenshot 2023-03-20 at 12 05
32](https://user-images.githubusercontent.com/9406895/226321853-05450b0a-c6f2-4558-8d84-757c9c40c24b.png)

## Checklist

- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-03-20 13:15:39 +01:00
Rares Mardare
d8bfc626de
Rares/1448 permissions (#1529)
# What this PR does

Adds a few more permission checks for #1448 

## Which issue(s) this PR fixes

#1448

## Checklist

- [x] `CHANGELOG.md` updated
2023-03-20 09:36:04 +00:00
Rares Mardare
b41ac58713
Prevent viewer from opening link to mobile app (#1537)
# What this PR does

## Which issue(s) this PR fixes

Prevent a user with role = Viewer to access mobile app from the link on
User Profile Page
2023-03-20 09:35:14 +00:00
Vadim Stepanov
6d08955892
PD migrator: fix route order (#1570)
Fix a bug when it's not possible to migrate when there's non-sequential
event rule order (due to disabled event rules).
2023-03-17 17:03:53 +00:00
Vadim Stepanov
2bfe131591
PD migrator: ignore deleted services in event rules (#1569)
Update PD migrator to create routes with no escalation chain selected
for event rules referencing deleted services
2023-03-17 11:32:30 +00:00
Joey Orlando
4d655dff60
modify check_escalation_finished_task task (#1266)
# What this PR does

This PR:
- modifies the `check_escalation_finished_task` celery task to:
  - do stricter escalation validation based on the alert group's
escalation snapshot (see the `audit_alert_group_escalation` method in
`engine/apps/alerts/tasks/check_escalation_finished.py` for the
validation logic)
- use a read-only database for querying alert-groups if one is
configured, otherwise use the "default" one
- ping a configurable heartbeat (new env var
`ALERT_GROUP_ESCALATION_AUDITOR_CELERY_TASK_HEARTBEAT_URL` added)
- increase the task frequency from every 10 to every 13 minutes (this
can be configured via an env variable)
  - adds public documentation on how to configure this auditor task
- modifies the local celery startup command to properly take into
consideration all celery related env vars (similar to the ones we use in
`engine/celery_with_exporter.sh`; this made it easier to enable `celery
beat` locally for testing)
- removes the following code:
- removes references to `AlertGroup.estimate_escalation_finish_time` and
marks the model field as deprecated using the [`django-deprecate-fields`
library](https://pypi.org/project/django-deprecate-fields/). This field
was only used for the previous version of this validation task
- `EscalationSnapshotMixin.calculate_eta_for_finish_escalation` was only
used to calculate the value for
`AlertGroup.estimate_escalation_finish_time`
  - `calculate_escalation_finish_time` celery task
  

## Which issue(s) this PR fixes

https://github.com/grafana/oncall-private/issues/1558

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-17 10:14:08 +00:00
Vadim Stepanov
f85f77dbc7
PD migrator: allow migrating inbound email integrations (#1566) 2023-03-16 19:25:00 +00:00
Joey Orlando
515f62ab56
update wording in some Slack messages which mention 'incident' instead of 'alert group' (#1565)
# What this PR does


![image](https://user-images.githubusercontent.com/9406895/225678127-4a0bcf96-742e-4335-9958-36fa0be26b9f.png)

## Checklist

- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-03-16 16:43:49 +00:00
Joey Orlando
1ccd529d27
fix resolution note Slack rendering bug (#1561)
# Which issue(s) this PR fixes
changing the block element type from `plain_text` to `mrkdwn` now allows
slack to properly render Slack usernames in the Slack UI.

Also, it seems that the `mrkdwn` context block type does not support the
`emoji` key, hence getting rid of it. From the Slack
[docs](https://api.slack.com/reference/block-kit/composition-objects#text):
![Screenshot 2023-03-16 at 16 19
25](https://user-images.githubusercontent.com/9406895/225663614-b0dbbaf1-4b39-48a4-9064-a3aa43fa4f43.png)


## Before
![Screenshot 2023-03-16 at 16 12
33](https://user-images.githubusercontent.com/9406895/225663322-7e84f7a9-dc6b-4827-b01c-1643bd27b766.png)

## After
![Screenshot 2023-03-16 at 16 12
27](https://user-images.githubusercontent.com/9406895/225663343-eff3fd27-d44b-4c2a-a06d-23e0936fcd37.png)



## Checklist

- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-03-16 15:36:29 +00:00
Vadim Stepanov
9f35ffbe80
Update CHANGELOG.md 2023-03-16 15:22:30 +00:00
Vadim Stepanov
4aa4adfecb
PD migrator: add ability to migrate event rules (#1555)
# What this PR does
Adds an ability to migrate global event rulesets to OnCall integrations.

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/1300
2023-03-16 14:58:21 +00:00
Matias Bordese
3de7766389
Check for duplicated positions in TF escalation policies (#1554)
Fixes https://github.com/grafana/oncall-private/issues/1680.
Avoid multiple escalation policies in an escalation chain to have the
same order.
2023-03-16 11:48:11 +00:00
Vadim Stepanov
747fbfcb1b
Add regex_match Jinja filter (#1556)
# What this PR does
Adds a new `regex_match` filter to Jinja environment.

## Which issue(s) this PR fixes
This should be useful on its own, and also helpful for
https://github.com/grafana/oncall/pull/1555.

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-16 10:18:49 +00:00
Vadim Stepanov
bd12d38ee0
Public API: allow null escalation chain when creating routes (#1557)
# What this PR does
Allows passing `null` as a value for `escalation_chain` when creating
routes via the public API.

## Which issue(s) this PR fixes
This is needed to unblock https://github.com/grafana/oncall/pull/1555 +
creating a route without an escalation chain is possible in the web UI,
so this PR makes the public API more consistent with the web UI.

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-16 09:40:50 +00:00
Innokentii Konstantinov
4bb6397cf1 Update CHANGELOG.md 2023-03-16 15:06:58 +08:00
Innokentii Konstantinov
8242964c05 Add inbound-email.png 2023-03-16 14:46:14 +08:00
Innokentii Konstantinov
cf8a32c3b5 Add InboundEmail integration logo 2023-03-16 14:45:28 +08:00
Vadim Stepanov
ea60c0d247
Inbound email integration (#837)
This PR add Inbound Email integration.

It designed to support some variety of ESPs, but in prod we will use
Mailgun, so locally I tested it only with mailgun ESP.

**Important:**
To make it work on different clusters I'm planning to provide different
email domains for different regions, like ....@us.oncall.grafana.net,
...@eu.oncall.grafana.net

---------

Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-03-16 13:59:21 +08:00
Joey Orlando
73c394112c
add IS_OPEN_SOURCE env var to UI integration tests (#1546) 2023-03-15 06:56:03 +01:00
Matias Bordese
0452b68722
Merge branch 'main' into dev 2023-03-14 15:09:12 -03:00
Matias Bordese
3e6acceeda
Update CHANGELOG.md 2023-03-14 15:03:46 -03:00
Matias Bordese
3ade317010
Rework webhook trigger tasks checks and payload build (#1544) 2023-03-14 17:21:46 +00:00
Joey Orlando
c7149edd2b
Merge pull request #1540 from grafana/helm-release/1.1.37
Merge: Release oncall Helm chart 1.1.37
2023-03-14 18:20:57 +01:00
Vadim Stepanov
61b7c2ec48
Add alert group filter by escalation chain (#1535)
# What this PR does
Adds a new filter on alert groups page that allows to filter alert
groups by escalation chain.

<img width="1204" alt="Screenshot 2023-03-13 at 22 42 00"
src="https://user-images.githubusercontent.com/20116910/224848730-ef753856-a050-4acb-ba36-498d2bca2b4f.png">


## Which issue(s) this PR fixes
This should be useful on it's own as it's giving more filtering
capabilities, but it also could be useful for
https://github.com/grafana/oncall/issues/1300, if PD rulesets are
migrated to a single integration with multiple escalation chains.

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
2023-03-14 14:38:18 +00:00
Michael Derynck
e089e29b86
Enable new webhooks preview per org (#1534) 2023-03-14 14:31:47 +00:00
Vadim Stepanov
44e4b22054
Minor fix for schedule quality calculation methodology text (#1541) 2023-03-14 13:48:41 +00:00
GitHub Actions
706c915409 Release oncall Helm chart 1.1.37 2023-03-14 12:24:19 +00:00
Joey Orlando
b8ee428337
Merge pull request #1539 from grafana/dev
v1.1.37 release
2023-03-14 13:22:18 +01:00
Joey Orlando
433261fe3d
fix changelog 2023-03-14 13:13:02 +01:00
Joey Orlando
521819c31c
fix changelog 2023-03-14 13:09:36 +01:00
Joey Orlando
5998f06d98
update changelog 2023-03-14 12:40:02 +01:00
Alyssa Wada
2dacb0ee8a
Add RBAC guidance to users and teams documentation (#1413)
# What this PR does
RBAC for OnCall will be GA with Grafana 9.4 release.
Update [this
doc](https://grafana.com/docs/oncall/latest/configure-user-settings/) to
include details about RBAC for OnCall and link to RBAC-specific docs.

## Which issue(s) this PR fixes
Issue #1399 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-14 07:08:42 +01:00
Matias Bordese
8ca82ad2cd
Webhooks trigger tasks on alert group events (#1533) 2023-03-13 21:19:22 +00:00
Rares Mardare
8e12397537
Quickfix for integrations (#1532)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-13 21:48:17 +02:00
Michael Derynck
00ae375ecf
Add inital UI for new webhooks (#1526) 2023-03-13 11:50:24 -06:00
Maxim Mordasov
82a9f8a5e7
Improve direct user paging (#1471)
# What this PR does

Direct user paging feature improvements

## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/1358

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-13 14:36:05 +00:00
Rares Mardare
15f6898426
Rares/score quality (#1324)
# What this PR does

#118 

## Checklist

- [x] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-13 13:02:29 +00:00
Rares Mardare
defae434ba
Prevent redirecting to Integrations if you navigated away to a different screen (#1449)
# What this PR does

A while ago we fixed a bug where each time you navigated to
Integrations, moving to a different a screen would have redirected you
back to the Integrations screen if the escalation chain didn't complete
loading before you changed the screens. Added a check for `isMounted`
which should prevent this bug to appear again in the future.
2023-03-13 13:01:59 +00:00
Matias Bordese
2db1a5a883
Add initial webhooks internal plugin API (#1524) 2023-03-10 17:00:06 +00:00
Matias Bordese
cebfec5ef9
Add support for web overrides to Terraform schedules (#1222)
Related to #828 

- Enable web UI for API/Terraform schedules to add overrides
- Refactor backend to add a flag toggling between web-based and
iCal-based overrides (these options are mutually exclusive)

Also updated read-only tooltips (related to #1483)
2023-03-10 16:21:50 +00:00
Joey Orlando
b6615c087f
improve e2e tests authentication flow (#1470)
# What this PR does

This PR makes the Grafana login portion of the e2e tests much
faster/more reliable.

Currently we use CSS selectors to go to the login form, input the
username/password, and proceed as such. This PR refactors to instead
make a call to `POST ${GRAFANA_API_URL}/login` and then stores that
authentication state that is then reused by subsequent browsers. This
was inspired by [how the Incident team does their playwright
authentication](https://github.com/grafana/incident/blob/main/plugin/e2e/global-setup.ts)
+ the recommendation from the [Playwright
docs](https://playwright.dev/docs/auth#basic-shared-account-in-all-tests)

## Which issue(s) this PR fixes

Slow/flaky Grafana login flow

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [ ] `CHANGELOG.md` updated (N/A)
2023-03-10 06:45:15 +01:00
Matias Bordese
2048e783ba
Add webhooks app and initial models (#1101) 2023-03-09 19:39:25 +00:00
Matias Bordese
9709cfbc73
Add force option to delete web schedule shifts (#1519)
Related to #1505
Add force param to shift delete endpoint in plugin internal API.
2023-03-09 18:39:25 +00:00
Vadim Stepanov
302586792f
Update dev/README.md (#1516)
# What this PR does
Fix `cp` command usage in `dev/README.md` + add `npx playwright install`
step to integration tests instruction
2023-03-09 17:09:02 +00:00
Vadim Stepanov
cf7985e199
Merge pull request #1518 from grafana/helm-release/1.1.36
Merge: Release oncall Helm chart 1.1.36
2023-03-09 15:29:59 +00:00
GitHub Actions
b3d23079c7 Release oncall Helm chart 1.1.36 2023-03-09 13:58:38 +00:00