# What this PR does
Add alert receive channel id when logging to make it easier to trace
grouping
## Which issue(s) this PR fixes
## Checklist
- [ ] 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: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
Fixes a bug when it's not possible to delete two or more integrations
having the same name at once.
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/2313
## 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)
Moving to django-redis and updating related deps.
django-redis has better support for [sentinel
setup](https://github.com/jazzband/django-redis#use-the-sentinel-connection-factory),
besides improved cache helpers (and being actively maintained).
---------
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
# Which issue(s) this PR fixes
1. Enable RBAC
2. Create a schedule rotation layer which includes a user whom is Viewer
+ has role `Notifications Receiver` (this is the RBAC role we use to
filter which users show up in the user dropdown in the rotations modal
when creating a rotation)
3. The user _sorta_ shows up in the schedule but they are listed in
`missing_users`
<img width="1166" alt="Screenshot 2023-11-17 at 10 12 30"
src="https://github.com/grafana/oncall/assets/9406895/ae4d6449-3aff-4087-9b05-64645e84b40a">
<img width="1173" alt="Screenshot 2023-11-17 at 10 15 04"
src="https://github.com/grafana/oncall/assets/9406895/3ac4f0b9-49b3-4a7d-bfcf-39a8c51bbb74">
## 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)
# What this PR does
Previous PR #3326 test and forwarding code was not representative of
actual request. This fixes forwarding of Amazon SNS headers.
## 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)
# What this PR does
Modifies the Django `settings/base.py` such that `REDIS_URI` can now be
a comma (or semicolon) separated list of URIs. From [Django
docs](https://docs.djangoproject.com/en/4.2/topics/cache/#:~:text=If%20you%20have%20multiple%20Redis%20servers%20set%20up%20in%20the%20replication%20mode%2C%20you%20can%20specify%20the%20servers%20either%20as%20a%20semicolon%20or%20comma%20delimited%20string%2C%20or%20as%20a%20list):
> If you have multiple Redis servers set up in the replication mode, you
can specify the servers either as a semicolon or comma delimited string,
or as a list. While using multiple servers, write operations are
performed on the first server (leader). Read operations are performed on
the other servers (replicas) chosen at random:
> ```python3
> CACHES = {
> "default": {
> "BACKEND": "django.core.cache.backends.redis.RedisCache",
> "LOCATION": [
> "redis://127.0.0.1:6379", # leader
> "redis://127.0.0.1:6378", # read-replica 1
> "redis://127.0.0.1:6377", # read-replica 2
> ],
> }
> }
> ```
## Checklist
- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [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)
# What this PR does
- Fix a bug when it's not possible to delete duplicate DP integrations
for "No team"
- Make so that when a team is deleted, its DP integration is deleted
automatically
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/2296
## 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)
# What this PR does
The `rolling_users` field for the shift of type override created from
web UI is populated in the `users` field of the public GET Shift API
## Which issue(s) this PR fixes
#2989
## 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)
# Which issue(s) this PR fixes
- Fix issue that was causing our openapi schema to return HTTP 500 + add
an integration test which fetches the `.yaml` schema and validates that
the endpoint returns HTTP 200 (should hopefully prevent this from
happening again).
- add a few more type hints along the way
## 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)
# What this PR does
Allows selecting integration labels that will be passed down to alert
groups
## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall-private/issues/2179
## 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 <maxim.mordasov@grafana.com>
# What this PR does
Fix acknowledge reminder:
- check if organization was deleted
- improve logging
## 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)
Related to https://github.com/grafana/oncall/issues/3164
This will allow the following request to check if a user is currently
on-call:
`GET
/api/internal/v1/users/?search=UCGEIXI1MR1NZ&is_currently_oncall=true`
# What this PR does
Closes https://github.com/grafana/oncall-private/issues/2289
- Fix issue where if you try connecting your Slack user to your OnCall
user and the first time around you encounter an error (ex. connecting to
the wrong Slack workspace), you will see the same error banner message
despite a successful connection. Now we clear the session upon
successful connection to ensure that you will not see any previously
encountered errors.
- Fix some alignment issues on the Slack connection buttons
**Before**
<img width="564" alt="Screenshot 2023-11-10 at 15 07 48"
src="https://github.com/grafana/oncall/assets/9406895/1a256ae9-668c-4a76-b101-cb4e0af29c43">
<img width="789" alt="Screenshot 2023-11-10 at 15 16 22"
src="https://github.com/grafana/oncall/assets/9406895/61649d9d-2f11-497a-9f2d-274c6dbe90eb">
**After**
<img width="470" alt="Screenshot 2023-11-10 at 15 10 28"
src="https://github.com/grafana/oncall/assets/9406895/92c0f1d3-75eb-4de2-a3d3-4e014489f970">
<img width="738" alt="Screenshot 2023-11-10 at 15 16 42"
src="https://github.com/grafana/oncall/assets/9406895/dc825266-c45e-4c48-af78-0cd5c3c5b64e">
- On the "User Info" user settings modal tab, render `display_name`
instead of `slack_login`. Currently we prefix `@` before `slack_login`,
which is a bit confusing as it makes you think that this is the handle
you would use to `@` your user in Slack. `display_name` corresponds to
the handle that would be used to `@` your user
## Checklist
- [ ] 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)
# What this PR does
Forward headers for Amazon SNS when forwarding requests for moved
organizations. Previous
[PR](https://github.com/grafana/oncall/pull/3315) missed this since the
test did not check mocked make_request for headers.
## 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)
# What this PR does
Closes https://github.com/grafana/oncall/issues/3119
Closes https://github.com/grafana/oncall-private/issues/2061
## 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)
---------
Co-authored-by: Dominik <dominik.broj@grafana.com>
# What this PR does
Return the `timezone` field for the users GET API call
## Which issue(s) this PR fixes
Closes#3093
## 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: Joey Orlando <joey.orlando@grafana.com>
# What this PR does
Handle OrganizationMoved, OrganizationDeleted and PermissionDenied
exceptions same as other integration API views instead of converting to
BadRequest.
## 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)
# What this PR does
Add command for restarting acknowledge reminder tasks for organization.
It allows to easily restart these tasks for migrated organizations
## Which issue(s) this PR fixes
related to https://github.com/grafana/oncall-private/issues/1955
## Checklist
- [ ] 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)
# What this PR does
This PR adds alert groups success ratio over last 48 hours
## 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)
Some tests (particularly when there are schedules and shifts involved)
depend on generated usernames being unique (we randomly get [CI
errors](https://github.com/grafana/oncall/actions/runs/6812435056/job/18524768961#step:5:676)
because of this). Although username field is not required to be unique,
I think it makes sense for testing purposes to enable this (and when a
duplicated username is needed in a test, make that explicit).
# What this PR does
Passes ALL integration labels down to alert groups, so it's easier to
create labels for alert groups locally.
## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall-private/issues/2179
## 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)
# What this PR does
Adds a field to the internal API alert group serializer to display
labels.
## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall-private/issues/2179
## 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)
# What this PR does
Second part of https://github.com/grafana/oncall/pull/3256 to remove the
deprecated `AlertGroup.is_restricted` column. That change was released
in v1.3.54.
## 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)
# What this PR does
Add a flag to rebuild escalation snapshot when use `continue_escalation`
command
## Which issue(s) this PR fixes
## Checklist
- [ ] 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)
# What this PR does
Add an ability to continue escalations for alert groups from the point
it was in case if it was stopped
## 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)
# What this PR does
Add an additional jinja2 template helper filter to decode base64-encoded
strings.
An example of an incoming integration payload that would benefit from
this filter is GCP's pubsub message:
https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
## 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)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
---------
Co-authored-by: Jorge Vargas <jorge.vargas@homeprotech.com>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com>
# What this PR does
This PR:
- adds a new method
`apps.schedules.ical_utils.get_cached_oncall_users_for_multiple_schedules`.
In short this method basically adds a layer of caching on top of
`apps.schedules.ical_utils.get_oncall_users_for_multiple_schedules`. We
store one cache value for each schedule. Cache results are stored for 15
minutes. To me this feels like a good balance between improving
performance + returning stale results. Cache values are stored as:
- key = `f"schedule_{schedule.public_primary_key}_oncall_users"`
- value = `[user.public_primary_key for user in
schedule.currently_oncall_users]`
- adds a `DELETE /alertgroups/<id>` internal API endpoint (needed by
Grafana Incident for the Add Responders integration)
- updates the `is_currently_oncall` query parameter for the `GET /users`
internal API endpoint to return ALL users when the query param value `==
"all"`
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/2264
## 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)
Revert logic to detect integrations server on startupprobe and simplify
logic (and rework failing test having issues with urlpatterns cache and
reset), since cache is the same for engine and integrations, and it is
populated once.
# What this PR does
Adds a model for alert group labels and adds filtering functionality for
labels on the alert groups page.
## Which issue(s) this PR fixes
https://github.com/grafana/oncall-private/issues/2178
## 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 <maxim.mordasov@grafana.com>
# 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)
# What this PR does
Fix inconsistency in alert group ordering introduced by #3240
## 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)
# What this PR does
Exclude deleted organizations before sending heartbeat alerts
## 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)
# What this PR does
- Improve performance of the specific `GET /users` and `GET /teams`
calls that're made by the Add Responders dropdown in the UI
- Add `GET /team/{teamId}` internal API route (needed by Grafana
Incident team for their Add Responders changes)
- Some UI improvements to the Add Responders popup (loading state +
pre-fetch users and teams when the drawer is opened)
- Re-enable django-admin only if `settings.SILK_PROFILER_ENABLED ==
True` (need to be able to log into django admin to auth to silk routes)
Closes#3231
Closes https://github.com/grafana/oncall-private/issues/2252
## 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)
Bumps [django](https://github.com/django/django) from 4.2.6 to 4.2.7.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d254a54e7f"><code>d254a54</code></a>
[4.2.x] Bumped version for 4.2.7 release.</li>
<li><a
href="048a9ebb6e"><code>048a9eb</code></a>
[4.2.x] Fixed CVE-2023-46695 -- Fixed potential DoS in UsernameField on
Windows.</li>
<li><a
href="3fae5d92da"><code>3fae5d9</code></a>
[4.2.x] Refs <a
href="https://redirect.github.com/django/django/issues/30601">#30601</a>
-- Fixed typos in docs/topics/db/transactions.txt.</li>
<li><a
href="a8aa94062b"><code>a8aa940</code></a>
[4.2.x] Refs <a
href="https://redirect.github.com/django/django/issues/15578">#15578</a>
-- Made cosmetic edits to fixtures docs.</li>
<li><a
href="109f39a38b"><code>109f39a</code></a>
[4.2.x] Fixed <a
href="https://redirect.github.com/django/django/issues/34932">#34932</a>
-- Restored varchar_pattern_ops/text_pattern_ops index c...</li>
<li><a
href="61612990d8"><code>6161299</code></a>
[4.2.x] Fixed typos in docs/ref/models/expressions.txt.</li>
<li><a
href="696fbc32d6"><code>696fbc3</code></a>
[4.2.x] Fixed <a
href="https://redirect.github.com/django/django/issues/30601">#30601</a>
-- Doc'd the need to manually revert all app state on tr...</li>
<li><a
href="ffba63180c"><code>ffba631</code></a>
[4.2.x] Fixed typo in docs/ref/contrib/gis/geos.txt.</li>
<li><a
href="43a3646070"><code>43a3646</code></a>
[4.2.x] Fixed <a
href="https://redirect.github.com/django/django/issues/15578">#15578</a>
-- Stated the processing order of fixtures in the fixtur...</li>
<li><a
href="0cd8b867a0"><code>0cd8b86</code></a>
[4.2.x] Added stub release notes and release date for 4.2.7, 4.1.13, and
3.2.23.</li>
<li>Additional commits viewable in <a
href="https://github.com/django/django/compare/4.2.6...4.2.7">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 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>
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>