Commit graph

3800 commits

Author SHA1 Message Date
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
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
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
Matias Bordese
63729c162a
Update e2e tests GH action to build engine image from branch (#3877)
Use image built from the branch when setting up engine and celery
deployment for e2e tests.
Fixes https://github.com/grafana/oncall/issues/3795.
2024-02-19 12:38:06 +00:00
Yulya Artyukhina
82d43c6887
Fix OnCall Insights dashboard version (#3917)
# What this PR does

## 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-19 11:59:38 +00:00
github-actions[bot]
360d49b616
Update make docs procedure (#3914)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-02-19 10:56:27 +00:00
Dominik Broj
23bd517213
fix issues related to alert groups table (#3905)
# What this PR does
- get rid of duplicated GET requests during polling
- ignore results of older requests
- fix Refresh btn that doesn't disappear
- show correct data in alert groups table
- show placeholder instead of table when filters are updated

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

## 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-19 09:23:04 +00:00
Matias Bordese
4ace9780c5
Update user details internal API perms (#3900)
Related to https://github.com/grafana/oncall/issues/1820
Editor and Viewer roles have the user-settings:read permission, which
allows them to list users but with some of the data hidden. It makes
sense to allow the same thing for the detail endpoint, keeping the
viewable data restriction (fixing the referenced issue too).
2024-02-16 16:48:24 +00:00
Rares Mardare
4fcbd118b2
Fixed schedule rotations form (#3904)
# What this PR does

- Improves the calculation of dragging area limits
- Fixes some minor margin/padding inconsistencies for which horizontal
scrollbar was appended

## Which issue(s) this PR fixes

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

## 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)
2024-02-16 13:21:27 +00:00
Yulya Artyukhina
ce217e5415
Update OnCall Insights dashboard (#3875)
# What this PR does
- Remove panels with absolute alert groups count
- Update queries
- Replace "Team" and "Notifications" panels
## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/3763
## 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-16 13:18:00 +00:00
Michael Derynck
617146f5ea
When team is removed do not delete webhooks belonging to it (#3873)
# What this PR does
When a team is deleted webhooks belonging to that team will be marked as
having no team instead of the webhook being deleted.

## 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-15 17:53:55 +00:00
Dominik Broj
caef9e2eb0
Improve insights (#3896)
# What this PR does
Redesign panels, update queries, handle no data scenario better

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


## 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-15 12:52:04 +00:00
Yulya Artyukhina
445ac74088
Quick fix for labels error on labels cache update (#3899)
# What this PR does
Check response from labels repo before updating labels cache and update
cache only if there are no errors in the response.
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/2532
## 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-15 08:55:43 +00:00
Ben Sully
389d82f392
Plugin: remove duplicate Declare Incident button (#3542)
This button is now being added into the 'Actions' menu by the
'ExtensionLinkDropdown' component, so we don't need to add
another one to the page.

See the duplicated button in this screenshot:

![image](https://github.com/grafana/oncall/assets/5464991/db4bba46-c77f-4c58-aacb-e9b6fd67c2a4)

Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
2024-02-15 08:35:42 +00:00
Matias Bordese
adaab1c6ad
Check for permissions on Slack escalate command (#3891)
Related to https://github.com/grafana/oncall/issues/3109

Fixes issue from https://github.com/grafana/oncall/pull/3881 (problem
was that there is no organization set in the Slack request, making it
impossible to check for user permissions; check permission once an
organization is set in the form instead).
2024-02-14 19:02:09 +00:00
Michael Derynck
6ed1cf8385
Fix edit default team by admin (#3885)
# What this PR does
Fixes issue where when an admin edits the default team of another user
it would change the admin's default team instead of the selected user.

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

## 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-14 14:17:01 +00:00
Michael Derynck
07916d0c71
Don't check chatops gateway link in OSS deployment (#3893)
# What this PR does
Prevents checking ability to connect instance with chatops gateway when
running in OSS deployment.

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

## 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-14 13:15:04 +00:00
github-actions[bot]
3839922b54
Update make docs procedure (#3887)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-02-13 11:08:33 +00:00
Rares Mardare
c6075b9048
Renamed index.ts files to more appropiate names + converted default exports to named exports (#3866)
# What this PR does

## Which issue(s) this PR fixes

#3636
2024-02-13 08:53:18 +00:00