Commit graph

1785 commits

Author SHA1 Message Date
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
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
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
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
Matias Bordese
b02dc6bd36
Revert "Rework schedules cached ical file values" (#1377)
Reverts grafana/oncall#1312

This change seems to have introduced some unexpected behavior with slack
user groups. Reverting to reproduce locally and push an improved update.
2023-02-22 10:16:49 +08:00
Innokentii Konstantinov
c733d8b9f2
Cleanup ScenarioStep (#1213)
# What this PR does
This PR cleanup ScenarioStep. It's needed to simplify moving Slack to
the messaging backends in future.

1. Introduce AlertGroupSlackService to move logic from ScenarioStep.
Also it allowed to get rid of importing ScenarioSteps in the code not
related to processing of slack callbacks.
2. Remove tags from ScenarioSteps, they are unused.
3. Remove ScenarioStep.dispatch method. It just was calling
ScenarioStep.process_scenario.
4. Remove "action" param from process_scenario, it was unused.
5. Remove creation of SlackActionRecord on handling SlackEvents. We are
not using it, but it generates INSERT query on most of the user-slack
interactions.
6. Remove "random_prefix_for_routing" from ScenarioStep, it was unused.
## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-21 20:22:11 +01:00
Joey Orlando
c55a9010f7
Add Google reCAPTCHA for mobile app phone verification (#1373)
# What this PR does

Adds reCAPTCHA validation to the get mobile verification code endpoint

## Which issue(s) this PR fixes

## Checklist

- [x] Tests updated
- [ ] Documentation added (N/A)
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Maxim <maxim.mordasov@grafana.com>
2023-02-21 20:17:06 +01:00
Yulia Shanyrova
2cf83a9650
1305 backlink tosource (#1316)
# What this PR does
- Header of Incident page was reworked: clickable labels instead of just
names, users section was deleted
- Go to Integration button was deleted, because the functionality moved
to clickable labels
- Link to source was added
- 
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/1305

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ v] `CHANGELOG.md` updated
2023-02-21 11:47:21 +00:00
Joey Orlando
b5f88cfc8f
bump dependabot schedule interval to monthly (#1372) 2023-02-21 10:37:26 +01:00
Joey Orlando
11531119d2
code-ify dependabot configuration (#1347)
# What this PR does

This PR is meant to code-ify our dependabot configuration. This is being
done mainly to override the default labels that dependabot adds to the
PRs it opens.

## Checklist

- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [ ] `CHANGELOG.md` updated (N/A)
2023-02-21 10:21:05 +01:00
Jack Baldry
951416e3ad
Update publishing workflows to use organization secret (#1301)
The new tokens are managed centrally and have a longer expiry.
Administrators of the grafanabot account will be
notified of the pending expiry and the secret can be rotated centrally
without the need for a repository administrator to update their secrets.

The existing repository secrets can safely be removed. The tokens for
those secrets will be removed by the end of this week.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-21 10:19:19 +01:00
Innokentii Konstantinov
61fdcfdc72
Add ratelimit for phone number verification (#1354)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [x] Tests updated
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-21 16:47:52 +08:00
Vadim Stepanov
adac88f1c0
Update CHANGELOG.md 2023-02-20 19:06:50 +00:00
Ildar Iskhakov
3d544cf061
Update phone verification error message (#1350)
# What this PR does

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-02-20 18:58:02 +00:00
Yulia Shanyrova
fe97f63e06
Explanation message added to confirmation of deleting rotation (#1308)
# What this PR does
Message explaning what will happen has been added to confirmation modal
while deleting rotation

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

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-20 15:43:37 +01:00
Yulia Shanyrova
dd3e21b3a3
Fixing the checking filters for incidents from the store (#1311)
# What this PR does

Fix the bug related with clearing the filters when coming back from
Incident page

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

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-20 15:16:14 +01:00
Innokentii Konstantinov
78e1cbabab Update CHANGELOG.md 2023-02-20 19:24:07 +08:00
Yulya Artyukhina
058665b8a8
Fix too long declare incident link (#1342)
# What this PR does

## Which issue(s) this PR fixes
Issue with too long declare incident link in Slack

## Checklist

- [x] `CHANGELOG.md` updated
2023-02-20 18:42:44 +08:00
Michael Derynck
ca987efd55
Handle OnCall gateway connector delete 204 (#1313)
Deleting an oncall connector from the gateway returns a 204 so it should
not try to parse the response for json.
2023-02-17 11:04:02 -07:00
Matvey Kukuy
1eb6db023e
Update issue-template.md 2023-02-17 17:09:46 +01:00
Matvey Kukuy
d5b125f73e
Update issue templates 2023-02-17 17:07:20 +01:00
Vadim Stepanov
84164ff5e6
Update CHANGELOG.md 2023-02-16 13:11:05 +00:00
Vadim Stepanov
507c9a5b92
Show direct paging integrations in list filter options (#1329)
# What this PR does
Changes the internal API to show direct paging integrations in list
filter options.

<img width="1203" alt="Screenshot 2023-02-15 at 16 27 31"
src="https://user-images.githubusercontent.com/20116910/219090234-d40d471c-ffcc-48e9-8799-e48f03681b72.png">

## Checklist

- [x] Tests updated
2023-02-16 11:38:45 +00:00
Vadim Stepanov
f194df0e99
Add App Store link to web UI (#1328)
# What this PR does
Adds the IPhone mobile app link to web UI.

## Checklist

- [x] Tests updated
- [x] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-16 10:49:37 +00:00
dependabot[bot]
e2fdbb3aea
Bump django from 3.2.17 to 3.2.18 in /engine (#1330) 2023-02-16 11:44:38 +01:00
Vadim Stepanov
e1cabea5ee
PD migrator: handle resource names with extra spaces (#1327)
# What this PR does
Currently PD migrator can fail with HTTP 400 error when dealing with PD
resource names like " Schedule" (note the extra space). This PR makes
sure that PD migrator script can handle such cases.
2023-02-15 17:31:30 +00:00
Vadim Stepanov
71c00d59bf
Improve PD migrator traceback on HTTP 400 (#1325)
# What this PR does
Improves PagerDuty migrator error traceback when getting HTTP 400 errors
from OnCall public API.
2023-02-15 11:37:07 +00:00
Vadim Stepanov
9230783104
PD migrator: fix case sensitivity issues (#1320)
# What this PR does
Fix case sensitivity issues for PD migrator when using MySQL
`utf8mb4_unicode_ci` collation.
This fixes a bug when the migrator tries to create a resource but fails
to do so because there is already a resource with the same name but
different capitalisation (e.g. migrating PD schedule with name "Test"
and there's already a schedule with name "test" in OnCall).

## Checklist

- [x] Tests updated
2023-02-14 12:25:44 +00:00
Matvey Kukuy
3b1f864366
Changing names for GitHub Labels (#1318)
# What this PR does

no changelog -> pr:no changelog
no public docs -> pr:no public docs

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-02-10 13:29:20 +02:00
Yulia Shanyrova
4ee2f09e7a
823 direct paging users (#1215)
# What this PR does

Adds direct user paging

## Which issue(s) this PR fixes

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

## Checklist

- [ ] Tests updated
- [ ] Documentation added (documentation will be added later)
- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Maxim <maxim.mordasov@grafana.com>
2023-02-10 14:10:09 +03:00
Matias Bordese
b8f15904a8
Rework schedules cached ical file values (#1312)
Related to #1216 

Set default cached empty value as `""`, while keeping `None` to indicate
a refresh is needed.
2023-02-09 08:45:20 -03:00
Yulia Shanyrova
21691d64dc
Cleaning out Incident word from frontend (#704)
**What this PR does**:

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

**Checklist**
- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-08 17:07:51 +01:00
Matias Bordese
a121f84a89
Rework slack login to check backend before redirecting (#1306)
Also:
- Remove unused slack login views in `social_auth` app
- Disable unlink actions in the profile if user is not owner (otherwise
it will disconnect the logged in user, not the one being shown on
screen)
2023-02-08 09:08:18 -03:00
Rares Mardare
81b5741d34
Changes to make screens more responsive + incident status toggler change (#1237)
# What this PR does

- Changes to make a few screens be more responsive
- Removed incident actions and replaced incident status with a toggler
- Renamed `IncidentStatus.new` to `IncidentStatus.Firing`
- Removed old schedules code (unused)

## Which issue(s) this PR fixes

#1000 

## Checklist

- [x] `CHANGELOG.md` updated

---------

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-02-07 13:28:58 +02:00
Yulia Shanyrova
89f22207c2
Polishing design for User tooltip in Schedules (#1290)
# What this PR does
Design polishing for Schedules User tooltip and Incident action icons

## Which issue(s) this PR fixes

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [x] `CHANGELOG.md` updated
2023-02-06 15:59:36 +01:00
Vadim Stepanov
cd3a357c49
v1.1.23 changelog 2023-02-06 14:28:12 +00:00
Matias Bordese
4816242c22
Update docs to include details about direct paging command (#1258) 2023-02-06 09:21:15 -03:00