Commit graph

5007 commits

Author SHA1 Message Date
Matias Bordese
75aaeef3f2 Truncate slack alert group title block below max size 2023-01-02 10:07:53 -03:00
Vadim Stepanov
9ebf20c488
Make user matching by email case-insensitive for PD migrator (#1056)
https://github.com/grafana/oncall/issues/1025
2022-12-30 16:11:35 +00:00
Vadim Stepanov
1b67a8ec68
Add PD migrator lint & test steps to CI (#1053)
# What this PR does

- Add PD migrator related hooks to `.pre-commit-config.yaml`
- Add Github Actions step for running PD migrator tests
2022-12-30 16:03:39 +00:00
Ildar Iskhakov
282e58db7b
Don't render logs for too big telegram dm (#1051)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2022-12-29 13:22:15 +00:00
Joey Orlando
d1a43bdf1b
specify Firebase GCP project id (#1042)
Modifies the Firebase app initialization to explicitly specify the GCP
project ID where the Firebase app is. Previously it would use the
project associated with the service account being used.
2022-12-22 21:44:53 +01:00
teodosii
3315e9dab1 just promises?
dev dependency


type reuse from sdk package
2022-12-22 15:06:55 +02:00
teodosii
f935803354 review
reordered dependencies
2022-12-22 13:38:47 +02:00
teodosii
89f6f74490 enforce hyphen naming for app 2022-12-22 00:34:25 +02:00
teodosii
62d0f019e4 Merge branch 'dev' into rares/grafana-faro 2022-12-22 00:28:57 +02:00
teodosii
d92ab4bca6 make api key optional to follow appo11y config convention 2022-12-22 00:03:09 +02:00
Joey Orlando
e1b798d586
add curl and bash to oncall engine docker image (#1034)
Currently unable to exec into a k8s pod. I believe this is because
`bash` is missing from the Docker image after switching from alpine to
debian buster. Debugging this by adding in `bash`.
2022-12-21 18:23:16 +01:00
teodosii
07a7941c6c Merge branch 'dev' into rares/grafana-faro 2022-12-21 11:32:53 +02:00
teodosii
6deede6385 Concat environment next to 'Grafana OnCall' for differentiating environments 2022-12-21 11:32:49 +02:00
Ieva
e1b9a75ce7
RBAC: update RBAC permissions scopes for plugins.app:access action (#1028)
Change RBAC permission scope to `plugins🆔grafana-oncall-app` from
`plugins.app🆔grafana-oncall-app` for permissions with
`plugins.app:access` action. This is needed because [Grafana is
expecting](https://github.com/grafana/grafana/blob/main/pkg/services/accesscontrol/pluginutils/utils.go#L20-L21)
`plugins:` not `plugins.app` prefix for permissions with
`plugins.app:access` action.
2022-12-20 18:15:18 +01:00
teodosii
2948b2f87d lint fix
package
2022-12-20 17:47:22 +02:00
teodosii
726aff996e Merge branch 'dev' into rares/grafana-faro 2022-12-20 15:54:08 +02:00
Juris Pavļučenkovs
327b7121ac
Helm: define engine update strategy in values.yaml (#985)
# What this PR does

Now it is possible to change engine deployment update strategy in
values.yaml.
## Which issue(s) this PR fixes

This is due to #334 and #316, as with rolling update, race conditions
might happen when there is still an old engine pod running.

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2022-12-20 13:59:19 +01:00
Joey Orlando
7ebc9cbbf7
modify push notification settings + use fcm-django library (#998)
- swaps out `django-push-notifications` for
[`fcm-django`](https://github.com/grafana/fcm-django). Again.. this is a
fork of the parent repo for exactly the same reason.. the migrations
point to `auth_user` without letting us use our own user model, this has
been patched in the `grafana` fork. The reason why we are using
`fcm-django` vs `django-push-notifications` is that the latter does not
support the new FCM API, only the "legacy" API. The legacy FCM API does
not support certain push notification settings that we would like to
use.
- modifies the iOS/Android specific push notification settings
- adds a `flower` pod in the `docker-compose-developer.yml`, useful for
debugging tasks locally
- sets the mobile app verification token TTL to 5 minutes when
developing locally. The default of 1 minute makes working with device
emulators really tricky..

This PR also swaps out the base image in `engine/Dockerfile` from
`python:3.9-alpine3.16` to `python:3.9-slim-buster`.

As to why.. in short, with the introduction of the `fcm-django` library
there is now a peer-dependency on
[`grpcio`](https://github.com/grpc/grpc) (which is used by
`firebase_admin`.. which I am using in this PR to interact directly with
Firebase Cloud Messaging (FCM)). `grpcio` does not publish wheels (read:
compiled binaries) for the Alpine distro. It does publish wheels for
Debian and hence `pip install -r requirements.txt` does not need to
build this library from the source distribution.

This is a [known
"issue"](https://github.com/grpc/grpc/issues/22815#issuecomment-1107874367)
and the recommended solution in the community is to.. not use alpine.

These were the numbers, when building the image locally, in terms of
image size and build time:

| | Local image size (uncompressed | Build time (may differ based on
your network speed) |
| ------------------------- | -------------------------------------- |
---------- |
| `python:3.9-alpine3.16`   | 785MB  | 320s |
| `python:3.9-slim-buster` | 1.05GB  | 90s   |

Co-authored-by: Salvatore Giordano <salvatoregiordanoo@gmail.com>
2022-12-20 12:41:34 +01:00
teodosii
b7ac9e4a85 basic test for faro 2022-12-20 11:22:41 +02:00
teodosii
93553b1776 mock faro packages so tests can pass 2022-12-19 17:00:47 +02:00
teodosii
acfa730903 Merge branch 'dev' into rares/grafana-faro 2022-12-19 13:30:47 +02:00
teodosii
d1f962bfbd default to {} for process.env check 2022-12-19 13:30:40 +02:00
Rares Mardare
5595480d3a
add qr code class with white background (#1012)
# What this PR does

- Adds white border around the QR code + small margin below
2022-12-19 14:15:32 +03:00
Ildar Iskhakov
fa3413d2a9 Add tracing support 2022-12-19 17:15:06 +08:00
Innokentii Konstantinov
7bb4fdfe43
Merge pull request #1017 from grafana/fix_ag_filtering
Speedup search alertgroup to group alert
2022-12-19 10:59:24 +08:00
Innokentii Konstantinov
41f886b31e Speedup seach alertgroup 2022-12-17 19:34:13 +08:00
Rares Mardare
fb164d3b01 npe guard 2022-12-16 19:51:08 +02:00
Rares Mardare
f5be86e1d2 a few more tweaks 2022-12-16 19:49:30 +02:00
Matvey Kukuy
275aa94c71
Small wording fix (Incident -> AG) (#1009)
Small wording fix (Incident -> AG)
2022-12-16 17:23:21 +02:00
Rares Mardare
93ee675c38 more faro changes 2022-12-16 16:04:02 +02:00
Gilberto Junior
f16c4b26c6
Increasing library default timeout (#1005)
# What this PR does

## Which issue(s) this PR fixes

Issues: https://github.com/grafana/oncall/issues/990

## Checklist

- [X] Tests updated
2022-12-16 13:09:04 +02:00
Rares Mardare
6253cc8878 added dotenv to read env variables, pass faro instance to this.faro 2022-12-15 17:47:30 +02:00
Rares Mardare
cc37596141 isolate faro, use singleton and rely on config file instead 2022-12-14 17:22:19 +02:00
Rares Mardare
7a6587bf02 removed store dependency, use global Faro object 2022-12-14 13:53:09 +02:00
Joey Orlando
ed4be171f6
add make command to configure mobile app feature (#988)
Adds a make command, `enable-mobile-app-feature-flags`, which sets the
backend feature flag in `./dev/.env.dev`, and updates a record in the
`base_dynamicsetting` database table, which are needed to enable the
mobile app backend features.
2022-12-14 09:36:35 +01:00
Matias Bordese
6e8c39904b
Merge pull request #987 from grafana/dev
Merge dev to main
2022-12-13 10:36:51 -03:00
Rares Mardare
e0175fa2ef working faro changes 2022-12-13 15:28:30 +02:00
Matias Bordese
2b763f376e
Update CHANGELOG.md 2022-12-13 10:18:18 -03:00
Matias Bordese
684375a3eb
Update CHANGELOG.md 2022-12-13 10:16:59 -03:00
Joey Orlando
66b2ed5c64
add more logging to push notification celery task (#986) 2022-12-13 14:06:56 +01:00
Joey Orlando
5967d5af63
remove apns + fix django-push-notifications migrations (#984)
- removes APNS support
- changes the `django-push-notification` library from the `iskhakov`
fork to the [`grafana`
fork](https://github.com/grafana/django-push-notifications). This new
fork basically just patches an issue which affected the database
migrations of this django app (previously the library would not respect
the `USER_MODEL` setting when creating its tables and would instead
reference the `auth_user` table.. which we don't want)
- add `--no-cache` flag to the `make build` command

**NOTE**
A migration should be applied as follows:
```bash
# remove the four push_notifications tables, which have improper foreign key references
python manage.py migrate push_notifications zero

# recreate the tables with the proper foreign key references
python manage.py migrate
```
2022-12-13 13:00:59 +01:00
Matias Bordese
d2d73093a8
Merge pull request #980 from grafana/matiasb/fix-schedules-types-ui
Fix schedules types UI confusion
2022-12-12 16:54:18 -03:00
Matias Bordese
b8c77e4b30 Fix schedules types UI confusion 2022-12-12 16:30:24 -03:00
Matias Bordese
ad71fc3d61
Merge pull request #979 from grafana/matiasb/slack-endpoint-extra-logging
Add additional logging info for slack API event endpoint requests
2022-12-12 15:58:10 -03:00
Matias Bordese
9931105cc2 Add additional logging info for slack API event endpoint requests 2022-12-12 15:41:48 -03:00
Joey Orlando
b66dd1a30c
fix sync.. again (#978) 2022-12-12 18:48:26 +01:00
Joey Orlando
3625b75791
fix cloud sync related issue (#977)
this PR reverts [this
change](9e598385f4 (diff-a74aa8f07a8fdc31af66559390f0fc77b66692d43e6d3c5f94311ef7eed5efabL19-L55))
and removes the `str` casting that was done on the `orgId` field
returned from the Grafana COM API
2022-12-12 18:25:56 +01:00
Joey Orlando
8c0eba46b9
remove is_rbac_permissions_enabled logic from check_gcom_permission function (#976)
this field will be addressed in a subsequent sync call it is not
necessary here
2022-12-12 17:05:44 +01:00
Michael Derynck
52d6009c2a
Remove unused parameter from gcom call (#975)
# What this PR does
Remove unused parameter from gcom call

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2022-12-12 08:40:32 -07:00
Matias Bordese
314247a8ce
Merge pull request #974 from grafana/dev
Merge dev to main
2022-12-09 15:25:52 -03:00