Commit graph

2900 commits

Author SHA1 Message Date
github-actions[bot]
4b86e6f737
Update make docs procedure (#2866)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-08-23 09:49:42 +00:00
Ildar Iskhakov
6d75f7a213
Tune spectacular settings (#2865)
# 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-08-23 13:46:44 +08:00
Michael Derynck
7440a836da
Webhooks Public API (#2790)
# What this PR does
- Add public API for Webhooks CRUD, and GET webhook responses
- Add insight resource logs for internal and public webhook API calls
- Change public actions API to wrap Webhooks to maintain compatibility
with existing callers
 

## Which issue(s) this PR fixes

#2792 
#2793 

## 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-08-22 14:05:52 -06:00
Michael Derynck
0dfa882a06
Return API URL as part of status (#2791)
# What this PR does
- Provide API URL when returning status to inform plugin or mobile app
if it should be talking to a different backend in case of migration.
- Add MobileAppAuthTokenAuthentication to status endpoint so that the
app can use it.
- Split PluginAuthentication (Checks user) and BasePluginAuthentication
(Does not check user) and use BasePluginAuthentication in grafana-plugin
app when getting status.
- Removed PluginTokenVerified since it can be handled by
BasePluginAuthentication.
- Removed deprecated endpoints from grafana-plugin app. 

## 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-08-22 17:17:26 +00:00
Joey Orlando
3783aeab64
fix a few flaky e2e tests + allow running project locally via k8s/helm (#2751)
# What this PR does

- updates the GitHub Actions workflow to move the e2e tests into a
"[reusable
workflow](https://docs.github.com/en/actions/using-workflows/reusing-workflows#creating-a-reusable-workflow)"
which are run in two scenarios:
- all tests _except_ those annotated as `@expensive` are run against
`grafana/grafana:latest` on all feature branches
- all tests _including_ `@expensive` tests are run on weekdays @ 07h00
UTC, against a matrix of 6 grafana versions. Results of these builds
will be posted to `#irm-amixr-flux` Slack channel.
- local development will now be:
  ```bash
  make build-dev-images init-k8s start-k8s
  ```
- `build-dev-images` - builds the engine and UI docker images (only need
to run first time)
- `init-k8s` - creates a `kind` cluster and loads the two Docker images
onto the cluster nodes (only need to run first time)
- `start-k8s` - switches `kubectl` context to the created `kind`
cluster, and uses `helm` to deploy everything as defined in
`./dev/helm-local.yml` and `./dev/helm-local.dev.yml` (that latter file
is `.gitignored` and specific to how _you_ want your setup to look like.
Hot reloading works as before. This is the _start_ of #2381. (I've
marked these `make` commands as beta, because they've not yet been
thoroughly tested for local development).
- modifies the `helm` chart to add the concept of `oncall.devMode`,
`ui`, and ability to run oncall w/ sqlite
- `oncall.devMode` will essentially just add `volumes` and
`volumeMounts` to the various engine/migrate containers +
- `ui.enabled` + `ui.env` - create a ui container (which is needed for
hot reloading locally)
- `sqlite` - this was useful for the e2e test environments where Github
runner resources are scarce. Running `mariadb` eats up precious
resources, instead lets just use sqlite here
- fixes an issue that caused sporadic HTTP 502s from the grafana
plugin-proxy, which led to flaky tests. See [this
comment](https://github.com/grafana/oncall/pull/2751/files#diff-09040e8df192699b9c5742110ebbe8d9d5c3938cb156cc1cb99fa1c3fdee4fefR72-R77)
for more context + a link to a relevant Slack conversation. **tldr;**
there is a bug with the Grafana plugin proxy in Grafana >= v10.0.3.
Let's stop using the `latest`/`main` docker tags in our test and pin to
`10.0.2` for now
- ~~re-enables the e2e test which validates a phone number via SMS, and
asserts that we can receive an alert escalation via SMS (new Mailslurp
API Key has been added as a repo secret)~~ update: this is still blocked
by procurement, will be done in a future PR

## 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-08-22 19:03:29 +02:00
Joey Orlando
6fa2b0136c
Update CHANGELOG.md 2023-08-22 17:17:10 +02:00
Joey Orlando
dd338372ab
increase mobile app verification token TTL from 1 minute to 5 minutes (#2859)
# What this PR does

Trying to connect a mobile app emulator, following the instructions
[here](https://github.com/grafana/oncall-mobile-app#getting-started), to
a cloud stack is incredibly difficult given the 1 minute token TTL. You
need to retrieve the token from the HTTP response in your browser's
inspect panel, plug that token into the `make run` command and cross
your fingers that the emulator starts up in < 45 seconds before the
token expires.

This PR increases the verification token TTL from 1 minute to 5 minutes.

## 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-08-22 17:09:59 +02:00
Rares Mardare
b8a04b69aa
Users search fix (#2847)
# Changes

- Prevent duplicated call to /users on search
- Fix the issue described at #2842 where there was a concurrency issue
between the page load request and the search request

## Which issue(s) this PR fixes

Fix for https://github.com/grafana/oncall/issues/2842

## 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-08-22 13:30:42 +00:00
Joey Orlando
b9a9cd2659
add shift swap request demo video to public docs (#2858)
# What this PR does

Adds a demo video for Shift Swaps to the public documentation.

Closes #2832 

## 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-08-22 15:26:08 +02:00
Matias Bordese
cec5e6a284
Skip amazon_sns integration view test (#2849) 2023-08-21 17:06:31 -03:00
Vadim Stepanov
28eb671b59
Enable FEATURE_INBOUND_EMAIL_ENABLED by default (#2846)
# What this PR does

Sets `FEATURE_INBOUND_EMAIL_ENABLED` to `True` by default, so inbound
email integration setup is consistent with the
[docs](https://grafana.com/docs/oncall/latest/open-source/#inbound-email-setup).

## Which issue(s) this PR fixes

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

## 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-08-21 14:23:58 +00:00
Joey Orlando
df21be3a50
add more integration tests for integrations api (#2845) 2023-08-21 15:40:29 +02:00
Rares Mardare
9c3a344b03
Changed HTTP Endpoint to Email for inbound email integrations (#2840)
## Which issue(s) this PR fixes

#2816 

## 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-08-21 14:51:54 +03:00
Matias Bordese
8cdc56a3c3
Update CHANGELOG.md 2023-08-18 14:09:30 -03:00
Matias Bordese
90f971b021
Update CHANGELOG.md 2023-08-18 14:09:09 -03:00
Matias Bordese
ad00187968
Check possible split events in range when resolving schedule (#2828)
When an event is split because of a swap request, we were including the
original event if it was supposed to be in progress during the requested
time span.
2023-08-18 13:58:31 +00:00
Rares Mardare
10e8270b40
Added validation for existent contact point for grafana alerting (#2829)
# What this PR does

- Sort of fixed the stalling issue of the `counters` request - now just
the very first request to `counters` would be slow, everything else just
uses existing data we already fetched
- Added validation if contact point is already defined for the selected
datasource for alerting

## 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-08-18 16:51:54 +03:00
Yulya Artyukhina
8a946364fe
Set is_escalation_finished to True if alert group won't be escalated (#2827)
# What this PR does
Set is_escalation_finished to True if alert group won't be escalated due
to active maintenance, absence of escalation chain or being restricted
Fix logging

## 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)
2023-08-18 13:17:07 +00:00
Rares Mardare
3d396670c5
Prevent conversion of escalation start/end times to UTC (#2826)
# What this PR does

Adds a boolean `convertToUTC` to the `TimeRange` component. For this use
case on escalation chains since the user inputted fields are strings
they will not be further converted to UTC and instead left as it is,
which previously resulted in setting a wrong start/end combination.

## Which issue(s) this PR fixes

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

## 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-08-18 13:40:36 +03:00
Yulya Artyukhina
58a9a39efe
Improve getting/updating contact points for Grafana Alerting integration (#2742)
This PR improves Grafana Alerting integration:
- get alerting contact points "on fly" instead of keeping them in db
- add ability to connect more than one contact point
- add ability to create new contact point on create Grafana Alerting
integration
- show warnings in integration settings for non-active contact points
- remove creation alerting notification policies on create Grafana
Alerting integration

## 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: Rares Mardare <rares.mardare@grafana.com>
2023-08-18 12:12:29 +02:00
Ildar Iskhakov
3960e0d1dc
Remove UTC from step as it is using local time (#2824)
# What this PR does
Reverts this PR - https://github.com/grafana/oncall/pull/2729
Fixes https://github.com/grafana/support-escalations/issues/7164

## 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-08-18 07:07:32 +00:00
Ildar Iskhakov
3d46eea353
Set schema url for Swagger via env variable (#2823)
# 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-08-18 14:22:48 +08:00
Matias Bordese
c9cb4328e8
Add documentation about shift swap requests (#2719)
Related to https://github.com/grafana/oncall/issues/2589

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: Dieter Plaetinck <dieter@plaetinck.be>
2023-08-17 10:47:16 -03:00
Matias Bordese
179a1db471
Add alertmanager integration for heartbeat support (#2807)
Related to https://github.com/grafana/oncall/issues/2801 and
https://github.com/grafana/support-escalations/issues/7081.

---------

Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-08-17 13:22:37 +00:00
github-actions[bot]
22686669c9
Update make docs procedure (#2808)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-08-17 11:46:49 +00:00
Joey Orlando
a464fb3fd5
remove extraneous double quote 2023-08-17 11:19:05 +02:00
Joey Orlando
7ecfee9f8e
fix documentation CI job yaml formatting issue 2023-08-17 11:07:36 +02:00
Vadim Stepanov
9d153e7b19
v1.3.24 changelog (#2809) 2023-08-17 09:50:30 +01:00
Innokentii Konstantinov
a6be2ca4f1
Improve template to handle empty group labels (#2794)
– Fix error with missing "groupLabels" or "alertname"
– Support rendering alerts from migrated legacy alertmanagers
2023-08-17 07:52:05 +00:00
Matias Bordese
a459d8b031
Add shift swaps API docs (#2784)
API added by https://github.com/grafana/oncall/pull/2775
2023-08-16 14:16:37 -03:00
Vadim Stepanov
a2390a9c0c
Shift swap request push notification follow-ups (#2805)
# What this PR does

Adds SSR push notification follow-ups (similar to
https://github.com/grafana/oncall/pull/2798)

## Which issue(s) this PR fixes

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

## 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-08-16 16:01:17 +00:00
Vadim Stepanov
93b3521542
Shift swap request Slack follow-ups (#2798)
# What this PR does

Add Slack follow-up messages for shift swap requests:

<img width="377" alt="Screenshot 2023-08-15 at 20 19 49"
src="https://github.com/grafana/oncall/assets/20116910/14053838-c8f2-49f6-81cd-383d3fbc061c">

## Which issue(s) this PR fixes

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

## 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-08-16 08:38:07 +00:00
Ildar Iskhakov
ff2db43c49
Add openapi schema generation for internal api (#2771)
# 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-08-16 06:13:56 +00:00
Matias Bordese
0335ba2e08
Add schedule shift type validation on create/preview (#2789)
Fixes https://github.com/grafana/oncall-private/issues/2089
2023-08-15 14:24:11 +00:00
Vadim Stepanov
ae60f65a55
NOTIFY_SHIFT_SWAP_REQUESTS_INTERVAL 2023-08-14 14:28:28 +01:00
Matias Bordese
5e5eecc480
Add shift swaps endpoints to public API (#2775)
Related to https://github.com/grafana/oncall/issues/2678
2023-08-14 12:26:21 +00:00
Vadim Stepanov
a9bf4f5521
Don't send notifications about past SSRs when turning on info notifications (#2783)
# What this PR does

Fixes a bug when a user is receiving push notifications about past SSRs
after turning on the info notifications in the mobile app.

## 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-08-14 10:09:26 +00:00
Matias Bordese
3e703d354b
Ignore ical cancelled events when calculating shifts (#2776) 2023-08-11 15:14:15 +00:00
Yulya Artyukhina
c03cabfb47
Make field rbac_enabled readonly for organization endpoint (#2782)
# What this PR does

## Which issue(s) this PR fixes
Fixes issue with response 400 on update "Require resolution note"
setting

## 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-08-11 13:37:44 +00:00
Vadim Stepanov
407fd0356d
Remove django-ordered-model from requirements (#2779) 2023-08-11 10:57:22 +01:00
Vadim Stepanov
6f0921a3e4
Fix Slack acknowledgment reminders (#2769)
# What this PR does

Fixes a bug with Slack acknowledgment reminders not being sent (+ some
refactoring and unit tests).

## Which issue(s) this PR fixes

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

## 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-08-11 09:41:56 +00:00
Yulya Artyukhina
5fcff31e4a
Update CHANGELOG.md 2023-08-10 10:13:23 +02:00
Rares Mardare
e87bb912ae
Use UserSettingsWrite instead of OtherSettingsWrite for phone tab (#2772)
# What this PR does

Sets the correct permission when accessing Phone Verification screen
(Cloud/OSS)

## Which issue(s) this PR fixes

Fix for https://github.com/grafana/oncall/issues/2761

## 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-08-10 09:35:32 +03:00
Ildar Iskhakov
fd19dd422a
Use periodic task for heartbeats (#2723)
# 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>
Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
2023-08-10 02:25:00 +00:00
Vadim Stepanov
638c9a3142
Add instruction on removing nullable fields from Django models (#2659)
Adds an instruction on removing nullable fields without downtime.
2023-08-08 12:46:18 +00:00
Matias Bordese
a1a9e0c33c
Handle ical schedule import with duplicated event UIDs (#2760) 2023-08-07 13:11:46 +00:00
Vadim Stepanov
424b2b80f8
Add backend support for push notification sounds with custom extensions (#2759)
# What this PR does

Instead of always adding `.aiff` or `.mp3` at the end of notification
sound names depending on the platform (iOS vs Android), add them only if
no extension is present already. This should make it possible to use
sounds with custom extensions.

## 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-08-07 09:55:17 +00:00
Matias Bordese
bb9f647608
Filter out untaken swaps from final schedule and shift notifications (#2748)
Avoid creating (or notifying) about potential event splits resulting
from untaken swap requests.
2023-08-04 17:43:54 +00:00
Vadim Stepanov
bc78fc29e5
Revert "Enable push notifications for SSR beneficiary for testing purposes" (#2757)
Reverts grafana/oncall#2752
2023-08-04 16:13:03 +01:00
Maxim Mordasov
8412282569
merge final schedule in as less lines as possible (#2649)
# What this PR does

Merge final schedule in less rows

## Which issue(s) this PR fixes

[Final schedule shifts should lay in one
line](https://github.com/grafana/oncall/issues/1665)

## 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-08-04 14:46:54 +00:00