Commit graph

1846 commits

Author SHA1 Message Date
Kristian Bremberg
b6d65ebb66
Chore: add integrity hash to templates (#1473)
# What this PR does

Adds integrity hash for scripts loaded from CDN's.
2023-03-07 11:17:07 +00:00
Vadim Stepanov
323597670c
Merge pull request #1439 from grafana/helm-release/1.1.32
Merge: Release oncall Helm chart 1.1.32
2023-03-01 17:37:00 +00:00
GitHub Actions
b6cf19ede1 Release oncall Helm chart 1.1.32 2023-03-01 17:05:50 +00:00
Vadim Stepanov
5f0ba6b445
Merge pull request #1438 from grafana/dev
Dev to main
2023-03-01 17:02:21 +00:00
Vadim Stepanov
5f4a791abb
Update CHANGELOG.md 2023-03-01 17:00:33 +00:00
Vadim Stepanov
8170ca491c
Fix pagination issue when searching schedules (#1437)
# What this PR does
Fixes a bug with inconsistent schedule count when searching by name.

Example (2 schedules returned, but count is incorrectly set to 12):

![image](https://user-images.githubusercontent.com/20116910/222198919-2f2124bc-52b2-4e5f-a949-79bbf89a5a26.png)

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
2023-03-01 16:28:40 +00:00
Rares Mardare
1b0643fef2
Schedule Filters tweaks (#1406)
# What this PR does

Improvements over schedule filters

## Which issue(s) this PR fixes

#941 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-01 13:30:01 +00:00
Vadim Stepanov
4c31ede558
Add "used in escalation" filter for schedules internal API (#1425)
# What this PR does
Adds a `used` filter on schedules endpoint for internal API.

Usage:
- `?used=true` returns schedules that are referenced by at least one
escalation policy
- `?used=false` returns schedules that are NOT referenced
- `?used=null` or not providing the query param at all will return all
schedules
## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1423

## Checklist

- [x] Tests updated
2023-03-01 10:09:07 +00:00
Innokentii Konstantinov
7c4b1565e5
Merge pull request #1430 from grafana/helm-release/1.1.31
Merge: Release oncall Helm chart 1.1.31
2023-03-01 17:45:11 +08:00
Yulia Shanyrova
173a02c7d3
1387 source link redesign (#1419)
# What this PR does
Source link is not related with Integration, so it is just a label now
Icon of integration moved to Integration label-link
Incident word was removed from "1 attached Incidents"

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1387
2023-03-01 09:23:25 +00:00
GitHub Actions
f80002ec38 Release oncall Helm chart 1.1.31 2023-03-01 09:17:50 +00:00
Innokentii Konstantinov
060aca1cb0
Merge pull request #1429 from grafana/dev
Release v1.1.31
2023-03-01 17:16:42 +08:00
Innokentii Konstantinov
7f706c5a26 Update CHANGELOG.md 2023-03-01 17:05:25 +08:00
Innokentii Konstantinov
6a5e75e083
Fix of templates api behaviour for public and private api (#1408)
# What this PR does

This PR fixes templates behaviour for public and private api. It fix
"reset to default" for templates from messaging backends and some minor
bugs. Also added acknowledge signal and source link templates

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-03-01 16:32:15 +08:00
Innokentii Konstantinov
a5ed9c414b
Merge pull request #1427 from grafana/dev
Release v1.1.30
2023-03-01 15:13:47 +08:00
Innokentii Konstantinov
d1d8a9ae32 Update CHANGELOG.md 2023-03-01 14:56:20 +08:00
Vadim Stepanov
a25fd429da
Show 100 latest alerts on alert group page (#1417)
# What this PR does
Make internal API return 100 latest alerts for alert group.

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

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated
2023-02-28 14:12:56 +00:00
Maxim Mordasov
bee9943706
#415 #1292 #940 #1293 #1002 bug fixes (#1356)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-27 16:27:11 +00:00
Rares Mardare
c0873007b0
Fix NPE on ScheduleForm (#1410)
# What this PR does

Fixes NPE on `<ScheduleForm />` when the schedule has not been loaded.
2023-02-27 15:21:28 +00:00
Matias Bordese
04c42e2796
Matiasb/fix task refresh ical when empty value (#1401)
This should fix task error as seen in logs, trying to parse an empty
string as ical value:
```
Task apps.schedules.tasks.refresh_ical_files.refresh_ical_file[] raised unexpected: ValueError("Found no components where exactly one is required: ''")
```
2023-02-24 21:16:09 +00:00
Matias Bordese
721ab9fbb9
Use UTC instead of Etc/UTC when passing tz to dateutil rrule (#1414)
Fixes https://github.com/grafana/oncall-private/issues/1648
2023-02-24 20:54:20 +00:00
Michael Derynck
b3659872a7
Get reCAPTCHA site key from backend env (#1400)
# What this PR does
Move reCAPTCHA site key to backend environment for easier management to
support multiple environments.

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-24 15:53:35 +00:00
Joey Orlando
71f81f844a
fixed UI permission related bug where Editors could not export their user iCal link (#1412)
# Which issue(s) this PR fixes

https://www.loom.com/share/c6da9a51786a483999b19eba94c7e2f5

## Checklist

- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-02-24 16:27:11 +01:00
Vadim Stepanov
10cf1055b1
PD migrator: create shifts in UTC timezone (#1411)
# What this PR does
Make PagerDuty migrator create shifts in UTC timezone when migrating web
schedules.

## Checklist

- [x] Tests updated
2023-02-24 15:05:10 +00:00
Matias Bordese
98b3b918a5
Add schedule pagination to plugin API (#1309)
Related to #1289

---------

Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-02-24 14:59:03 +00:00
Michael Derynck
49946e6a4e
Change Organization Deleted/Moved Precedence (#1402)
# What this PR does
When an organization is migrated to a different cluster it has it's
`migration_destination_slug` set for redirection purposes but it also
needs to be deleted so scheduled tasks for it do not run in the old
cluster. By changing the order so moved has precedence over deleted API
calls will be correctly redirected for moved organizations while the
organization is still considered deleted to suppress tasks that are no
longer needed in the old cluster.

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-24 11:45:21 +00:00
Rares Mardare
12a04db2ed
Append grafana styles to head instead of referencing the wrong path (#1348)
# What this PR does

Fixed #672 so that we import the css as a whole and add it as a `style`
element, instead of relying on path location which can differ if url is
rewritten.

## Which issue(s) this PR fixes

#672 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-24 11:14:45 +00:00
Vadim Stepanov
e2392988c8
PD migrator: handle deactivated users in PD when migrating schedules (#1407)
# What this PR does
Handle deactivated users in PD when migrating schedules using PD
migrator.

## Checklist

- [x] Tests updated
2023-02-24 11:12:10 +00:00
Yulia Shanyrova
52ea445f6c
tabs added to url for chatops (#804)
**What this PR does**:

**Which issue(s) this PR fixes**:

**Checklist**
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-24 10:33:32 +00:00
Matias Bordese
b6ce63e2a9
Fix/rewrite flaky schedule tests (#1397) 2023-02-23 18:20:51 +00:00
github-actions[bot]
284247719d
Merge: Release oncall Helm chart 1.1.29 (#1395)
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.1.29,
appVersion: v1.1.29) 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-02-23 15:30:24 +01:00
Vadim Stepanov
41e68a6db6
Merge pull request #1394 from grafana/dev
Release v1.1.29
2023-02-23 14:00:11 +00:00
Vadim Stepanov
82694bf7c5
Update CHANGELOG.md 2023-02-23 13:55:22 +00:00
Joey Orlando
b61f2ce41f
patch minor sync issue when HTTP 302 is received from Grafana API instance (#1393)
# What this PR does

this PR refactors the `sync_organization` and
`GrafanaAPIClient.is_rbac_enabled_for_organization` methods to check the
connected response bool rather than explicit check on HTTP 200. This
handles the legitimate case where the Grafana instance may return an
HTTP 302 (redirect) rather than an HTTP 200.

## Which issue(s) this PR fixes

See
[this](https://grafana.slack.com/archives/C02LSUUSE2G/p1677136582890269)
Slack thread in the community channel for more context

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated
2023-02-23 13:23:57 +00:00
Vadim Stepanov
a2eed312f9
PD migrator: migrate on-call shifts using public API (#1317)
Allow PD migrator tool to migrate on-call shifts when migrating
schedules (currently it migrates schedules using PD ICal file):
https://github.com/grafana/oncall/issues/1283.

This PR will allow to select the mode of schedule migration via
`SCHEDULE_MIGRATION_MODE_WEB` env variable (`ical` or `web`). Due to
differences in the scheduling systems of PD and OnCall, it's not always
possible to migrate shifts automatically (migration plan will show any
schedules and layers that can't be migrated).

PD rotations that will be possible to migrate:
- Any rotation without restrictions ("restriction" is a PD term for
describing active periods for rotation)
- Daily rotations with daily restrictions
- Weekly rotations with weekly restrictions
- Some weekly rotations with daily restrictions
- Some daily rotations with weekly restrictions

There will be a separate PR to update the
[instruction](https://github.com/grafana/oncall/tree/dev/tools/pagerduty-migrator#readme)
since this one is pretty huge already.
2023-02-23 11:34:03 +00:00
Yulya Artyukhina
53af4783de
Fix the cause of retry of notify_all and notify_group tasks (#1376)
Fix the cause of retry of notify_all and notify_group tasks that was
related to an incorrect step order.
2023-02-23 09:28:13 +00:00
Innokentii Konstantinov
0fad41bfe9
Merge pull request #1390 from grafana/helm-release/1.1.28
Merge: Release oncall Helm chart 1.1.28
2023-02-23 09:09:06 +01:00
GitHub Actions
6ab21d8181 Release oncall Helm chart 1.1.28 2023-02-23 07:57:16 +00:00
Innokentii Konstantinov
72885a30c5
Merge pull request #1389 from grafana/dev
Release v1.1.28
2023-02-23 08:56:20 +01:00
Innokentii Konstantinov
ba314077a4 Update CHANGELOG.md 2023-02-23 15:47:43 +08:00
Innokentii Konstantinov
26a2bd9c91
Refactor maintenance (#1340)
# What this PR does
This PR simplifies code of maintenance mode.
1. Perform distribution/escalation maintenance checks in send_signal...
tasks.
2. Use usual alert distribution flow for the maintenance incident.
3. Decouple maintenance mode from slack (all, except
**notify_about_maintenance_action** methods, I don't want to make this
PR too big)

As a bonus from these changes, maintenance mode now mute alert group
delivery in all chatops integrations, not only in slack. (Before,
incidents happened while maintenance were posted to telegram and msteams
anyway)

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-23 07:13:03 +00:00
Yulia Shanyrova
d99f6920c5
Handling throttling error on frontend when verifying phone number (#1375)
# What this PR does
If 429 error code received from backend we show notification with Error
"Too many requests. Please try in {min} minutes"

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

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-22 16:29:54 +00:00
Joey Orlando
ec9a4b2575
don't run changelog/public-docs CI checks on merge_group Github events (#1388)
They don't appear to work properly there:
![Screenshot 2023-02-22 at 16 00
39](https://user-images.githubusercontent.com/9406895/220663834-82b125fa-0a9e-4aff-9399-62563a312842.png)
![Screenshot 2023-02-22 at 16 00
53](https://user-images.githubusercontent.com/9406895/220663841-1af2d0a7-e910-4d84-94a8-0cdec4f0353d.png)
2023-02-22 16:18:25 +01:00
Joey Orlando
4c231e4a01
trigger github actions jobs on merge_group event (#1346)
Get the repo ready to support the [pull request merge
queue](https://github.blog/changelog/2021-10-27-pull-request-merge-queue-limited-beta/):
<img width="777" alt="Screenshot 2023-02-20 at 14 48 44"
src="https://user-images.githubusercontent.com/9406895/220125516-4b2f7245-fb6d-4517-933e-d9cf86308661.png">
2023-02-22 15:05:48 +01:00
Joey Orlando
fb33f68990
Merge pull request #1384 from grafana/helm-release/1.1.27
Merge: Release oncall Helm chart 1.1.27
2023-02-22 08:29:02 +01:00
GitHub Actions
85de04e776 Release oncall Helm chart 1.1.27 2023-02-22 06:55:56 +00:00
Joey Orlando
0fa5bca246
Merge pull request #1383 from grafana/dev
dev -> main
2023-02-22 07:48:47 +01:00
Joey Orlando
b3ad70abb3
update CHANGELOG 2023-02-22 07:42:17 +01:00
Innokentii Konstantinov
59f83ed331
Revert "Revert "Rework schedules cached ical file values"" (#1382)
Reverts grafana/oncall#1377
2023-02-22 07:30:19 +01:00
Innokentii Konstantinov
f4ee99eb7b
Fix load of ical file from google (#1381) 2023-02-22 07:29:59 +01:00