Commit graph

2037 commits

Author SHA1 Message Date
github-actions[bot]
e6e2fbbcaf
Merge: Release oncall Helm chart 1.2.7 (#1691)
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.7,
appVersion: v1.2.7) 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-04-03 12:07:49 +02:00
Joey Orlando
5a32defe99
Merge pull request #1690 from grafana/dev
v1.2.7
2023-04-03 11:51:43 +02:00
Joey Orlando
c4f2b28c2f
update changelog 2023-04-03 11:50:55 +02:00
Joey Orlando
0b23ad3d24
fix changelog 2023-04-03 11:50:00 +02:00
Vadim Stepanov
47b0ab4465
PD migrator: include service & integration names to ruleset (#1687)
# What this PR does
Allows to include service & integration names to migrated ruleset name
when passing `EXPERIMENTAL_MIGRATE_EVENT_RULES_LONG_NAMES=True`.
2023-03-31 18:12:45 +01:00
Vadim Stepanov
cf026c6c9a
PD migrator: migrate push notification user rules (#1685) 2023-03-31 14:53:27 +01:00
Rares Mardare
0acac58af0
Incidents mapped to /alert-groups (#1678)
# What this PR does

Reopened old reverted PR that @Ukochka worked on. In addition it has
fixed the redirect from `?page=incident` to `/alert-groups`

---------

Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-31 09:54:01 +00:00
Maxim Mordasov
2b3e269e28
Save selected teams filter in local storage (#1613)
# What this PR does

Selected teams filter is now saved in local storage

## Which issue(s) this PR fixes

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

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] 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)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-31 09:12:21 +00:00
Maxim Mordasov
11d62245e9
fix safari scroll (#1663)
# What this PR does

Fix  scroll in Safari

## Which issue(s) this PR fixes

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

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] 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)

---------

Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-30 18:17:58 +00:00
Vadim Stepanov
ac57c8ee9f
Fix team search (#1680)
# What this PR does

Team search doesn't work when filtering by team:

<img width="331" alt="Screenshot 2023-03-30 at 15 48 50"
src="https://user-images.githubusercontent.com/20116910/228875971-0f55bdf8-6aa7-4759-9882-cdf7d11bb0c7.png">

This PR fixes it + adds backend unit tests.


## 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-30 15:34:55 +00:00
Zach Day
6efff5e11f
Include a note on user working hours (#1679)
Add a note that user working hours are currently hardcoded and will be
updated in a future release

# What this PR does
Adds a note that OnCall working hours are hardcoded and cannot be
customized at the moment.

## 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-30 17:54:21 +03:00
Joey Orlando
3e77033b47
Merge pull request #1677 from grafana/helm-release/1.2.6
Merge: Release oncall Helm chart 1.2.6
2023-03-30 14:41:42 +02:00
GitHub Actions
c42cc66184 Release oncall Helm chart 1.2.6 2023-03-30 12:08:10 +00:00
Joey Orlando
97caffee61
Merge pull request #1676 from grafana/dev
dev -> main
2023-03-30 14:06:08 +02:00
Joey Orlando
73343d4da8
Update CHANGELOG.md 2023-03-30 14:05:30 +02:00
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
Matias Bordese
f0c73ccc39
RRULE until values must be specified in UTC tz (#1661)
When generating ical information for an event, the RRULE until value
must be specified in UTC.

Related to https://github.com/grafana/support-escalations/issues/5426.
2023-03-30 13:53:39 +02:00
Matvey Kukuy
1b0d385435
GH Action to add OSS issues to team's kanban board (#1674)
Internal.
2023-03-30 14:53:08 +03: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