Commit graph

3206 commits

Author SHA1 Message Date
Matias Bordese
cc9dc66437
Move cache clear to fixtures, fix some deprecation notices (#3269) 2023-11-06 16:52:50 +00:00
Joey Orlando
eef27b35d1
remove AlertGroup.is_restricted column (#3256)
# What this PR does

Removes deprecated/not-referenced `AlertGroup.is_restricted` column. Per
our dev docs on "[Removing a nullable field from a
model](https://github.com/grafana/oncall/blob/dev/dev/README.md#removing-a-nullable-field-from-a-model)"
this is the 1st of two migration files. The [second migration
file](https://github.com/grafana/oncall/files/13255276/0038_remove_alertgroup_is_restricted_db.py.zip)
will be added in a PR in a subsequent PR/release.
2023-11-06 12:48:06 +00:00
Vadim Stepanov
94e2a8472d
Alert group labels filter (#3238)
# 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>
2023-11-06 10:31:12 +00:00
github-actions[bot]
f80d035030
Update make docs procedure (#3265)
[Use versioned action to update make-docs
procedure](d9c09cce58)

[d9c09cc](d9c09cce58)

https://github.com/grafana/writers-toolkit/blob/main/update-make-docs/action.yml

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-06 10:09:09 +00:00
Innokentii Konstantinov
a09a6426cb
Update grafana-labels-url (#3275) 2023-11-06 17:08:55 +08:00
Ildar Iskhakov
549a379e98
Fix tilt file cache_from, optimise dockerfile (#3264)
# 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-06 12:37:07 +08:00
Joey Orlando
14244e9e94
Update CHANGELOG.md 2023-11-03 14:08:51 -04:00
Joey Orlando
bac6669a3e
Merge branch 'dev' of github.com:grafana/oncall into dev 2023-11-03 13:44:56 -04:00
Joey Orlando
9fe401deda
skip failing test for now 2023-11-03 13:44:43 -04:00
Michael Derynck
b70212f4ab
Use started_at for alert group order in paginator (#3271)
# 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)
2023-11-03 17:29:21 +00:00
Yulya Artyukhina
66219b15f0
Check if organization was deleted for heartbeat integration (#3270)
# 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)
2023-11-03 17:05:37 +00:00
Joey Orlando
2cbb20601e
Improve performance of GET /users and GET /teams endpoints used by add responders popup (#3241)
# 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)
2023-11-03 12:40:54 -04:00
Matias Bordese
fb3bc0d7e5
Add missing referenced local_image.yml for local helm setup (#3268)
Forgot to add the `local_image.yml` file referenced
[here](https://github.com/grafana/oncall/pull/3204/files#diff-ba66b531f5db27e2cb364be1b4cda073681f7447f088ac98139ca96c1609dc16R30).
2023-11-03 15:30:51 +00:00
dependabot[bot]
929c078252
Bump django from 4.2.6 to 4.2.7 in /engine (#3263)
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 />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=django&package-manager=pip&previous-version=4.2.6&new-version=4.2.7)](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>
2023-11-03 13:22:38 +00:00
Matias Bordese
24357f5ff0
Update helm chart to detach integrations pod (#3204)
Depends on https://github.com/grafana/oncall/pull/3203

Related to https://github.com/grafana/oncall/issues/3162
2023-11-03 12:34:22 +00:00
Yulya Artyukhina
68c1b2efba
Fix getting alert group from telegram action (#3262)
# What this PR does
Fix getting alert group from telegram action: try to get alert group
from telegram message first instead of getting it from action data

## 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-03 10:22:38 +00:00
Ildar Iskhakov
1056f9f039
Update docker-compose.yml (#3266)
# 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-03 17:09:24 +08:00
Michael Derynck
f23a0572a1
Limit number of times webhooks retry (#3244)
# What this PR does
Set limit on number of times webhooks retry to 3

## 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-02 17:56:12 +00:00
Yulya Artyukhina
c9ce61efd7
Fix db migration for mobile app (#3260)
# What this PR does
Fixes bd migration

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

## 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)
2023-11-02 16:40:26 +00:00
Joey Orlando
ea8a2fcf41
update changelog 2023-11-02 08:02:31 -04:00
Joey Orlando
bf1cb83197
hotfix for TypeError 2023-11-02 07:59:10 -04:00
Yulya Artyukhina
2edae70b04
Update wording for mobile push notifications timing choices (#3253)
# What this PR does
Update wording for mobile push notifications timing choices

## 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)
2023-11-02 11:37:28 +00:00
Joey Orlando
8aa99be75f
sign .drone.yml after changes 2023-11-02 07:25:07 -04:00
Joey Orlando
1cbce6f0e4
Merge branch 'main' into dev 2023-11-02 07:21:01 -04:00
Joey Orlando
c3d11b847f
[hotfix] frontend TypeError (#3252) 2023-11-02 07:14:44 -04:00
Joey Orlando
52e6c12488
Merge pull request #3249 from grafana/helm-release/1.3.50
Merge: Release oncall Helm chart 1.3.50
2023-11-02 07:11:38 -04:00
Ildar Iskhakov
4ae278f8fa
Use docker build remote cache (#3251)
# What this PR does

Second part of the following PR -
https://github.com/grafana/oncall/pull/3245

## 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-02 19:11:03 +08:00
Innokentii Konstantinov
c8228670cd Update CHANGELOG 2023-11-02 19:06:43 +08:00
Innokentii Konstantinov
6367e3568e
Change expected migration date for alertmanager (#3250) 2023-11-02 19:01:48 +08:00
GitHub Actions
65f415b841 Release oncall Helm chart 1.3.50 2023-11-02 10:22:12 +00:00
Ildar Iskhakov
60761a62c6
Merge pull request #3248 from grafana/dev
v1.3.50
2023-11-02 18:20:43 +08:00
Yulya Artyukhina
66a898df7d
Add labels feature flag for list of organizations (#3246)
# What this PR does
Adds a flag that allows to enable labels feature for the list of
organizations

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

## 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-02 09:52:32 +00:00
Ildar Iskhakov
fa68f1f2ae
Merge branch 'main' into dev 2023-11-02 18:00:03 +08:00
Ildar Iskhakov
7fe67c68d0
Update CHANGELOG.md 2023-11-02 17:59:03 +08:00
Ildar Iskhakov
a9364307c8
Return alert groups for deleted integrations on private api (#3223)
# What this PR does

This PR adds alert groups from deleted integrations to the api response.
More details in this [slack
thread](https://raintank-corp.slack.com/archives/C0229FD3CE9/p1698742008962209)

## 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: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
2023-11-02 08:45:30 +00:00
Ildar Iskhakov
e89018f6ac
Add BUILDKIT_INLINE_CACHE build arg to docker builder step (#3245)
# What this PR does
`BUILDKIT_INLINE_CACHE` is required by `--cache-from`, otherwise it
won't work.
It will improve build speeds when running `tilt up`

## 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-02 03:48:00 +00:00
Joey Orlando
f905ac5246
Updates to POST /direct_paging internal API endpoint to support Grafana Incident use-cases (#3232)
# What this PR does

- Add a new column, `grafana_incident_id`, to the `AlertGroup` model.
For now this is really just needed to determine if the Alert Group was
created, via a Direct Page, that originated from Grafana Incident.
- I understand that these IDs may be cluster specific. For now we will
not need to make OnCall backend -> Incident API calls. Should we need to
start doing this we will likely need to start syncing the Incident
plugin's provisioned API url into the `organization` in OnCall, such
that we make the API call to the right Incident backend.
- Add two new optional request body parameters to `POST /direct_paging`,
`source_url` and `grafana_incident_id`
- `source_url` - will easily allow Grafana Incident to specify the URL
to the Incident and have this populate the "Source" button
- `grafana_incident_id` - Grafana Incident can specify this such that we
have a link back to Incident (+ we know that the Alert Group was
generated from Incident)
- Hide the "Declare Incident" button in the UI if the Alert Group was
generated from Grafana Incident

## 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-01 17:19:44 -04:00
Michael Derynck
3b02c587f5
Order alert groups by -started_at in internal API (#3240)
# What this PR does
Order alert groups in API by -started_at instead of -pk. This should
result in no visible change for most installations. In the case where
alert groups are being moved/restored between installations this allows
for the display order to be as expected without relying on insertion
order.

Note: Public API is already using -started_at instead of pk and it is
already indexed.

## 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-01 13:19:21 -06:00
Joey Orlando
57e53f5123
automerge Helm release PRs after Docker images have been released to Docker Hub (#3239)
# What this PR does

See [this](https://drone.grafana.net/grafana/oncall/2896/1/4) Drone job
as an example output of what this build step looks like

Closes #3216
2023-11-01 18:06:08 +00:00
Rares Mardare
341f4fad1d
Rares/bump labels 1.2.X (#3227)
# What this PR does

- Bumps `@grafana/labels` to `1.2.1`
- Use `LabelTag` from the shared library to display label colorization
2023-11-01 11:50:50 +00:00
github-actions[bot]
6fbc7bebda
Update make docs procedure (#3235)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-01 11:05:51 +00:00
Joey Orlando
b8ad7bf99b
remove all references to deprecated AlertGroup.is_restricted field (#3228)
# What this PR does

remove all references to deprecated `AlertGroup.is_restricted` field +
leave a note to remove the column in a future release
2023-10-31 20:10:45 +00:00
Joey Orlando
1b05b60738
add missing db migrations + add additional backend db migration check to CI (#3234)
# What this PR does

- add missing db migration files generated via `python manage.py
makemigrations`
- fail the `lint-migrations-backend-mysql-rabbitmq` GitHub Actions CI
job if there are missing Django database migration files
2023-10-31 16:00:55 -04:00
Joey Orlando
475e8cf7c7
Merge pull request #3230 from grafana/helm-release/1.3.49
Merge: Release oncall Helm chart 1.3.49
2023-10-31 13:54:21 -04:00
GitHub Actions
cbbb73a5d4 Release oncall Helm chart 1.3.49 2023-10-31 16:12:54 +00:00
Joey Orlando
c45fb76a0f
v1.3.49 2023-10-31 12:09:48 -04:00
Joey Orlando
558674ecb3
fix TypeError 2023-10-31 12:07:41 -04:00
Joey Orlando
a23b0152da
v1.3.48 2023-10-31 11:21:56 -04:00
Joey Orlando
c552decb37
Update CHANGELOG.md 2023-10-31 11:21:20 -04:00
Joey Orlando
4efe1a42c9
remove is_restricted from frontend codebase (#3219)
# What this PR does

The concept of `AlertGroup.is_restricted` is deprecated and no longer
used. In a future release I will remove all references to
`is_restricted` from the backend (doing it in separate releases to avoid
any potential issues where the frontend still references it shortly
after release of it being removed from the API response)

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] 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-10-31 11:19:46 -04:00