# What this PR does
First draft of documentation. @alyssawada please use it as a starting
point :)
## Which issue(s) this PR fixes
## Checklist
- [ ] Tests updated
- [x] Documentation added
- [ ] `CHANGELOG.md` updated
---------
Co-authored-by: alyssa wada <alyssa.wada@grafana.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Alyssa Wada <101596687+alyssawada@users.noreply.github.com>
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
# What this PR does
Remove checks for `mobile_app_settings` DynamicSetting, so changing
`FEATURE_MOBILE_APP_INTEGRATION_ENABLED` is enough for toggling the
mobile app backend (aka remove per-org feature flag)
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
Fixes an issue when a local dev setup becomes extremely slow.
- Set `DEBUG` and `SILK_PROFILER_ENABLED` to `False` by default + add
utility make commands to toggle it
- Use `uwsgi` instead of Django's built-in `runserver` for local dev
setup
- Limit Celery concurrency to 3 for local dev setup (previously was 20,
used >1GB RAM on my machine)
---------
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
It seems that the MySQL syntax command was mistakenly copied to the
instructions for Postgres, which uses a different syntax - ref
[here](https://www.postgresql.org/docs/current/sql-createdatabase.html)
for creation syntax, and
[here](https://www.postgresql.org/docs/current/multibyte.html) for
encoding information. I did read through
[here](https://www.postgresql.org/docs/current/collation.html) looking
for an appropriate collation, but they appear to be
installation-specific rather than having a standard set defined in
documentation - I omitted this value (thus setting to the default), and
haven't noted any immediate problems.
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
additionally allow oeverride grafana version in .env file
The default docker-compose file should not use a grafan version several
months old.
This uses the same logic as the development docker-compose file.
## Checklist
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
The new token is set at an organization level so it does not require
repository administrators to rotate the token. It also has the minimal
classic PAT permissions to facilitate the workflow.
It has expiry but that expiry is reported via email to the engineering
organization and the IT Helpdesk have permissions to regenerate the
token when expiration is imminent.
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>
# What this PR does
This PR adds same approach as introduced
[here](https://github.com/grafana/oncall/pull/1236) to all alert and
alertgroup endpoints
## Which issue(s) this PR fixes
## Checklist
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
---------
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
This is a minor refactor before implementing
https://github.com/grafana/oncall-private/issues/1558.
Additionally, it cleans up a few spots where we do this:
```
# Re-take in case we are in the readonly db context.
```
We currently don't read anything from a read-only database, so this
should be not necessary.
## Checklist
- [x] Tests updated
- [ ] Documentation added (N/A)
- [ ] `CHANGELOG.md` updated (N/A)
# What this PR does
## Which issue(s) this PR fixes
Add cache to avoid heavy calculations to render working hours shades
## Checklist
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
Adding in reference to #1239.
@grafana/docs-oncall should be tagged as a PR reviewer for changes to
`/docs` rahter than @grafana/grafana-oncall-backend.
# What this PR does
Add stopPropagation for PluginLinks, fixes plugin crash if no start and end present in some working days
## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1253
## Checklist
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
Related to #1119
It also adds a shortcut to filter current user's related alert groups
(alert groups user was notified by, or in which user participated). Make
the filter visible by default, with a false value.
# What this PR does
Adds instruction for Slack commands and message shortcuts to OnCall
docs.
## Which issue(s) this PR fixes
Issue #190
---------
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
# What this PR does
Make direct paging internal API endpoint return an alert group ID.
## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/823
## Checklist
- [x] Tests updated
# What this PR does
There is no need to add `@grafana/grafana-oncall-backend` as a PR
reviewer when `CHANGELOG.md` is updated
## Which issue(s) this PR fixes
## Checklist
- [ ] Tests updated (N/A)
- [ ] Documentation added (N/A)
- [ ] `CHANGELOG.md` updated (N/A)
Bumps
[simple-git](https://github.com/steveukx/git-js/tree/HEAD/simple-git)
from 3.15.0 to 3.16.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/steveukx/git-js/releases">simple-git's
releases</a>.</em></p>
<blockquote>
<h2>simple-git@3.16.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>97fde2c: Support the use of <code>-B</code> in place of the default
<code>-b</code> in checkout methods</li>
<li>0a623e5: Adds vulnerability detection to prevent use of
<code>--upload-pack</code> and <code>--receive-pack</code> without
explicitly opting in.</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>ec97a39: Include restricting the use of git push --exec with other
allowUnsafePack exclusions, thanks to <a
href="https://github.com/stsewd"><code>@stsewd</code></a> for the
suggestion.</li>
</ul>
<h2>simple-git@3.15.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>de570ac: Resolves an issue whereby non-strings can be passed into
the config switch detector.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/steveukx/git-js/blob/main/simple-git/CHANGELOG.md">simple-git's
changelog</a>.</em></p>
<blockquote>
<h2>3.16.0</h2>
<h3>Minor Changes</h3>
<ul>
<li>97fde2c: Support the use of <code>-B</code> in place of the default
<code>-b</code> in checkout methods</li>
<li>0a623e5: Adds vulnerability detection to prevent use of
<code>--upload-pack</code> and <code>--receive-pack</code> without
explicitly opting in.</li>
</ul>
<h3>Patch Changes</h3>
<ul>
<li>ec97a39: Include restricting the use of git push --exec with other
allowUnsafePack exclusions, thanks to <a
href="https://github.com/stsewd"><code>@stsewd</code></a> for the
suggestion.</li>
</ul>
<h2>3.15.1</h2>
<h3>Patch Changes</h3>
<ul>
<li>de570ac: Resolves an issue whereby non-strings can be passed into
the config switch detector.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1a129523ab"><code>1a12952</code></a>
Version Packages</li>
<li><a
href="ec97a39ab6"><code>ec97a39</code></a>
Block unsafe pack (push --exec) (<a
href="https://github.com/steveukx/git-js/tree/HEAD/simple-git/issues/882">#882</a>)</li>
<li><a
href="0a623e53fd"><code>0a623e5</code></a>
Feat/unsafe pack (<a
href="https://github.com/steveukx/git-js/tree/HEAD/simple-git/issues/881">#881</a>)</li>
<li><a
href="97fde2c44f"><code>97fde2c</code></a>
Add support for using the <code>-B</code> modifier instead of the
default <code>-b</code> when usin...</li>
<li><a
href="edfd459519"><code>edfd459</code></a>
Update readme.md</li>
<li><a
href="c9fc61f4ab"><code>c9fc61f</code></a>
Version Packages</li>
<li><a
href="de570acd05"><code>de570ac</code></a>
Fix/non strings (<a
href="https://github.com/steveukx/git-js/tree/HEAD/simple-git/issues/867">#867</a>)</li>
<li>See full diff in <a
href="https://github.com/steveukx/git-js/commits/simple-git@3.16.0/simple-git">compare
view</a></li>
</ul>
</details>
<br />
[](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)
- `@dependabot use these labels` will set the current labels as the
default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as
the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as
the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the
default for future PRs for this repo and language
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>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
This PR caches the field `render_for_web` with lifetime 1 day and cache
becomes invalid if it was created before
* last alert received
* template changed
## Which issue(s) this PR fixes
## Checklist
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
Fixes issue when there are more than 100 users to be listed in the
direct pagination responders select. Alternatively we should consider
moving to an `external_select` block later.
# What this PR does
Fixes slow internal`GET /schedules` endpoints. Using the fake-data
generation script in #1128, I generated 65 calendar schedules in my
local setup. This resulted in the following endpoint performance:

The responses which show ~76 queries were run on the latest `dev`
branch. Responses w/ ~26 queries were run on this branch.
Additionally:
- add typing to a few methods in `apps/schedules/ical_utils.py`
- document `apps/api/permissions/__init__.py:user_is_authorized`
function
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/1552
## Checklist
- [ ] Tests updated
- [ ] Documentation added
- [ ] `CHANGELOG.md` updated
Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
**What this PR does**:
- Keep grafana version on create/update contact points to avoid multiple
requests to alerting
- Add retry limit on create contact point async
- Fix bugs related on create contact point
- Update logs on create/update contact point, make them more clear
- Avoid unnecessary requests to Grafana Alerting
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from
1.0.32 to 1.0.33.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/faisalman/ua-parser-js/blob/master/changelog.md">ua-parser-js's
changelog</a>.</em></p>
<blockquote>
<h2>Version 0.7.32 / 1.0.32</h2>
<ul>
<li>Add new browser : DuckDuckGo, Huawei Browser, LinkedIn</li>
<li>Add new OS : HarmonyOS</li>
<li>Add some Huawei models</li>
<li>Add Sharp Aquos TV</li>
<li>Improve detection Xiaomi Mi CC9</li>
<li>Fix Sony Xperia 1 III misidentified as Acer tablet</li>
<li>Fix Detect Sony BRAVIA as SmartTV</li>
<li>Fix Detect Xiaomi Mi TV as SmartTV</li>
<li>Fix Detect Galaxy Tab S8 as tablet</li>
<li>Fix WeGame mistakenly identified as WeChat</li>
<li>Fix included commas in Safari / Mobile Safari version</li>
<li>Increase UA_MAX_LENGTH to 350</li>
</ul>
<h2>Version 0.7.33 / 1.0.33</h2>
<ul>
<li>Add new browser : Cobalt</li>
<li>Identify Macintosh as an Apple device</li>
<li>Fix ReDoS vulnerability</li>
</ul>
<h1>Version 0.8</h1>
<p>Version 0.8 was created by accident. This version is now deprecated
and no longer maintained, please update to version 0.7 / 1.0.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="67005e3494"><code>67005e3</code></a>
Update patch version to 1.0.33 as a mirror of 0.7.33</li>
<li><a
href="f2d0db001d"><code>f2d0db0</code></a>
Bump version 0.7.33</li>
<li><a
href="a6140a17dd"><code>a6140a1</code></a>
Remove unsafe regex in trim() function</li>
<li><a
href="a886604935"><code>a886604</code></a>
Fix <a
href="https://github-redirect.dependabot.com/faisalman/ua-parser-js/issues/605">#605</a>
- Identify Macintosh as Apple device</li>
<li><a
href="b814bcd791"><code>b814bcd</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/faisalman/ua-parser-js/issues/606">#606</a>
from rileyjshaw/patch-1</li>
<li><a
href="7f71024161"><code>7f71024</code></a>
Fix documentation</li>
<li><a
href="c239ac5167"><code>c239ac5</code></a>
Merge pull request <a
href="https://github-redirect.dependabot.com/faisalman/ua-parser-js/issues/604">#604</a>
from obecerra3/master</li>
<li><a
href="8d3c2d327c"><code>8d3c2d3</code></a>
Add new browser: Cobalt</li>
<li>See full diff in <a
href="https://github.com/faisalman/ua-parser-js/compare/1.0.32...1.0.33">compare
view</a></li>
</ul>
</details>
<br />
[](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)
- `@dependabot use these labels` will set the current labels as the
default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as
the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as
the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the
default for future PRs for this repo and language
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>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
This PR adds a shortcut in the plugin synchronisation process, so the
existing users will be able login without waiting for the sync task.
Every request still starts the background synchronisation task, to be
able to propagate the organisation changes faster than periodic task. It
means that we don't necessarily need "force reload" button in the
interface.
For all the other cases (user does not exist, organisation token "not
ok", etc) process remains same - plugin will show "Initialising
plugin..." until the background task in successfully completed
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
Make so there's no need to populate `mobile_app_settings` DynamicSetting
when using the OSS license to turn on the mobile app backend.