Commit graph

2696 commits

Author SHA1 Message Date
Innokentii Konstantinov
3f575b5a27
Fix phone provider initialization (#2434) 2023-07-05 05:54:39 -04:00
Joey Orlando
91b975a64a
Update CHANGELOG.md 2023-07-05 05:18:13 -04:00
Joey Orlando
f6e0ec83d8
remove networkIdle wait state when switching pages (#2428)
# Which issue(s) this PR fixes

speed up e2e tests + improve stability

## 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-07-05 05:15:21 -04:00
Rares Mardare
7195646413
Rares/webhook UI changes (#2419)
# 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-07-05 09:06:33 +00:00
Ildar Iskhakov
5cc06b7041
Remove url from sms notification, change format (#2317)
# What this PR does
Remove link from sms notification to avoid difficulties with different
countries anti-spam regulations


## 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: Joey Orlando <joey.orlando@grafana.com>
2023-07-05 16:32:54 +08:00
Innokentii Konstantinov
f35ed45e2e
Merge branch 'main' into dev 2023-07-05 14:44:02 +08:00
Innokentii Konstantinov
e0d8e7980e Fix date of 1.3.4 2023-07-05 14:31:37 +08:00
Innokentii Konstantinov
fe5b6516f0 Update CHANGELOG.md 2023-07-05 14:30:51 +08:00
Joey Orlando
223f840172
update .drone.yml signature 2023-07-05 08:29:16 +02:00
Yulya Artyukhina
4f6cfcca28
Add organization moved exception to mobile app auth (#2422)
# What this PR does

Add organization moved exception to mobile app auth to redirect requests
to correct region

## 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-07-05 06:11:56 +00:00
Andrey Oleynik
aeb35009be
add zvonok integration (#2339)
Added integration with [zvonok.com](https://zvonok.com) service.

Features:
- Phone number validation
- Test calls
- Selection of pre-recorded audio
- Making calls
- Processing call status
- Acknowledgment alert group (optional)

To process the call status, it is required to add a postback with the
GET method on the side of the zvonok.com service with the following
format ([more info
here](https://zvonok.com/ru-ru/guide/guide_postback/)):

```${ONCALL_BASE_URL}/zvonok/call_status_events?campaign_id={ct_campaign_id}&call_id={ct_call_id}&status={ct_status}&user_choice={ct_user_choice}```

The names of the transmitted parameters can be redefined through environment variables.

---------

Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-07-05 05:55:53 +00:00
Joey Orlando
5cc9d5441f
include note about docker-compose rabbitmq version bump 2023-07-04 15:49:30 -04:00
Joey Orlando
f5495ed702
add first multi-role e2e tests (#2417)
# What this PR does

Lays ground work for #1586. Adds three new fixtures, `adminRolePage`,
`editorRolePage`, and `viewerRolePage`. These fixtures can be easily
accessed in a `test` context and allow the test to be run as a user
authenticated with one of these Grafana basic roles.

The bulk of the changes in the PR are to the "global setup" step. There
is a bit of logic + communication with the Grafana instance's API, in
order to create all the necessary authentication credentials.

Lastly, adds the first basic role authorization test, asserting that
Admin/Editors can view the list of OnCall users, whereas Viewers cannot.

## Checklist

- [x] 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-07-04 09:19:14 +00:00
Innokentii Konstantinov
44d0252ef1
Remove test push dynamic setting (#2416) 2023-07-04 15:01:30 +08:00
Vadim Stepanov
44e1bef250
Add full avatar URL for on-call users in schedule internal API (#2414)
# What this PR does

Adds full avatar URL for on-call users in schedule internal API
(`avatar_full`).

## 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-06-30 14:45:40 +01:00
Joey Orlando
97096b4663
update oss image build drone step 2023-06-30 11:20:16 +02:00
Michael Derynck
9945d975cb
Merge pull request #2412 from grafana/helm-release/1.3.3
Merge: Release oncall Helm chart 1.3.3
2023-06-29 17:16:39 -06:00
GitHub Actions
ba94ff69d6 Release oncall Helm chart 1.3.3 2023-06-29 21:01:38 +00:00
Michael Derynck
0c90256005
Merge pull request #2411 from grafana/dev
Merge dev to main
2023-06-29 14:59:36 -06:00
Michael Derynck
8a373fb9f1 Update CHANGELOG.md, merge main 2023-06-29 14:50:24 -06:00
Michael Derynck
8ea5f93719
Update CHANGELOG.md 2023-06-29 14:46:05 -06:00
Michael Derynck
2b81dfd8c3
Remove attempt to check token when editor/viewers are accessing the plugin (#2410)
# What this PR does
Remove attempt to check token when editor/viewers are accessing the
plugin. Only check the token for reinstall during sync from the
PluginConfigPage since only Admins would have access to it.

## Which issue(s) this PR fixes

## 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-06-29 14:17:02 -06:00
Vadim Stepanov
aa2bb81519
Simplify SlackEventApiEndpointView methods (#2384)
# What this PR does

Simplifies `_get_organization_from_payload` and
`_get_slack_team_identity_from_payload` methods on
`SlackEventApiEndpointView`, so it's (hopefully) easier to grasp.

## 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-06-29 16:23:33 +00:00
Yulya Artyukhina
04047c6ebe
Resolution notes endpoint docs (#2404)
# What this PR does
- Add docs for `/resolution_notes` public api endpoint
- Fix resolution notes order to show notes for the newest alert group on
top

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

## 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-06-29 14:08:21 +00:00
Joey Orlando
cc20c9dfdd
re-enable mypy GitHub Actions CI job (#2390)
# What this PR does

```bash
❯ mypy .
Success: no issues found in 595 source files
```

- re-enable the mypy CI check
- fixes all `django-manager-missing` mypy errors
- disable all other rules currently giving mypy errors
- changing the approach here. rather than enforcing that backend
contributors fix >= 1 `mypy` error on their PR, lets simply disable all
the rules that're currently returning errors and slowly re-enable these
one at a time #2392

## 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)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-29 14:01:52 +00:00
Joey Orlando
c705bded9f
add back "/v8" suffix to linux/arm64 platform 2023-06-29 15:45:12 +02:00
github-actions[bot]
6d2b51bb1c
Merge: Release oncall Helm chart 1.3.2 (#2399)
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.3.2,
appVersion: v1.3.2) 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-06-29 09:24:37 -04:00
Joey Orlando
323ab30fdd
use different drone plugin image to use docker buildx
for multiarch support
2023-06-29 15:14:13 +02:00
Yulya Artyukhina
cef9e0ac79
Fix alerts order in public api (#2402)
# What this PR does
Change alerts order in `/alert` public api endpoint

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

## 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-06-29 12:52:30 +00:00
Joey Orlando
3c798f28d6
fix oss docker image build drone step 2023-06-29 14:16:47 +02:00
Joey Orlando
cb31ea4c6f
fix oss docker image build drone step 2023-06-29 14:16:17 +02:00
Joey Orlando
8c768f2a70
v1.3.2 2023-06-29 13:47:39 +02:00
Joey Orlando
952af0b36f
Update CHANGELOG.md 2023-06-29 07:42:36 -04:00
Michael Derynck
5b009563db
OnCall plugin use service accounts instead of api keys (#2385)
# What this PR does
Changes OnCall plugin to use service accounts and api tokens instead of
api keys. API keys will continue to work but if the plugin ever replaces
them it will use a service account instead. Previously this was thought
to be unnecessary but it was missing the case where the API key was
converted to a service account which it could no longer find when
searching the `/api/auth/keys` endpoint. That key would not be deleted
and it would conflict with a newly created one of the same name.

Now the behaviour is as follows: 
1. Anytime a new token is needed all API keys and tokens under the
service account matching the defined names will be deleted
2. A service account will be created named `sa-autogen-OnCall` if one
does not already exist
3. An api token will be created under that service account named
`OnCall`

## Which issue(s) this PR fixes
#1806 

## 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)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-29 07:37:28 -04:00
Joey Orlando
228889f850
v1.3.4 2023-06-29 13:05:00 +02:00
Joey Orlando
8ff5af5e4a
update CHANGELOG 2023-06-29 13:01:59 +02:00
github-actions[bot]
753d0b4696
Merge: Release oncall Helm chart 1.3.3 (#2378)
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.3.3,
appVersion: v1.3.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-06-29 06:58:51 -04:00
Joey Orlando
d2754ae64f
use docker buildx native multiarch image support (#2375)
# What this PR does

`docker buildx` natively supports multiarch builds. This means we no
longer need to have duplicate `docker build` Drone steps + there is no
longer a need for the manual "manifesting" step. This [blog
post](https://www.docker.com/blog/multi-arch-build-and-images-the-simple-way/)
from Docker perfectly summarizes the difference between what we do now
vs. what this PR would do.

This would also get rid of pushing `vX.Y.Z-{architecture}` tagged
images. These are redundant because modern `docker` clients can pull the
appropriate image for the host OS, from a multiarch image:
<img width="618" alt="Screenshot 2023-06-28 at 12 54 09"
src="https://github.com/grafana/oncall/assets/9406895/ce4cd0ef-b92e-4273-877d-a73818d9cc54">


## 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)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-29 06:51:21 -04:00
Joey Orlando
aefaa84f28
update rabbitmq docker containers to v3.12.0 (#2359)
# What this PR does

Update `rabbitmq` Docker containers used in the `docker-compose` config
files, Drone pipelines, and GitHub Actions to use version 3.12.0.

FWIW, we're already using v12.0.0 of the bitnami `rabbitmq` `helm` chart
which, by default, uses the `3.12.0-debian-11-r0` tag for the `rabbitmq`
image ([chart
docs](https://artifacthub.io/packages/helm/bitnami/rabbitmq/12.0.0)).

closes #695 

## 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)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-29 06:49:00 -04:00
Joey Orlando
60ef4450e6
in the e2e tests, await the grafana instance if it is currently down/unavailable (#2366)
# What this PR does

In the e2e tests, await the grafana instance if it is currently
down/unavailable. This is mostly useful for when the tests are run
against a hosted grafana instance and it is possible that the instance
is paused ([example
build](https://drone.grafana.net/grafana/oncall-private/5735/1/4)).

https://www.loom.com/share/35eb49035d454ac6ba306cddfe63f255

## 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)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-29 06:48:23 -04:00
Vadim Stepanov
3ebfd9c8b2
Remove outdated Slack functionality to create alerts (#2383)
# What this PR does

There's an outdated Slack handler that creates alerts when a file is
shared in a channel. I can't remember why it was introduced in the first
place, but I'm pretty sure that it's deprecated a long time ago, and
this feature is not documented anywhere. The PR also removes
`AlertReceiveChannel.integration_slack_channel_id` as it's no longer
used.

## 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-06-29 10:09:02 +00:00
Vadim Stepanov
be4176b947
Make OrderedModel.save() respect additional arguments (#2382)
# What this PR does

Make `OrderedModel.save()` respect additional arguments (e.g. `using`)

## 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-06-28 14:53:48 +00:00
Innokentii Konstantinov
03663ea319 Update CHANGELOG.md 2023-06-28 17:52:17 +08:00
Innokentii Konstantinov
5c37aeb0b9 Update CHANGELOG.md 2023-06-28 17:51:13 +08:00
Innokentii Konstantinov
f13a059e03
Merge pull request #2373 from grafana/dev
Dev to main
2023-06-28 17:48:44 +08:00
Joey Orlando
ffd6aac400
mock package.json version for plugin configuration tests (#2370) 2023-06-28 17:18:37 +08:00
Rares Mardare
43d1f607f0
Fix for #2357 (#2372)
# What this PR does

#2357
2023-06-28 12:12:12 +03:00
Yulya Artyukhina
f1fcb41fb4
Add "user_was_notified_of_alert_groups" metric (#2334)
This PR adds new metric for Prometheus exporter
"user_was_notified_of_alert_groups" which counts how many alert groups
user was notified of.

## 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)

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-28 08:15:19 +00:00
Ildar Iskhakov
cb2351d17d
Merge pull request #2368 from grafana/dev
v1.3.2
2023-06-28 09:50:10 +08:00
Ildar Iskhakov
8f5441b4c6
Update CHANGELOG.md 2023-06-28 09:41:45 +08:00