Commit graph

3833 commits

Author SHA1 Message Date
Michael Derynck
cd55301a76
Update CHANGELOG.md 2024-02-28 10:53:20 -07:00
Michael Derynck
f6b6b2c29a
Update CHANGELOG.md 2024-02-28 10:38:11 -07:00
Dominik Broj
7794246efb
Brojd/connect integration to snow (#3968)
# What this PR does


https://github.com/grafana/oncall/assets/12073649/0dad62c2-d722-4f5b-aee6-549dc97902cd


## 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)
2024-02-28 12:19:18 +00:00
Dominik Broj
f886fee93c
Fetch selected value of notify schedule in escalation policy (#3969)
# What this PR does

- Fetch selected schedule on mount which is not done as soon as schedule
is not on the first page
- Add missing observer decorator
- Fix incorrect HTTP calls when creating integrations
https://raintank-corp.slack.com/archives/C04JCU51NF8/p1708703429829919

## Which issue(s) this PR fixes

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

## 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)
2024-02-28 11:27:57 +00:00
Dominik Broj
bec2589b43
Deploy PR e2e test report to GH Pages (#3952)
# What this PR does
- publish Playwright HTML report to GH Pages
- turn off video recordings


## 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)
2024-02-28 06:13:26 +00:00
Michael Derynck
6148bbbd62
Fix path for plugin release publish (#3967)
# What this PR does
Fixes the path of the plugin file to public. Leftover from last round of
build changes

## Which issue(s) this PR fixes

## Checklist

- [ ] 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)
2024-02-28 00:41:14 +00:00
Joey Orlando
8f105bc3b7
Merge branch 'main' into dev 2024-02-27 20:17:36 +00:00
Joey Orlando
29f83c0afb
Update CHANGELOG.md 2024-02-27 15:15:03 -05:00
Joey Orlando
9d8de8542f
fix information architecture for mobile app docs (#3963)
# What this PR does

**Before**
Notice
["Schedules"](https://grafana.com/docs/oncall/latest/mobile-app/schedules/)
and ["On-call status and
shifts"](https://grafana.com/docs/oncall/latest/mobile-app/on-call-status-and-shifts/)
pages, they should not be at the top level like this:
<img width="304" alt="Screenshot 2024-02-27 at 12 38 47"
src="https://github.com/grafana/oncall/assets/9406895/c9ae7341-0889-4621-89af-2a2c995db4d6">

**After**
<img width="286" alt="Screenshot 2024-02-27 at 12 47 00"
src="https://github.com/grafana/oncall/assets/9406895/c1316d33-4672-4fad-b748-4cc55c0f6dc4">


## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [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)
2024-02-27 15:04:54 -05:00
Michael Derynck
2c7ebcf87c
Add task to delete empty deleted integrations from the database (#3941)
# What this PR does
Add task which will cleanup deleted integrations from the database if
they don't have any alert groups. This is to help address an issue where
queries are slowing down due to having a large numbers of ids that do
not contribute to the result.

This will be connected as part of sync organization task once it tests
out ok.

## 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)
2024-02-27 17:34:41 +00:00
Joey Orlando
9c0bc26680
Fix daily e2e tests GitHub Actions cron job (#3923)
# What this PR does

- fixes our e2e tests to work on all tested versions
- updates Grafana versions that we run the daily e2e tests against (bump
`10.0.2` to `10.0.11` + add `10.1.7` tags)
- updates the Slack status message format + change channel from
#irm-amixr-flux to #gops-oncall-dev

<img width="1479" alt="Screenshot 2024-02-24 at 08 30 06"
src="https://github.com/grafana/oncall/assets/9406895/f5cb91f8-12ce-4978-9c37-c72ee8a01e4b">


## NOTE
It looks like we have some e2e tests that fail under the following
circumstances:
- on Firefox or WebKit
- on Grafana 10.2 and 10.3 (once we fix these, we should [update our e2e
tests that run on all PR
builds](https://github.com/grafana/oncall/blob/dev/.github/workflows/linting-and-tests.yml#L325)
to run against `10.3.3` which is the current latest major version
available)

## 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)
2024-02-27 09:21:53 -05:00
Dominik Broj
f8e4360c16
minor UI tweaks for webhooks (#3961)
# What this PR does
minor UI tweaks for webhooks

## 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)
2024-02-27 13:21:41 +00:00
Vadim Stepanov
7549a688b0
Integration webhooks API (#3954)
# What this PR does

Adds internal API endpoints for
`alert_receive_channels/<id>/webhooks/<webhook_id>`.

## Which issue(s) this PR fixes

Related to https://github.com/grafana/oncall-private/issues/2541

## 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)
2024-02-27 08:12:21 +00:00
Dominik Broj
c2ffd28675
Snow outgoing webhooks tab (#3918)
# What this PR does
- implement visual part of ServiceNow Outgoing Tab
- reuse created components on outgoing webhooks page
- make yarn:lint:fix to remove unused imports
- fix live reload during development
- remove unused babel dependencies

## Which issue(s) this PR fixes
- https://github.com/grafana/oncall/issues/3408
- partially https://github.com/grafana/oncall-private/issues/2462

## 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)
2024-02-26 13:52:26 +00:00
Matias Bordese
19b5c6553c
Add is_from_connected_integration field to webhook model (#3951)
Related to https://github.com/grafana/oncall-private/issues/2541.
2024-02-23 15:57:57 +00:00
Matias Bordese
d2917373b7
Migrate webhooks integration_filter to use a m2m field instead (#3946)
Related to https://github.com/grafana/oncall-private/issues/2541
2024-02-23 11:55:44 +00:00
Matias Bordese
1a8e4fef40
Update OrderedModel.swap to retry on IntegrityError (#3940)
Related to https://github.com/grafana/oncall-private/issues/2386.

Issue seems related to [multiple concurrent Terraform-triggered
updates](https://ops.grafana-ops.net/explore?schemaVersion=1&panes=%7B%22j0s%22:%7B%22datasource%22:%22000000193%22,%22queries%22:%5B%7B%22refId%22:%22B%22,%22expr%22:%22%7Bcluster%3D%5C%22prod-eu-west-0%5C%22,%20namespace%3D%5C%22amixr-prod%5C%22%7D%20%7C%3D%20%5C%22logger%3Dinsight_logger%20tenant_id%3D735393%5C%22%20%7C%3D%20%5C%22resource_type%3Droute%5C%22%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22000000193%22%7D,%22editorMode%22:%22code%22%7D%5D,%22range%22:%7B%22from%22:%221707813893526%22,%22to%22:%221707815856774%22%7D%7D%7D&orgId=1
) changing the route order to zero (and eventually succeeding)

Sample test run with the failing error:
```
========================================== short test summary info ===========================================
FAILED common/tests/test_ordered_model.py::test_ordered_model_swap_all_to_zero - assert not [DoesNotExist(), IntegrityError(1062, "Duplicate entry 'test-0' for key 'base_testorderedmodel...
======================================= 1 failed, 5 warnings in 34.39s =======================================
make: *** [Makefile:283: run-backend-test] Error 1
```
2024-02-22 20:51:05 +00:00
Joey Orlando
182ee2fad7
fix e2e tests (#3950)
# Which issue(s) this PR fixes

Fix failing e2e tests on `dev`

## 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: Dominik <dominik.broj@grafana.com>
2024-02-22 19:41:21 +00:00
Joey Orlando
666fc76cef
fix process is not defined UI issue (#3948)
# Which issue(s) this PR fixes

Based on [this change
here](ad58d0ce28 (diff-2e7af29d1cb367637d55778cb13b7d3c6b4d520a5fda37ff891bce40a1552710R39-R46)).
Should fix this issue 👇:
![Screenshot 2024-02-22 at 14 18
57](https://github.com/grafana/oncall/assets/9406895/a54c1b49-f37e-47f8-85e1-3e8f1bdd5944)


## 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: Dominik Broj <dominik.broj@grafana.com>
2024-02-22 16:56:34 +01:00
Vadim Stepanov
289c0c736b
Update CHANGELOG.md (#3949) 2024-02-22 15:05:41 +00:00
Vadim Stepanov
2b5554c079
Remove explicit request size limits (#3878)
# What this PR does

Remove explicit request size limits both for uwsgi & Django. After this
change, the effective request size limit will be 2.5MB as the default
Django value for
[DATA_UPLOAD_MAX_MEMORY_SIZE](https://docs.djangoproject.com/en/4.2/ref/settings/#data-upload-max-memory-size).

## 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)
2024-02-22 15:00:33 +00:00
Vadim Stepanov
5b37a7d2ef
fix yarn.lock drift (#3938)
committing `yarn.lock` changes that I get after running `make init`
2024-02-22 14:55:50 +00:00
Dominik Broj
8fe2b22f5d
Brojd/plugin fixes (#3947)
## Which issue(s) this PR fixes
- use correct webpack merge strategy
- 
## 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)
2024-02-22 15:17:50 +01:00
Dominik Broj
8ccd7c26f0
Brojd/plugin fixes (#3943)
# What this PR does

## 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)
2024-02-22 14:37:03 +01:00
Michael Derynck
b7d03489ea
Add status debug to oss plugin publish (#3934)
# What this PR does
Step failure is intermittent add debugging to see what status code we
are getting. If 5xx we can use --retry. If 4xx we will need a different
approach.

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

## Checklist

- [ ] 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)
2024-02-21 13:55:44 -07:00
Michael Derynck
40e6c635dc
Fix for update to axios that changed how paramsSerializer is setup (#3939)
# What this PR does
Fixes the issue that after axios was updated the paramsSerializer was
not being set correctly. I am not sure if there are other changes we
need to make after updating. No changelog as the version with the issue
has not been released.

## Which issue(s) this PR fixes

## Checklist

- [ ] 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)
2024-02-21 11:52:15 -07:00
Vadim Stepanov
c8bb954041
Fix template preview (#3937)
# What this PR does

Fixes template preview URL

## 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)
2024-02-21 16:30:15 +00:00
Maxim Mordasov
828b0a3f4e
Migrate from grafana-toolkit to grafana plugin tools (#3837)
# What this PR does

Migrate from grafana-toolkit to grafana plugin tools

## Which issue(s) this PR fixes

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

## 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: Michael Derynck <michael.derynck@grafana.com>
Co-authored-by: Dominik <dominik.broj@grafana.com>
2024-02-21 07:49:10 -07:00
Yulya Artyukhina
d0ee58cb68
Add revision param to dashboard settings (#3928)
# What this PR does
Fixes OnCall Insights dashboard auto-update
## Which issue(s) this PR fixes

## Checklist

- [ ] 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)
2024-02-21 11:57:55 +00:00
afreyermuth98
2d6d5a8ac0
🐛 Allow external redis/rabbitmq secret creation even if the broke… (#3903)
# What this PR does
This PR allows the chart to create the secret of your redis / rabbitmq
even if it's not the broker.
Actually, this is blocking if we want to have a redis as cache and a
rabbitmq as broker for example

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

## 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>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2024-02-21 06:47:07 -05:00
Matias Bordese
0b73758a8c
Fix .drone grepping for pre-commit (#3933)
Now `requirements-dev.txt` lists deps introduced by `pre-commit`, and so
the `grep` command was returning multiple lines.

Fixes builds [here](https://drone.grafana.net/grafana/oncall/3591/1/6).
2024-02-20 18:59:49 +00:00
Joey Orlando
d64f424559
Merge pull request #3932 from grafana/helm-release/1.3.106
Merge: Release oncall Helm chart 1.3.106
2024-02-20 12:58:12 -05:00
Matias Bordese
c1b279aab8
Use pip-tools to handle Python deps (#3892)
[pip-tools](https://github.com/jazzband/pip-tools) helps making builds
deterministic, controlling deps (and indirect deps) upgrades (and
versions consistency) avoiding unexpected (and potentially breaking)
changes.

We keep our direct deps in `requirements.in` from which we generate the
`requirements.txt` (where *all* deps are pinned). We also constrain dev
(and enterprise) deps based on base requirements.

Check how to [update
deps](https://github.com/jazzband/pip-tools?tab=readme-ov-file#updating-requirements).
2024-02-20 17:44:15 +00:00
GitHub Actions
9dfb6a5a60 Release oncall Helm chart 1.3.106 2024-02-20 17:33:28 +00:00
Matias Bordese
a8d25d43b2
Merge pull request #3931 from grafana/dev
v1.3.106
2024-02-20 14:30:32 -03:00
Salvatore Giordano
0599c8f918
update mobile app docs (#3876)
# What this PR does

## Which issue(s) this PR fixes

fixes https://github.com/grafana/oncall-mobile-app/issues/417

## 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)
2024-02-20 12:18:07 -05:00
Matias Bordese
9542a55dd6
Update CHANGELOG.md 2024-02-20 14:13:26 -03:00
Karim Darwish
2a46e4ff84
Add parse_json template function (#3929) 2024-02-20 10:29:03 -05:00
Matias Bordese
0271f3c32d
Expose status change trigger type when setting up a webhook (#3930)
This was missing in https://github.com/grafana/oncall/pull/3920
2024-02-20 15:00:45 +00:00
Matias Bordese
d6467e9cb7
Add escalation step to notify all members from a team (#3908)
Based on https://github.com/grafana/oncall/pull/3477

---------

Co-authored-by: xssfox <xss@sprocketfox.io>
2024-02-20 10:02:23 -03:00
Dominik Broj
6da36b3c0b
Use autogenerated types for alert_receive_channels (#3851)
# What this PR does

- autogenerate new types exposed by backend, remove custom types that
duplicate autogenerated ones
- use autogenerated types for alert receive channels
- in alert_receive_channel model:
  - use autogenerate http client (`onCallApi`) for http requests
- extract methods that don't update state into
alert_receive_channel.helpers.ts and make them pure (they accept
AlertReceiveChannelStore as param) to avoid inconsistency and issues
with `this` binding
  - use `makeAutoObservable`
  - remove unneeded decorators
- rename update* methods to fetch* whenever such methods retrieve data
from backend with GET requests
- in other models use `@action.bound` for actions and arrow functions
for store methods that are not actions (in subsequent PRs we will apply
the same changes as in alert_receive_channel, this is just for now until
we do it)
- refactor http-client so that it shows global notification on http
errors automatically and provide the possibility to opt-out from it when
making a call
- improve type-safety of `GSelect`
- fix bug related to attaching alert group
(https://raintank-corp.slack.com/archives/C04JCU51NF8/p1707476487580579)

## Which issue(s) this PR fixes

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

## 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: Vadim Stepanov <vadimkerr@gmail.com>
2024-02-20 12:09:22 +00:00
Joey Orlando
8f02d8513c
remove disableByPaywall prop on WithPermissionControlTooltip component (#3922) 2024-02-20 05:23:48 -05:00
Sean Wood
61a657b0cd
Allow setting email app to use SSL instead of TLS (#3911)
# What this PR does
Adds flexibility of the method of encryption in the SMTP email app. Some
email servers are configured to use port 465 (intrinsic TLS) which
requires `EMAIL_USE_SSL` instead of `EMAIL_USE_TLS`.

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

## 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>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
2024-02-20 03:38:09 -05:00
Joey Orlando
591ce35f92
Update README.md 2024-02-20 03:03:27 -05:00
Joey Orlando
124ba406ef
Update CHANGELOG.md 2024-02-20 03:02:33 -05:00
Innokentii Konstantinov
acd0c44c33
Support prescribed labels (#3848)
# What this PR does

**Cleanup label typing:**
1. LabelParam -> two separate types LabekKey and LabelValue 
2. LabelData -> renamed to LabelPair. 
3. LabelKeyData -> renamed to LabelOption
Data is not giving any info about what this type represents. 
4. Remove LabelsData and LabelsKeysData types. They are just list of
types listed above and with new naming it feels obsolete.
5. ValueData removed. LabelPair is used instead.
6. Rework AlertGroupCustomLabel to use LabelKey type for key to make
type system more consistent. Name model type AlertGroupCustomLabel**DB**
and api type AlertGroupCustomLabel**API** to clearly distinguish them.

**Split update_labels_cache into two tasks** update_label_option_cache
and update_label_pairs_cache.
Original task was expecting array of LabelsData (now it's LabelPair) OR
one LabelKeyData ( now it's LabelOption). I believe having one function
with two sp different argument types makes it more complicated for
understanding.


**Make OnCall backend support prescribed labels**. OnCall will sync and
store "prescribed" field for key and values, so Label dropdown able to
disable editing for certain labels.

## Which issue(s) this PR fixes

## Checklist

- [x] 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: Maxim Mordasov <maxim.mordasov@grafana.com>
Co-authored-by: Yulya Artyukhina <Ferril.darkdiver@gmail.com>
2024-02-20 14:42:51 +08:00
Ildar Iskhakov
fde2214949
Add architecture diagram to the dev docs (#3305)
# 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)

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2024-02-19 12:25:28 -05:00
Matias Bordese
0711484a50
Add status change trigger type to webhooks (#3920)
Related to https://github.com/grafana/oncall/issues/3395

This should help with upcoming planned integrations work.
2024-02-19 14:12:56 -03:00
Joey Orlando
ec9d13aa91
add labels to routing templating cheatsheet (#3860) 2024-02-19 10:47:12 -05:00
Matias Bordese
12f55ac936
Fix user hidden fields tests (#3919) 2024-02-19 14:27:13 +00:00