Commit graph

1866 commits

Author SHA1 Message Date
Ildar Iskhakov
2c10fa583b
merge dev to main (#1496)
# 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>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-03-08 20:23:09 +08:00
Vadim Stepanov
4e2076be97
Merge pull request #1478 from grafana/helm-release/1.1.33
Merge: Release oncall Helm chart 1.1.33
2023-03-07 15:48:54 +00:00
GitHub Actions
d371e26958 Release oncall Helm chart 1.1.33 2023-03-07 13:46:45 +00:00
Vadim Stepanov
a958fe836b
Merge pull request #1477 from grafana/dev
Dev to main
2023-03-07 13:44:16 +00:00
Vadim Stepanov
3921a62780
Update CHANGELOG.md 2023-03-07 13:43:14 +00:00
Yulia Shanyrova
d6dbfad999
Chat-ops fix (#1472)
# What this PR does
Fix for the crash of Chat-ops page

## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1467
2023-03-07 12:26:50 +00:00
Matias Bordese
f5fb5d34dc
Rework alert group mine filter query (#1466)
Rework query to make it more efficient.
2023-03-07 11:38:50 +00:00
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
Innokentii Konstantinov
7bad073626
Remove OSS_INSTALATION env var (#881)
It's a duplicate of LICENSE env var

**What this PR does**:
Remove OSS_INSTALLATION env var in favour of LICENSE env var. Also, I
refactored features tests a little. From my point of view it makes
little sense to test if all features are disabled or enabled. Better to
test specific use-case (e.g. oss installation).
Also to test that all features are disabled it is needed to set LICENSE
equals cloud license, which makes test confusing.

**Checklist**
- [x] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-07 11:07:42 +00:00
ak0nst
44e93b6ab4
Email and phone limits now environment variable (#1219)
# What this PR does
Email and phone limits now environment variables:
EMAIL_NOTIFICATIONS_LIMIT=200, PHONE_NOTIFICATIONS_LIMIT=200

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

## Checklist

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

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2023-03-07 10:48:05 +00:00
Innokentii Konstantinov
a50ec8fed2
Refactor get_user_verbal_for_team_for_slack. (#809)
Remove unused params from signature, rename
2023-03-07 10:09:37 +00:00
Innokentii Konstantinov
249e4067c4 Remove unused def render_resolution_notes_for_csv_report 2023-03-07 13:47:49 +08:00
Joey Orlando
6ad30bfd33
remove dependabot config 2023-03-06 17:40:23 +01:00
Joey Orlando
8f22b2fd74
first UI integration test - phone verification + receive SMS alert flow (#900)
**What this PR does**:
Adds our first UI integration test using
[Playwright](https://playwright.dev/) and runs the test on CI. Right now
the test:
- logs into Grafana
- configures the plugin (if it isn't already)
- creates an OnCall schedule, where the current user will be OnCall
- creates an escalation chain to notify based on the newly created
OnCall schedule
- creates a webhook integration, attached to the created escalation
chain
- sends a demo alert for the new integration
- goes to the alert groups page and validates that the escalation step
to alert the OnCall user actually happened

Currently the Playwright tests are run against the 3 default headless
browsers, chromium, Firefox, and webkit. The CI job that runs these
tests is run as a matrix against 3 tagged versions of `grafana`; `main`,
`latest`, and `9.2.6`.

Secondly, it adds most of the logic for a second test which:
- logs into Grafana
- configures the plugin (if it isn't already)
- goes to the user's settings, verifies their phone number (using a tool
called [MailSlurp](https://www.mailslurp.com/))
- configures the current user's default escalation policy to send alerts
via SMS
- creates an escalation policy and configures it to send alerts to our
current user
- creates an integration and assigns the created escalation policy
- triggers a test alert + verifies that we receive the SMS alert text
(again, using MailSlurp)

**Which issue(s) this PR fixes**:
Closes #873 

**Checklist**
- [x] Tests updated
- [ ] Documentation added (N/A)
- [ ] `CHANGELOG.md` updated (N/A)
2023-03-06 16:28:52 +00:00
Vadim Stepanov
ab493def5f
Schedule quality backend improvements (#1461)
# What this PR does

Changes the schedule quality API so it also returns types of comments
(this is needed to address
https://github.com/grafana/oncall/issues/118#issuecomment-1436954708).

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

## Checklist

- [x] Tests updated
2023-03-06 14:27:49 +00:00
Vadim Stepanov
a194bdc72b
PD migrator: fix layer levels (#1455)
# What this PR does
Current implementation of PD migrator creates schedule layers with
priority levels starting from 0.
This PR makes so layers start from 1, so it's closer to original PD
schedules that are starting from 1.

## Checklist

- [x] Tests updated
2023-03-06 14:01:35 +00:00
Vadim Stepanov
c20229fefd
PD migrator: migrate overrides (#1454)
# What this PR does
Allows PD migrator to migrate overrides (the current implementation only
migrates rotation layers).
Also tweaks public API so created overrides are consistent with the web
UI.

## Checklist

- [x] Tests updated
2023-03-06 13:44:28 +00:00
Innokentii Konstantinov
19f1491e3a
Fix wording for cloud notifications (#1458)
# What this PR does
Fix message on Phone Verification tab.
2023-03-06 09:43:00 +00:00
Innokentii Konstantinov
4b91203eca
Add validation of hostname for recapctha (#1445)
# What this PR does

- Implement recapthca v3 check. DRF_RECAPTCHA didn't support hostname
validation and it's too complicated to add it.
- Add validation of verification code on oncall side to not to call
twilio with obviously invalid codes

## Checklist

- [x] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-06 08:59:48 +00:00
Rares Mardare
d182e71f62
fix for #1273, added component for showing permission restricted acce… (#1422)
# What this PR does

- Removed unused code
- Added another component for displaying Error Messages based on
permissions access (so that we do not duplicate this code everywhere
it's needed)
- Fix for #1273 

## Which issue(s) this PR fixes

- #1273 

## Checklist

- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
2023-03-02 15:32:59 +00:00
Matvey Kukuy
2a311c6289
Incident -> Alert Group wording (#1450) 2023-03-02 15:03:58 +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