Commit graph

2205 commits

Author SHA1 Message Date
Kristian Bremberg
b5ee08e04d
Delete SECURITY.md (#1921)
* delete this custom security.md file since we want to sync from a
central file, namely:
https://github.com/grafana/.github/blob/main/SECURITY.md
2023-05-11 15:24:59 +00:00
Joey Orlando
50df584ebc
bump mysql from 5.7 to 8.0.32 (#1790)
# 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-05-10 17:53:27 +00:00
dependabot[bot]
4516d9f4a2
Bump django from 3.2.18 to 3.2.19 in /engine (#1914)
Bumps [django](https://github.com/django/django) from 3.2.18 to 3.2.19.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fc42edd2e6"><code>fc42edd</code></a>
[3.2.x] Bumped version for 3.2.19 release.</li>
<li><a
href="eed53d0011"><code>eed53d0</code></a>
[3.2.x] Fixed CVE-2023-31047, Fixed <a
href="https://redirect.github.com/django/django/issues/31710">#31710</a>
-- Prevented potential bypass of v...</li>
<li><a
href="007e46d815"><code>007e46d</code></a>
[3.2.x] Added missing backticks in docs/releases/1.7.txt.</li>
<li><a
href="a37e4d5d6e"><code>a37e4d5</code></a>
[3.2.x] Added stub release notes for 3.2.19.</li>
<li><a
href="963f24cff2"><code>963f24c</code></a>
[3.2.x] Added CVE-2023-24580 to security archive.</li>
<li><a
href="e34a2283f2"><code>e34a228</code></a>
[3.2.x] Post-release version bump.</li>
<li>See full diff in <a
href="https://github.com/django/django/compare/3.2.18...3.2.19">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=django&package-manager=pip&previous-version=3.2.18&new-version=3.2.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/grafana/oncall/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-10 12:45:44 +00:00
Joey Orlando
014a9c2ec2
allow the POST incoming alert endpoints to queue create_alert tasks independent of the database status (#1896)
# What this PR does

https://www.loom.com/share/18cc445117de4895a10892d56c7d3699

In preparation to upgrade our cloud databases, this PR makes some minor
changes which, after testing locally, allowed the `POST
/<integration_type>/<alert_channel_key>` endpoints to successfully
receive incoming alerts and queue the celery tasks.

I've tested all of the defined `POST
/integrations/v1/<integration_type>/<alert_channel_key>` endpoints by
sending `POST` requests to an integrations' URL while the MySQL database
was down, bringing the database back up, and ensuring the alerts were
created.

## Some other findings
- the integration heartbeat endpoints will not work as we interact w/
the database to persist the incoming heartbeat instance
- if the integration was created in the last 180 seconds, incoming
alerts will fail due to the way we cache the integration IDs
([code](https://github.com/grafana/oncall/blob/dev/engine/apps/integrations/mixins/alert_channel_defining_mixin.py#L47-L50))
- The `create_alert` celery task is set to `max_retries=None` and
`retry_backoff=True`. This means that the queued tasks will continue
retrying forever w/ an exponential backoff, until the alerts can be
created in the database (ie. when the database is back online).

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-05-10 12:36:23 +00:00
Michael Derynck
db1c48d003 Resolve conflicts, merge master 2023-05-09 11:33:07 -06:00
Michael Derynck
b16307333b
Update CHANGELOG.md 2023-05-09 11:18:17 -06:00
Michael Derynck
5992fc3cdc
Merge hotfix to dev (#1911)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-05-09 11:17:27 -06:00
Joey Orlando
49d2f477c7
add important_notification_volume_override to mobile app user settings model (#1893)
# What this PR does

add `important_notification_volume_override` to mobile app user settings
model

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-05-09 14:28:47 +00:00
Michael Derynck
135159124e
Webhook response check content length instead of header for length limit (#1900) 2023-05-09 13:55:05 +00:00
Matias Bordese
6974794109
Restore original lint backend drone step (#1904)
Drone builds are broken because the lint step was [changed to run all
lint
tasks](https://github.com/grafana/oncall/pull/1849/files#diff-b54b39f1afced2465e1f3641db9d5bbf4f3a7fcf890996dfedd3c197bcb7f8c7)
and the plugin is not there when running frontend lint commands. Restore
the original step to unblock drone.
2023-05-09 13:04:55 +00:00
Michael Derynck
1ff316b00f
Fix team blocking webhook execution (#1898)
Fix issue where the team of the alert receive channel was being used to
filter webhooks.
2023-05-09 12:59:01 +00:00
Maxim Mordasov
ec6d8c2242
fix-new-schedule-creation (#1902)
# What this PR does

Fix autoclosing new schedule form drawer

## 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-05-09 12:37:42 +03:00
Matias Bordese
8428d42d24
Fix renamed step in drone deps (#1899)
The Lint Backend step was renamed to Lint Everything
[here](https://github.com/grafana/oncall/pull/1849/files#diff-b54b39f1afced2465e1f3641db9d5bbf4f3a7fcf890996dfedd3c197bcb7f8c7)
2023-05-08 16:25:09 -04:00
Matias Bordese
b51df8a469
Fix renamed step in drone deps (#1899)
The Lint Backend step was renamed to Lint Everything
[here](https://github.com/grafana/oncall/pull/1849/files#diff-b54b39f1afced2465e1f3641db9d5bbf4f3a7fcf890996dfedd3c197bcb7f8c7)
2023-05-08 16:24:51 -04:00
Matias Bordese
2b4d9561cc
Update .drone file signature (#1897) 2023-05-08 19:58:58 +00:00
Matias Bordese
79c7313cc5
Refactor upcoming shifts to use cached final schedule data (#1891) 2023-05-08 19:01:24 +00:00
Joey Orlando
9776b78043
add missing alertgroup db migration (#1894)
# What this PR does

`SOURCE_CHOICES` was updated in #1779 but we forgot to include the
accompanying database migration. If you run `make engine-manage
CMD="makemigrations"`, this migration is output. This PR simply adds
that.

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-05-08 12:51:27 -04:00
Rares Mardare
fcf8a9bacb
Templates&Grouping tweaks&improvements (#1879)
# What this PR does

## Which issue(s) this PR fixes

- Adds option to go back to the Integrations table
- Fixed IntegrationCollapsibleTreeView component issue on
expand/collapse
- Reused/Renamed old CounterBadge to TooltipBadge
- Added maintenance until/hearbeat display to integration
- Changed `maintenace until` display on Integrations table
2023-05-08 08:42:08 +03:00
Matias Bordese
b62687295d
Fix teams filter related issue setting maintenance mode (#1885)
Related to https://github.com/grafana/support-escalations/issues/5862
2023-05-05 18:09:25 +00:00
Joey Orlando
bb3521b879
upgrade to python 3.11.3 (#1849)
# What this PR does

Upgrades the backend to Python 3.11.3 (latest stable release) + update
linting step on Drone builds to run **all** the linting steps, not just
the Python ones.

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-05-05 15:32:40 +00:00
Ildar Iskhakov
a61b0d8b3d
Use the correct description (#1883)
# 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-05-05 17:52:45 +08:00
Oleg Zaytsev
41f7c23c65
Fix and tidy alertmanager heartbeat template (#1865)
# What this PR does


There was an unnecessary indentation in the `rules:` key which made it
invalid YAML.

Also replaced the mentions to Amixr with Grafana OnCall, used some
`<code>` tags and reworded some sentences.

Also removed the anchor tag from the webhook link: we don't want people
to follow that in their browser, we want them to copy it

## Result screenshot


![image](https://user-images.githubusercontent.com/1511481/236173565-b5201b81-4d69-4d0b-944a-a2106f8fbab3.png)

## 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)

---------

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-05-05 00:25:05 +00:00
Vadim Stepanov
719806e6af
Merge pull request #1882 from grafana/helm-release/1.2.19
Merge: Release oncall Helm chart 1.2.19
2023-05-04 18:48:17 +01:00
Joey Orlando
620f69e409
"You're Going OnCall" mobile app push notification (#1814)
# What this PR does

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

## 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)
2023-05-04 16:59:57 +00:00
GitHub Actions
1b98d67dd2 Release oncall Helm chart 1.2.19 2023-05-04 16:56:10 +00:00
Matias Bordese
311e5209f1
Add make a copy action for advanced webhooks (#1852) 2023-05-04 16:50:48 +00:00
Vadim Stepanov
a43a5604ed
Update CHANGELOG.md 2023-05-04 17:48:10 +01:00
Joey Orlando
2879537c30
properly parse grafana cloud feature toggles (#1880)
# What this PR does

## 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) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-05-04 16:38:26 +00:00
Vadim Stepanov
e2901a335b
Pin requests and urllib3 (#1881)
[v1.2.18](https://github.com/grafana/oncall/releases/tag/v1.2.18) has
some issues with parsing responses from Slack due to using
`requests==2.30.0`, so pinning `requests` and `urllib3` to latest stable
versions from
[v1.2.17](https://github.com/grafana/oncall/releases/tag/v1.2.17).
2023-05-04 16:32:34 +00:00
Rares Mardare
02712e9b10
Minor tweaks to Tag component (#1866)
# What this PR does

Minor UI Tweaks after releasing the grouping&templating changes
2023-05-04 10:42:35 +00:00
Ildar Iskhakov
0a02b21886
Add pagination to integrations page (#1872)
# 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-05-04 13:48:46 +08:00
Ildar Iskhakov
fc16d3849b
Add route_template to preview_template endpoint (#1873)
# What this PR does

Add payload field to
api/internal/v1/alert_receive_channels/***/preview_template/ POST
endpoint
```
curl 'http://localhost:3000/api/plugin-proxy/grafana-oncall-app/api/internal/v1/alert_receive_channels/***/preview_template/' \
  -H 'Content-Type: application/json' \
  --data-raw '{"template_name":"route_template","template_body":"{{ payload.foo }}", "payload": {"foo": "bar"}}' \
  --compressed
```
## 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-05-04 13:40:48 +08:00
Ildar Iskhakov
c7c26cb693
Clean commented code (#1875)
# 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-05-04 13:36:51 +08:00
Ildar Iskhakov
c5c3ab1006
Rewrite texts for ~Connectivity~ Notification Warning (#1871)
# What this PR does

This PR rewrites the misleading warning:
<img width="979" alt="Screenshot 2023-05-04 at 9 50 45 AM"
src="https://user-images.githubusercontent.com/2262529/236093917-10f20e6e-f24c-43b6-ab62-44aa3fdd1b86.png">



## 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-05-04 13:34:28 +08:00
Ildar Iskhakov
be35e579ed
Add routes_count and connected_escalations_chains_count to alert_rece… (#1874)
…ive_channels endpoint

# 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-05-04 13:31:48 +08:00
Matias Bordese
7cf0c4f693
Update ical comparison to check only for event components (#1870)
May be related to https://github.com/grafana/oncall/issues/1553.

We got feedback about that happening for Google Calendar imported icals.
Google Calendar exported ics URL was returning different VTIMEZONE
components on different requests, triggering differences in the imported
ical. Updated the comparison to only consider events (while keep
assuming the sequence will reflect if there are any particular event
change).
2023-05-03 20:24:10 +00:00
Vadim Stepanov
455469aff3
Merge pull request #1868 from grafana/dev-v1.2.18
Dev to main v1.2.18
2023-05-03 17:19:41 +01:00
Vadim Stepanov
8d80d4a533
Update CHANGELOG.md 2023-05-03 17:16:03 +01:00
Matvey Kukuy
74de962771
grafana -> Grafana (#1867) 2023-05-03 17:16:03 +01:00
Vadim Stepanov
ab74cd7655
Update CHANGELOG.md 2023-05-03 17:13:33 +01:00
Matvey Kukuy
bf4efb879a
grafana -> Grafana (#1867) 2023-05-03 15:51:15 +00:00
Yulia Shanyrova
b10b589f72
Main Grouping&Templating PR fro all frontend changes (#1731)
# What this PR does
Main Grouping&Templating PR fro all frontend changes:
Includes:

1. Integration table view
2. Integration form using Drawer component
3. Integration landing page with routes/escalation chains
4. Templates
5. Groupong

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

---------

Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
2023-05-03 17:51:45 +03:00
Vadim Stepanov
d198b932c1
Zendesk inbound integration docs (#1860)
# What this PR does
Add docs & logo for Zendesk integration. Main PR in private repo:
https://github.com/grafana/oncall-private/pull/1772

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

## 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] No changelog (Zendesk integration will be only available in cloud)
2023-05-03 11:38:07 +01:00
Innokentii Konstantinov
cf11e96fe2
Handle invitation button press (#1863)
# What this PR does
Handles case when user press "Go to alert group" button in DM with bot.
2023-05-03 08:19:56 +00:00
Michael Derynck
df74c39bee
Merge pull request #1862 from grafana/helm-release/1.2.17
Merge: Release oncall Helm chart 1.2.17
2023-05-02 16:20:13 -06:00
GitHub Actions
10bfd520fd Release oncall Helm chart 1.2.17 2023-05-02 21:28:59 +00:00
Michael Derynck
1523a57bf8
Merge pull request #1861 from grafana/dev
Merge dev to main
2023-05-02 15:27:56 -06:00
Michael Derynck
0d8714dc5c
Update CHANGELOG.md 2023-05-02 15:20:05 -06:00
Matias Bordese
ad39bbf11f
Remove schedule name uniqueness restriction (#1859)
Related to https://github.com/grafana/oncall/issues/1452
2023-05-02 17:16:03 +00:00
Joey Orlando
0d4db59137
Add "Notifications Receiver" RBAC role (#1853)
# What this PR does

Closes #1651 

Plus, add developer instructions on how to run `grafana-enterprise` with
RBAC for OnCall, enabled locally.

## Todo

- [x] add API integration test for new `permission` query param filter

## 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-05-02 12:19:34 +00:00