Commit graph

3374 commits

Author SHA1 Message Date
Vadim Stepanov
35e683c2b6
Update CHANGELOG.md 2023-11-30 11:52:27 +00:00
Vadim Stepanov
381a9ecf54
Delete duplicate direct paging integrations (#3412)
# What this PR does

Deletes duplicate direct paging integrations (i.e. keeps only the first
direct paging integration per team).
Also adds a unique constraint that will make such duplicates impossible
at the DB level.

## Which issue(s) this PR fixes

Related to https://github.com/grafana/oncall-private/issues/2302

## 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-11-30 11:19:12 +00:00
Dominik Broj
efe274b465
Improve loading initial data (#3450)
# What this PR does
- Split initial data into required base data and master data (options
for dropdowns)
- Prioritize loading base data over master data
- Enable retrying single promises instead of always retrying all of them
when only one fails

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


## 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-11-30 11:05:13 +00:00
github-actions[bot]
64d8bed0eb
Update make docs procedure (#3462)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-30 09:58:59 +00:00
Matias Bordese
1875fdcc47
Update CHANGELOG.md 2023-11-29 18:04:18 -03:00
Michael Derynck
f1518cb857
Ensure stack_id and org_id are ints (#3458)
# What this PR does
When reading plugin provisioning data if the value was > 999999 it was
converted to exponential notation by the template which the backend
could not understand as an ID. This makes sure it is written as an int.

## 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-11-29 13:45:49 -07:00
Matias Bordese
7aa78f5f73
Enable flake8-bugbear, fix issues (#3454)
Enables [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear),
checking for bugs/design problems, and [fixes the issues
found](https://pastebin.com/fEDBz6Ta) (some interesting ones,
particularly with mutable args).

Related to https://github.com/grafana/oncall/pull/3448
2023-11-29 15:04:48 +00:00
Ildar Iskhakov
2fdd885abe
Move new alert group metric creation into async task (#3451)
# What this PR does

Moving metrics creation into separate task to make alert ingestion more
robust

## 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: Julia <ferril.darkdiver@gmail.com>
2023-11-29 12:45:36 +00:00
Rares Mardare
455f74560c
Alert group column/label selector (#3281)
# What this PR does

Adds new functionality to enable which columns should show on the alert
group page


![image](https://github.com/grafana/oncall/assets/40542072/952d4004-9cd6-478c-a104-cd5d270cfd58)

---------

Co-authored-by: Julia <ferril.darkdiver@gmail.com>
2023-11-29 12:11:31 +00:00
Matias Bordese
ec1f120d9c
Update transaction.on_commit to use partial instead of lambda (#3448)
For reference,
https://adamj.eu/tech/2022/08/22/use-partial-with-djangos-transaction-on-commit/.

I think this may help with this one too:
https://github.com/grafana/oncall-private/issues/2318
2023-11-29 12:01:30 +00:00
Innokentii Konstantinov
8c82dac6db
Rewrite LabelsAPIClient (#3422)
Rewrite LabelAPIClient to be able to return error messages from Label
Repo API.
Main features:
1. Raises LabelRepoAPIException when response code is 400 or 500 level.
2. Always return response as a second argument to further inspect it, if
necessary.
2023-11-29 08:56:42 +00:00
Dominik Broj
96b88ed917
improve error handling and notifications for labels (#3446)
https://github.com/grafana/oncall-private/issues/2304


# What this PR does
- introduce @WithGlobalNotifiaction decorator to simplify setting
notifications
- use it for alert group labels
- add npm commands to simplify linking gops-labels package 

## 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-11-29 05:40:19 +00:00
Dominik Broj
2c4b34d3af
generate types, create http client and add exemplary usage (#3384)
# What this PR does

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

- add a script that generates TS type definitions based on OnCall API
OpenAPI schemas
- support adding custom properties on the frontend if needed
- add simple example of usage (for `'/labels/keys/'` endpoint)

## 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-11-29 05:16:13 +00:00
Ben Sully
64488f2705
Add alert group actions extension point to plugin (#3416)
# What this PR does

This PR adds an [extension point] to the Grafana plugin, allowing other
plugins to add menu items to the dropdown independently of this plugin.

It also moves the 'Declare incident' button into the 'Actions' menu
representing the extension point, and displays it conditionally; the
menu item is shown if all of the following are true:

1. the Grafana Incident plugin is installed (using the `PluginBridge` as
before)
2. the alert group has a valid Grafana Incident URL
3. the alert group hasn't already been linked to an Incident
4. the Grafana Incident plugin hasn't _also_ configured an identical
extension link to show in the dropdown.

Ideally the Grafana Incident plugin would soon configure an extension
using this extension point, at which point we can remove the custom
'Declare incident' button (and the `PluginBridge`) from the OnCall app.

---

The main use case I have for this is to be able to run a Sift
investigation from an OnCall alert group, similar to how it can be done
from a Grafana alert instance as of [this PR][pr].

I'll try and get the Grafana ML and Incident plugins running in the same
Grafana instance as this to test it out more thoroughly!

Note: this is heavily inspired by, and in some case stolen from, the
[Explore toolbar extension point in
Grafana](https://github.com/grafana/grafana/blob/main/public/app/features/explore/extensions/ToolbarExtensionPoint.tsx).

## Which issue(s) this PR fixes

Part of https://github.com/grafana/machine-learning/issues/3558.

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

[extension point]:
https://grafana.com/developers/plugin-tools/ui-extensions/create-an-extension-point
[pr]: https://github.com/grafana/grafana/pull/77900
2023-11-28 18:22:51 +00:00
Michael Derynck
e9f2178da1
Change service account auth to use instance id instead (#3435)
# What this PR does
Change GrafanaServiceAccountAuth to use instance ID header in cloud
instead of slugs.

## 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-11-28 15:56:29 +00:00
Rares Mardare
4a821f52d3
Users profile tweaks (#3443)
## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/3340
https://github.com/grafana/oncall/issues/3341
2023-11-28 14:56:26 +00:00
Innokentii Konstantinov
fb4bad21d2
Document tojson jinja filter (#3432)
# What this PR does
Document tojson jinja filter
2023-11-28 20:47:57 +08:00
dependabot[bot]
d8f111f960
Bump aiohttp from 3.8.6 to 3.9.0 in /dev/scripts/generate-fake-data (#3436)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.6 to
3.9.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohttp/releases">aiohttp's
releases</a>.</em></p>
<blockquote>
<h2>3.9.0</h2>
<h2>Features</h2>
<ul>
<li>
<p>Introduced <code>AppKey</code> for static typing support of
<code>Application</code> storage.
See <a
href="https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config">https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config</a></p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/5864">#5864</a>)</p>
</li>
<li>
<p>Added a graceful shutdown period which allows pending tasks to
complete before the application's cleanup is called.
The period can be adjusted with the <code>shutdown_timeout</code>
parameter. -- by :user:<code>Dreamsorcerer</code>.
See <a
href="https://docs.aiohttp.org/en/latest/web_advanced.html#graceful-shutdown">https://docs.aiohttp.org/en/latest/web_advanced.html#graceful-shutdown</a></p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7188">#7188</a>)</p>
</li>
<li>
<p>Added <code>handler_cancellation
&lt;https://docs.aiohttp.org/en/stable/web_advanced.html#web-handler-cancellation&gt;</code>_
parameter to cancel web handler on client disconnection. -- by
:user:<code>mosquito</code>
This (optionally) reintroduces a feature removed in a previous release.
Recommended for those looking for an extra level of protection against
denial-of-service attacks.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7056">#7056</a>)</p>
</li>
<li>
<p>Added support for setting response header parameters
<code>max_line_size</code> and <code>max_field_size</code>.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/2304">#2304</a>)</p>
</li>
<li>
<p>Added <code>auto_decompress</code> parameter to
<code>ClientSession.request</code> to override
<code>ClientSession._auto_decompress</code>. -- by
:user:<code>Daste745</code></p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/3751">#3751</a>)</p>
</li>
<li>
<p>Changed <code>raise_for_status</code> to allow a coroutine.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/3892">#3892</a>)</p>
</li>
<li>
<p>Added client brotli compression support (optional with runtime
check).</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/5219">#5219</a>)</p>
</li>
<li>
<p>Added <code>client_max_size</code> to
<code>BaseRequest.clone()</code> to allow overriding the request body
size. -- :user:<code>anesabml</code>.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/5704">#5704</a>)</p>
</li>
<li>
<p>Added a middleware type alias
<code>aiohttp.typedefs.Middleware</code>.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/5898">#5898</a>)</p>
</li>
<li>
<p>Exported <code>HTTPMove</code> which can be used to catch any
redirection request
that has a location -- :user:<code>dreamsorcerer</code>.</p>
<p>(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/6594">#6594</a>)</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst">aiohttp's
changelog</a>.</em></p>
<blockquote>
<h1>3.9.0 (2023-11-18)</h1>
<h2>Features</h2>
<ul>
<li>
<p>Introduced <code>AppKey</code> for static typing support of
<code>Application</code> storage.
See <a
href="https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config">https://docs.aiohttp.org/en/stable/web_advanced.html#application-s-config</a></p>
<p><code>[#5864](https://github.com/aio-libs/aiohttp/issues/5864)
&lt;https://github.com/aio-libs/aiohttp/issues/5864&gt;</code>_</p>
</li>
<li>
<p>Added a graceful shutdown period which allows pending tasks to
complete before the application's cleanup is called.
The period can be adjusted with the <code>shutdown_timeout</code>
parameter. -- by :user:<code>Dreamsorcerer</code>.
See <a
href="https://docs.aiohttp.org/en/latest/web_advanced.html#graceful-shutdown">https://docs.aiohttp.org/en/latest/web_advanced.html#graceful-shutdown</a></p>
<p><code>[#7188](https://github.com/aio-libs/aiohttp/issues/7188)
&lt;https://github.com/aio-libs/aiohttp/issues/7188&gt;</code>_</p>
</li>
<li>
<p>Added <code>handler_cancellation
&lt;https://docs.aiohttp.org/en/stable/web_advanced.html#web-handler-cancellation&gt;</code>_
parameter to cancel web handler on client disconnection. -- by
:user:<code>mosquito</code>
This (optionally) reintroduces a feature removed in a previous release.
Recommended for those looking for an extra level of protection against
denial-of-service attacks.</p>
<p><code>[#7056](https://github.com/aio-libs/aiohttp/issues/7056)
&lt;https://github.com/aio-libs/aiohttp/issues/7056&gt;</code>_</p>
</li>
<li>
<p>Added support for setting response header parameters
<code>max_line_size</code> and <code>max_field_size</code>.</p>
<p><code>[#2304](https://github.com/aio-libs/aiohttp/issues/2304)
&lt;https://github.com/aio-libs/aiohttp/issues/2304&gt;</code>_</p>
</li>
<li>
<p>Added <code>auto_decompress</code> parameter to
<code>ClientSession.request</code> to override
<code>ClientSession._auto_decompress</code>. -- by
:user:<code>Daste745</code></p>
<p><code>[#3751](https://github.com/aio-libs/aiohttp/issues/3751)
&lt;https://github.com/aio-libs/aiohttp/issues/3751&gt;</code>_</p>
</li>
<li>
<p>Changed <code>raise_for_status</code> to allow a coroutine.</p>
<p><code>[#3892](https://github.com/aio-libs/aiohttp/issues/3892)
&lt;https://github.com/aio-libs/aiohttp/issues/3892&gt;</code>_</p>
</li>
<li>
<p>Added client brotli compression support (optional with runtime
check).</p>
<p><code>[#5219](https://github.com/aio-libs/aiohttp/issues/5219)
&lt;https://github.com/aio-libs/aiohttp/issues/5219&gt;</code>_</p>
</li>
<li>
<p>Added <code>client_max_size</code> to
<code>BaseRequest.clone()</code> to allow overriding the request body
size. -- :user:<code>anesabml</code>.</p>
<p><code>[#5704](https://github.com/aio-libs/aiohttp/issues/5704)
&lt;https://github.com/aio-libs/aiohttp/issues/5704&gt;</code>_</p>
</li>
<li>
<p>Added a middleware type alias
<code>aiohttp.typedefs.Middleware</code>.</p>
<p><code>[#5898](https://github.com/aio-libs/aiohttp/issues/5898)
&lt;https://github.com/aio-libs/aiohttp/issues/5898&gt;</code>_</p>
</li>
<li>
<p>Exported <code>HTTPMove</code> which can be used to catch any
redirection request
that has a location -- :user:<code>dreamsorcerer</code>.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="45b2c2c577"><code>45b2c2c</code></a>
Release v3.9.0 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7843">#7843</a>)</li>
<li><a
href="5d59d3d6ac"><code>5d59d3d</code></a>
Release v3.9.0rc0 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7840">#7840</a>)</li>
<li><a
href="c806814a8a"><code>c806814</code></a>
Release v3.9.0rc0 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7838">#7838</a>)</li>
<li><a
href="e07a1bdaac"><code>e07a1bd</code></a>
Use timestamp instead of datetime to achieve faster cookie expiration…
(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7837">#7837</a>)</li>
<li><a
href="53476dfd4e"><code>53476df</code></a>
Disallow arbitrary sequence types in version (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7835">#7835</a>)
(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7836">#7836</a>)</li>
<li><a
href="9d712f2f9c"><code>9d712f2</code></a>
Bump mypy from 1.6.1 to 1.7.0 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7833">#7833</a>)</li>
<li><a
href="63a805e1d8"><code>63a805e</code></a>
Bump python-on-whales from 0.66.0 to 0.67.0 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7832">#7832</a>)</li>
<li><a
href="cb94533dd5"><code>cb94533</code></a>
Ensure writer is always reset on completion (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7815">#7815</a>)
(<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7826">#7826</a>)</li>
<li><a
href="c0f9017a9a"><code>c0f9017</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7821">#7821</a>/366ba40f
backport][3.9] Only check origin if insecure scheme and th...</li>
<li><a
href="9d498ca1e6"><code>9d498ca</code></a>
Bump sphinx from 7.1.1 to 7.2.6 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/7606">#7606</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/aio-libs/aiohttp/compare/v3.8.6...v3.9.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aiohttp&package-manager=pip&previous-version=3.8.6&new-version=3.9.0)](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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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-11-28 06:56:46 -05:00
Innokentii Konstantinov
5ef675d9d7
Merge pull request #3440 from grafana/hotfix-slack-ratelimit
Fix slack ratelimit
2023-11-28 13:29:41 +08:00
Innokentii Konstantinov
62a5b21e72 Update CHANGELOG.md 2023-11-28 13:28:27 +08:00
Innokentii Konstantinov
ccc64e6b90 Fix 2023-11-28 13:22:18 +08:00
Innokentii Konstantinov
8f17784c49 Fix 2023-11-28 13:16:55 +08:00
Innokentii Konstantinov
22cfba0163 Remove call to bots_info in the slack message handler 2023-11-28 13:14:33 +08:00
Joey Orlando
ba6844ec03
Merge pull request #3439 from grafana/helm-release/1.3.63
Merge: Release oncall Helm chart 1.3.63
2023-11-27 21:53:08 -05:00
GitHub Actions
cd49e6702b Release oncall Helm chart 1.3.63 2023-11-28 02:17:40 +00:00
Ildar Iskhakov
ac7f1174d0
Merge pull request #3438 from grafana/dev
Update CHANGELOG.md
2023-11-28 10:15:38 +08:00
Ildar Iskhakov
656354e48b
Merge branch 'main' into dev 2023-11-28 10:15:19 +08:00
Ildar Iskhakov
7949b62b5f
Update CHANGELOG.md 2023-11-28 10:14:04 +08:00
Ildar Iskhakov
c68e2a5e73
Merge pull request #3437 from grafana/dev
v1.3.62
2023-11-28 10:10:48 +08:00
Ildar Iskhakov
393c8e06a7
Merge branch 'main' into dev 2023-11-28 09:59:07 +08:00
Ildar Iskhakov
cb6a907b03
Update CHANGELOG.md 2023-11-28 09:53:50 +08:00
Vadim Stepanov
9e889403f2
Alert group payload labels (#3434)
https://github.com/grafana/oncall/pull/3385 + handle null values
2023-11-27 17:53:54 +00:00
Vadim Stepanov
e09422a07d
Revert "Alert group payload labels" (#3433)
Reverts grafana/oncall#3385
2023-11-27 17:28:34 +00:00
Vadim Stepanov
5fac6aeac5
Alert group payload labels (#3385)
# What this PR does

Adds an ability to extract labels from alert group payload. See
[demo](https://www.loom.com/share/cf2b746eea974547b76f44298e32a54f?sid=67ed1e58-40ed-4136-a201-6482fb7773d3).

## Which issue(s) this PR fixes

https://github.com/grafana/oncall-private/issues/2304

## 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: Maxim Mordasov <maxim.mordasov@grafana.com>
Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
2023-11-27 16:55:31 +00:00
Ildar Iskhakov
2acd85a3e6 Do not check redis during startupprobe 2023-11-27 21:43:26 +08:00
Ildar Iskhakov
2ddb47ea29
Revert "Make alert ingestion cache independent (#3414)" (#3430)
This reverts commit acfba47a81.

# 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-11-27 20:23:57 +08:00
Ildar Iskhakov
aab49f0594
Revert "Add test to ensure integrations work when cache is down" (#3431)
Reverts grafana/oncall#3418
2023-11-27 20:10:26 +08:00
Innokentii Konstantinov
85f9b0f168
Log slack bot_id and bot_user_it (#3429)
Log slack bot id and bot user id to check if we can avoid request to
slack api
2023-11-27 18:36:53 +08:00
Yulya Artyukhina
863af25994
Fix alert group rendering (#3424)
# What this PR does
Fix alert group rendering when some links were broken because of
replacing `-` to `_`.

## Which issue(s) this PR fixes
https://github.com/grafana/support-escalations/issues/8119
https://github.com/grafana/support-escalations/issues/8468

## 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-11-24 15:39:37 +00:00
Matias Bordese
0816825c5d
Add test to ensure integrations work when cache is down (#3418)
Complements https://github.com/grafana/oncall/pull/3414/
2023-11-24 12:02:36 +00:00
Matias Bordese
d730f6b2bf
Trigger distribute task after alert is committed (#3420)
Fix issue triggering task retries because alert is not yet committed to
the DB.
Similar to https://github.com/grafana/oncall/pull/3001.
2023-11-24 12:02:32 +00:00
Michael Derynck
3436344f1d
Allow users with user settings read to list users (#3419)
# What this PR does
Fixed issue where `User Settings Reader` was missing permission to list
users.

## 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-11-23 20:41:27 +00:00
Matias Bordese
55fedb25d6
Rework alert group internal API team filter (#3413)
Related to https://github.com/grafana/oncall-private/issues/2177
2023-11-23 17:28:00 +00:00
Michael Derynck
60ef4348f5
Allow OnCall API to use Grafana Service Accounts (#3189)
# What this PR does
Allows public OnCall API to use Grafana service accounts for
authorization. In cloud requests using a Grafana service account token
also needs to provide headers for `X-Grafana-Org-Slug` and
`X-Grafana-Instance-Slug`

This is **alpha** functionality, it may break or be removed in the
future. Going to use this on one endpoint (resolution notes) before we
consider the implications across all of public API.

## 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-11-23 16:42:27 +00:00
Ildar Iskhakov
95a3ab3b75
Revert "Cache independent ingestion" (#3417)
Reverts grafana/oncall#3415
2023-11-23 21:38:06 +08:00
Maxim Mordasov
8645e55f39
Filters polishing, remove displaying rotation modal for Terraform/API based schedules (#3259)
# What this PR does

Filters fixes and polishing, remove displaying rotation modal for
Terraform/API bases schedules

## Which issue(s) this PR fixes

https://github.com/grafana/oncall/issues/1714
https://github.com/grafana/oncall-private/issues/2246
https://github.com/grafana/oncall/issues/3183

## Checklist

- [ ] 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-11-23 09:53:48 +00:00
Ildar Iskhakov
acfba47a81
Make alert ingestion cache independent (#3414)
# What this PR does

This PR catches redis unavailability exceptions to prevent errors during
alert ingestion in the following places:
StartupProbeView
AlertChannelDefiningMixin
RateLimitMixin

## 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-11-23 16:32:02 +08:00
Ildar Iskhakov
a6912c96af
Merge pull request #3415 from grafana/iskhakov/cache-independent-ingestion
Cache independent ingestion
2023-11-23 16:22:18 +08:00
Ildar Iskhakov
566e8c53ba Ignore typing checks for imported library (https://mypy.readthedocs.io/en/stable/running_mypy.html\#missing-library-stubs-or-py-typed-marker) 2023-11-23 16:14:30 +08:00
Ildar Iskhakov
0d5ef785bf Make alert ingestion cache independent 2023-11-23 11:27:47 +08:00