Commit graph

2020 commits

Author SHA1 Message Date
github-actions[bot]
116fcaec82
Merge: Release oncall Helm chart 1.2.5 (#1673)
Merge this PR to `main` branch to start another [github actions
job](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release.yml)
that will release the updated version of the chart (version: 1.2.5,
appVersion: v1.2.5) into `grafana/helm-charts` helm repository.

This PR was created automatically by this [github
action](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release_pr.yml).

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-30 14:03:00 +02:00
github-actions[bot]
6f99a96c74
Merge: Release oncall Helm chart 1.2.4 (#1670)
Merge this PR to `main` branch to start another [github actions
job](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release.yml)
that will release the updated version of the chart (version: 1.2.4,
appVersion: v1.2.4) into `grafana/helm-charts` helm repository.

This PR was created automatically by this [github
action](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release_pr.yml).

Co-authored-by: GitHub Actions <actions@github.com>
2023-03-30 14:02:10 +02:00
Vadim Stepanov
0ad25b7eb7
Merge pull request #1672 from grafana/dev
v1.2.5
2023-03-30 12:49:04 +01:00
Vadim Stepanov
83504b15e4
Revert "Collection of bugs" (#1671)
Reverts grafana/oncall#1600 as it makes Slack links not working
correctly with the plugin UI.
2023-03-30 12:44:41 +01:00
Vadim Stepanov
0d1724b43a
Merge pull request #1669 from grafana/dev
v1.2.4
2023-03-30 10:51:18 +01:00
Vadim Stepanov
9fca66d869
Changelog v1.2.4 (#1668) 2023-03-30 10:47:53 +01:00
Maxim Mordasov
061123e124
Allow changing team for escalation chains (#1658)
# What this PR does

Allows changing team for escalation chains

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)

---------

Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-03-30 10:43:00 +01:00
Yulia Shanyrova
871b09a04c
Collection of bugs (#1600)
# What this PR does
List of fixes:

- Incident word removed from the url to `/alert-groups` page and
`/alert-group/{id}`
- Incident word removed from other parts of UI (Maintenance page, Linked
alert groups, Templates)
- Sticky rotation form was fixed at Schedules (when you scroll down and
open Layer 1)
- Integrations linked to Escalations chains are displayed right after
loading the page
- Autoresolve condition link to Alert behaviour template

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1490
https://github.com/grafana/oncall/issues/1489
https://github.com/grafana/oncall/issues/1486

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
2023-03-30 05:49:06 +00:00
Vadim Stepanov
3c00345f54
Fix Grafana teams sync (#1652)
# What this PR does
Sometimes plugin sync fails with the following exception:
```
Cannot delete or update a parent row: a foreign key constraint fails (`schedules_oncallschedule`, CONSTRAINT `alerts_oncallschedul_team_id_4e633f4b_fk_user_mana` FOREIGN KEY (`team_id`) REFERENCES `user_management_team` (`id`))'
```

How to reproduce:
1. Create a new Grafana team
2. Create two schedules with different types (e.g. ICal and Web) and
assign both schedules to the new team
3. Delete the team in Grafana
4. Trigger plugin sync, the sync will fail with the exception above

This happens because the `OnCallSchedule` Django model is a polymorphic
model and there's a [known
bug](https://github.com/django-polymorphic/django-polymorphic/issues/229)
in `django-polymorphic` with deleting related objects when using
`SET_NULL` and `CASCADE`. This PR adds non-polymorphic versions of
`SET_NULL` and `CASCADE` to use in schedule FKs as per this
[comment](https://github.com/django-polymorphic/django-polymorphic/issues/229#issuecomment-398434412).

This also applies to two other schedule FKs: `organization` and
`user_group`, which are not working properly as well.

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-03-28 18:26:24 +00:00
Vadim Stepanov
f83c5fca52
PD migrator: retry on network errors (#1650) 2023-03-28 16:57:37 +01:00
Yulia Shanyrova
63af99eb75
Refactoring of isInWorkingHours method (#1574)
# What this PR does
Instead of using string comparing now isBetween method from dayjs is
used

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1418

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-28 14:45:47 +00:00
Rares Mardare
30103762db
Fix for viewer permissions when viewing users in schedule (#1648)
# What this PR does

Fix for #999
2023-03-28 14:04:42 +00:00
Joey Orlando
3e41cf8747
Update CHANGELOG.md 2023-03-28 13:33:51 +02:00
Salvatore Giordano
1c3c8e05bd
Update apns payload with corrected critical field (#1646)
I just noticed that ios notifications are always critical, even when the
switch ("override DND") is set to `false`. I believe this is because
`critical` should be either 1 or 0

https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification#2990112

---------

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-28 10:57:40 +00:00
Ethan
fb046b3abd
Snyk monitor workflow change (#1549)
# What this PR does
Replaces `snyk test` with `snyk monitor` so results get pushed to out
Snyk platform and the [Snyk
Dashboards](https://ops.grafana-ops.net/d/H0w7l5NVk/snyk-overview?orgId=1)
gets updated.

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-28 08:26:29 +00:00
github-actions[bot]
bea94dab4b
Merge: Release oncall Helm chart 1.2.3 (#1644)
Merge this PR to `main` branch to start another [github actions
job](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release.yml)
that will release the updated version of the chart (version: 1.2.3,
appVersion: v1.2.3) into `grafana/helm-charts` helm repository.

This PR was created automatically by this [github
action](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release_pr.yml).

Co-authored-by: GitHub Actions <actions@github.com>
2023-03-28 10:19:24 +02:00
Joey Orlando
0eb4bd95e6
Revert "Revert "speed up ci builds from 15 to <7 minutes"" (#1643)
Reverts grafana/oncall#1639
2023-03-28 09:34:03 +02:00
Joey Orlando
61608beee6
fix failing drone ci builds (#1642) 2023-03-28 09:33:37 +02:00
Innokentii Konstantinov
a32d46482e
Merge pull request #1641 from grafana/dev
Dev to Main
2023-03-28 14:27:17 +08:00
Ildar Iskhakov
b707a7337e Specify celery worker queue in pyroscope tags 2023-03-28 13:26:03 +08:00
Ildar Iskhakov
e0dd4bd128
Update wsgi.py 2023-03-28 13:11:22 +08:00
Innokentii Konstantinov
cbb06492ae
Revert "speed up ci builds from 15 to <7 minutes" (#1639)
Reverted due to stuck ci
2023-03-28 13:01:49 +08:00
Ildar Iskhakov
5008d83573
Fix failing ci task (#1640)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-03-28 12:42:27 +08:00
Innokentii Konstantinov
12b9a8e0d2
Slack team connector v2 (#1581)
# What this PR does
Support Slack team connector v2 introduced
[here](https://github.com/grafana/oncall-gateway/pull/24)
2023-03-28 03:27:45 +00:00
Ildar Iskhakov
c158c8f28b
Configure pyroscope (#1638)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-03-28 11:34:37 +08:00
Joey Orlando
23cd736c30
speed up ci builds from 15 to <7 minutes (#1615)
This PR cuts GitHub Action build times from 14-15 minutes, down to just
under 7 minutes. It does this by:
- caching `grafana-plugins/node_modules` and `pip` dependencies based on
their respective dependency files (eg. `requirements.txt` &
`yarn.lock`). This step alone saves ~3 minutes.
- get rid of the "build-engine-docker-image" and
"backend-integration-tests" jobs in the old "Integration Tests"
workflow. This was split out this way so that we could build the backend
docker image once, upload the artifact, and then reuse it across the
backend and e2e tests. We no longer need these backend integration tests
because we are testing the same thing in the e2e tests. This saves ~45
seconds of having to upload the image artifact.
- few improvements within the integration tests themselves:
- move plugin configuration to the `globalSetup.ts`. This means that
every test does not need to check if the plugin has been configured
because it is done once before all the tests are run.
- cache the plugin frontend build. If your commit doesn't change
anything to `grafana-plugin/src` or `grafana-plugin/yarn.lock` it should
be safe to reuse a previously built/cached version of the plugin
frontend. This saves ~3 minutes
- cache playwright binaries/dependencies. Only re-install them if the
version of `@playwright/test` in `grafana-plugin/yarn.lock` changes.
This saves ~3 minutes.
  
**Other things to mention**
Once we refactor the `GSelect` component to not call the `onChange`
callback on every keyDown event (#1628), this should allow us to
parallelize the integration tests, and cut the time required to execute
the tests themselves in half
2023-03-27 18:07:19 +02:00
Vadim Stepanov
622bf525e8
Merge pull request #1633 from grafana/helm-release/1.2.2
Merge: Release oncall Helm chart 1.2.2
2023-03-27 16:33:27 +01:00
GitHub Actions
68fc4fcd40 Release oncall Helm chart 1.2.2 2023-03-27 14:41:50 +00:00
Vadim Stepanov
69a195132d
Merge pull request #1632 from grafana/dev
Dev to main (v1.2.2)
2023-03-27 15:29:43 +01:00
Vadim Stepanov
f44a4f40a3
v1.2.2 changelog (#1631) 2023-03-27 15:28:39 +01:00
Vadim Stepanov
ec5472cd6d
Support notification priority in FCM relay (#1630)
# What this PR does
Adds support for notification priority in FCM relay + add some tests on
FCM relay.

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/1550 and
https://github.com/grafana/oncall/pull/1612.

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated

No changelog update since notification priority is "Unreleased":
a2caeae3c7/CHANGELOG.md (unreleased)
2023-03-27 14:36:51 +01:00
Vadim Stepanov
a936c8c7fe
Improve schedule quality feature (#1602)
# What this PR does

Before:

<img width="281" alt="Screenshot 2023-03-23 at 16 56 42"
src="https://user-images.githubusercontent.com/20116910/227279464-c883ec05-a964-4360-bda2-3443409ca90a.png">

After:

<img width="338" alt="Screenshot 2023-03-23 at 16 57 41"
src="https://user-images.githubusercontent.com/20116910/227279476-468bffba-922a-45ea-b400-5f34d6bf0534.png">


- Add scores for overloaded users, e.g. `(+25% avg)` which means the
user is scheduled to be on-call 25% more than average for given
schedule.
- Add score for gaps, e.g. `Schedule has gaps (29% not covered)` which
means 29% of time no one is scheduled to be on-call.
- Make things easier to understand when there are gaps in the schedule,
add `(see overloaded users)` text.
- Consider events for next 52 weeks (~1 year) instead of 90 days (~3
months), so the quality report is more accurate. Also treat any balance
quality >95% as perfectly balanced. These two changes (period change and
adding 95% threshold) should help eliminate false positives for _most_
schedules.
- Modify backend & frontend so the backend returns all necessary user
information to render without using the user store.
- Move quality report generation to `OnCallSchedule` model, add more
tests.

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/1552

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
(public docs will be added in a separate PR)
2023-03-27 11:03:16 +00:00
Yulia Shanyrova
a2caeae3c7
Closing drawers by clicking outside was changed (#1608)
# What this PR does
Closing drawers by clicking outside was changed to closing by clicking
on buttons

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1493
2023-03-27 10:15:47 +00:00
Ildar Iskhakov
8d5cbcecf2
Start pyroscope only after uwsgi fork (#1607)
# What this PR does
Currently main uwsgi process sends spans while being idle, which make
graphs unreadable
<img width="494" alt="Screenshot 2023-03-23 at 18 00 21"
src="https://user-images.githubusercontent.com/2262529/227168746-125f2329-bfaa-4989-a391-712a230e0087.png">

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-27 12:00:57 +08:00
sarah-spang
44171fc7b6
Add label and formatted JSON example (#1465)
# What this PR does
- Updates documentation 

## Which issue(s) this PR fixes
- Removed visible backticks to correct formatting
- Added example of a variable that returns alert labels
- Added details on how to send labels in formatted JSON

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-03-23 17:12:19 +01:00
Matias Bordese
8278ad9670
Update override delete-related updates (#1599) 2023-03-23 15:45:27 +00:00
Rares Mardare
199f234a6a
Rares/2 webhooks (#1585)
# What this PR does

Webhooks ^_^
2023-03-23 17:34:16 +02:00
Joey Orlando
1580138a80
minor bugfix for ios push notifications config (#1614)
In the "apns" key of the message sent to FCM, "headers" should not be
nested under "payload", it should instead be at the same level. See
Firebase docs for the `FirebaseAdmin.Messaging.ApnsConfig` class
[here](https://firebase.google.com/docs/reference/admin/dotnet/class/firebase-admin/messaging/apns-config#class_firebase_admin_1_1_messaging_1_1_apns_config_1a7a9858f0b30ef7c437205ca01d6e62f6)
2023-03-23 14:48:52 +00:00
Ildar Iskhakov
cad8223a58
Update team management docs (#1606)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-23 13:15:55 +00:00
Joey Orlando
ceed76aada
for mobile app push notifications set FCM android priority to high (#1612)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-03-23 13:55:32 +01:00
Hamed Karbasi
9b70b79c78
use CustomURLValidator in custom_button (#1398)
# What this PR does
This PR, overrides Django URLValidator with a CustomURLValidator. It
just removes tld_re part from the regex, and the other behaviour remains
the same.
The CustomURLValidator is defined in common.api_helpers.utils.py file
and is utilized in custom_button.py.
Please inform me if it needs to be defined somewhere else or be
implemented with some other methods.

## Which issue(s) this PR fixes
Currently, URLValidator raises exception for URLs that don't have TLD.
This leads to not being able to use containers URL for outgoing webhooks
as they usually don't have TLD.

## Checklist

- [x] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2023-03-23 12:21:17 +00:00
Zach Day
7e0f40219d
Update wording when creating an integration (#1572)
Hello everyone 👋 

This is my first PR to the OnCall repo so please let me know if I'm not
doing something right. I'm also not sure if the items in the Checklist
are for me to complete or someone else. If those are for me, please let
me know and I'll be happy to do them (with some guidance as a
first-timer)!

# What this PR does
This PR is a really small suggestion to the wording in this file. I
believe it will help improve the way this line of text is read by users.

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-23 11:30:52 +00:00
github-actions[bot]
b2bb408dd7
Merge: Release oncall Helm chart 1.2.1 (#1603)
Merge this PR to `main` branch to start another [github actions
job](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release.yml)
that will release the updated version of the chart (version: 1.2.1,
appVersion: v1.2.1) into `grafana/helm-charts` helm repository.

This PR was created automatically by this [github
action](https://github.com/grafana/oncall/blob/dev/.github/workflows/helm_release_pr.yml).

Co-authored-by: GitHub Actions <actions@github.com>
2023-03-23 12:01:58 +01:00
Joey Orlando
b65daa165d
update pr template (#1610) 2023-03-23 11:48:33 +01:00
Joey Orlando
10fa332dd1
fix failing markdownlint (#1609) 2023-03-23 11:17:18 +01:00
Vadim Stepanov
e18c1a5f56
Inbound email OSS docs minor improvements (#1567)
# What this PR does
Updates the [OSS
docs](https://grafana.com/docs/oncall/latest/open-source/#email-setup)
for configuring inbound email setup:
- Separate inbound & outbound email sections so it's easier to reference
- Add info on configuring ESPs to forward emails to OnCall
- Minor formatting changes

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/575

## Checklist
- [x] Documentation added
2023-03-23 08:53:24 +02:00
Matvey Kukuy
79deaec281
Update issue-template.md 2023-03-23 08:49:42 +02:00
Ildar Iskhakov
9980e64313
Update CHANGELOG.md 2023-03-23 11:49:38 +08:00
Ildar Iskhakov
bbb9384ea1 Merge branch 'dev' 2023-03-23 10:47:29 +08:00
Ildar Iskhakov
cfcfa0336e
Add filters to outgoing webhooks 2 (#1598)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-23 09:52:59 +08:00