Commit graph

3465 commits

Author SHA1 Message Date
Joey Orlando
c1826424bc
Merge pull request #3539 from grafana/helm-release/1.3.76
Merge: Release oncall Helm chart 1.3.76
2023-12-11 06:05:54 -05:00
GitHub Actions
9e5cc5132f Release oncall Helm chart 1.3.76 2023-12-11 10:37:40 +00:00
Innokentii Konstantinov
a7e0859cba
Merge pull request #3538 from grafana/dev
v1.3.76
2023-12-11 18:36:54 +08:00
Innokentii Konstantinov
3de2b1d4ad Update CHANGELOG 2023-12-11 18:25:39 +08:00
Innokentii Konstantinov
885f3e53f5
Fix labels wording (#3537) 2023-12-11 17:59:02 +08:00
Dominik Broj
94f5fce070
Further improvements on labels (#3536)
# What this PR does

## 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-12-11 09:11:27 +00:00
Dominik Broj
c28b866495
Brojd/further labels polishing (#3532)
# What this PR does
Polishing labels

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

## 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: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-12-11 07:44:54 +00:00
Joey Orlando
d363595890
Merge pull request #3534 from grafana/helm-release/1.3.75
Merge: Release oncall Helm chart 1.3.75
2023-12-08 11:45:34 -05:00
GitHub Actions
57eb980f1f Release oncall Helm chart 1.3.75 2023-12-08 16:17:30 +00:00
Joey Orlando
8d9db56388
v1.3.75 2023-12-08 11:16:19 -05:00
Joey Orlando
783e0f7ad0
Update CHANGELOG.md 2023-12-08 11:14:51 -05:00
Joey Orlando
bdc120b3c6
move some grafana-plugin/README contents (#3525) 2023-12-08 10:30:01 -05:00
Vadim Stepanov
6d1e124e05
Limit the number of labels per alert group (#3507)
# What this PR does

Limits the maximum number of labels attached to an alert group. (only
backend part)

## Which issue(s) this PR fixes

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

## 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-12-08 10:34:25 +00:00
Dominik Broj
b072d5b870
Brojd/polishing labels (#3528)
# What this PR does
- auto adjust column widths in alert group table
- add missing space below drawer buttons 

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

## 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-12-08 07:34:09 +00:00
Matias Bordese
3feba3675b
Log average/max delta between alert ingestion and alert group creation (#3526)
Related to https://github.com/grafana/oncall-private/issues/2347
2023-12-07 16:03:41 +00:00
Yulya Artyukhina
7e54a43f50
Fix team changing on PUT request if team is not in request data (#3530)
# What this PR does
Removes setting team to default value on PUT request to internal
endpoints if team is not in request data.
(For integrations, escalation chains, schedules and webhooks)

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

## 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-12-07 14:44:52 +00:00
Rares Mardare
dfe4f37371
Bump labels package version (#3521)
# 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-12-07 10:15:46 +02:00
Joey Orlando
6953c3f73e
Improve FCMDevice.send_message logging (#3527)
# What this PR does

Add more logging around `FCMDevice.send_message` in an effort to fix
https://github.com/grafana/oncall-private/issues/1820
2023-12-06 15:47:11 -05:00
Joey Orlando
ee6e387613
Merge pull request #3524 from grafana/helm-release/1.3.74
Merge: Release oncall Helm chart 1.3.74
2023-12-06 11:38:54 -05:00
GitHub Actions
a5e37c1f97 Release oncall Helm chart 1.3.74 2023-12-06 16:13:52 +00:00
Matias Bordese
0c5c01bfdb
Merge pull request #3523 from grafana/dev
v1.3.74
2023-12-06 13:12:31 -03:00
Matias Bordese
e54817246b
Update CHANGELOG.md 2023-12-06 13:11:16 -03:00
Matias Bordese
054401a214
Fix missing timestamp value, add test (#3522) 2023-12-06 16:02:54 +00:00
Joey Orlando
f7bd586f55
Merge pull request #3520 from grafana/helm-release/1.3.73
Merge: Release oncall Helm chart 1.3.73
2023-12-06 09:31:55 -05:00
GitHub Actions
ec4762e172 Release oncall Helm chart 1.3.73 2023-12-06 13:36:19 +00:00
Vadim Stepanov
f6b3179cb9
Merge pull request #3519 from grafana/dev
v1.3.73
2023-12-06 13:34:40 +00:00
Vadim Stepanov
a46610b096
Update CHANGELOG.md 2023-12-06 13:33:58 +00:00
Vadim Stepanov
44484b56f1
Modify alert group list index (#3502)
# What this PR does

Modifies the database index used by the alert group list page to
accommodate ordering by
[`-started_at`](https://github.com/grafana/oncall/pull/3502/files#diff-68d8b0b2e9b7affe54e5950215e69df4afcc6f7f5dd7eeceb810afda0dd5e1d3R85)

## Which issue(s) this PR fixes

Related to https://github.com/grafana/support-escalations/issues/8567

## 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-12-06 13:10:56 +00:00
Matias Bordese
3e1d069859
Do not trigger alert group update log signal before setting alert (#3514)
Do not trigger update log report signal until there is an alert set for
the [recently created alert
group](https://github.com/grafana/oncall/blob/dev/engine/apps/alerts/models/alert.py#L110)
to avoid retries when trying to post an updated report when there isn't
yet a message posted (or an alert to render).
2023-12-06 13:04:13 +00:00
Matias Bordese
e053eb084d
Track alert received timestamp on alert group creation (#3513)
Keep record of the timestamp when the alert group creation task is
triggered, allowing to track the delta time between alert received
datetime and alert group creation timestamp.

Related to https://github.com/grafana/oncall-private/issues/2347
2023-12-06 12:20:03 +00:00
Vadim Stepanov
147503eea8
Return 404 from mobile app gateway viewset (#3518)
# What this PR does

Changes how the `MOBILE_APP_GATEWAY_ENABLED` feature flag
enables/disables the mobile app gateway viewset.

## 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-12-06 10:57:07 +00:00
Dominik Broj
0f9c20cf0e
Polishing column selector and table view selector (#3491)
# What this PR does
- add tooltips to table view selector
- minor styling fixes

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

## 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-12-06 04:56:02 +00:00
Joey Orlando
382b18b052
Mobile app proxy gateway (#3449)
# What this PR does

Closes https://github.com/grafana/oncall-private/issues/2324

## 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-12-05 19:58:05 +00:00
Joey Orlando
d4a543a189
Merge pull request #3512 from grafana/helm-release/1.3.72
Merge: Release oncall Helm chart 1.3.72
2023-12-05 12:58:50 -05:00
GitHub Actions
f32d63d012 Release oncall Helm chart 1.3.72 2023-12-05 17:16:58 +00:00
Joey Orlando
2d47fdd5c2
v1.3.72 2023-12-05 12:15:08 -05:00
Joey Orlando
a1edc20cbe
Update CHANGELOG.md 2023-12-05 12:14:19 -05:00
Joey Orlando
2bb80b487e
address issue with metrics calculations when redis cluster is used (#3510)
## Which issue(s) this PR fixes

Fixes this issue we started seeing popping up because of a change
introduced in #3496:
```python3
File "/etc/app/apps/metrics_exporter/views.py", line 22, in get
    result = generate_latest(application_metrics_registry).decode("utf-8")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/prometheus_client/exposition.py", line 198, in generate_latest
    for metric in registry.collect():
  File "/usr/local/lib/python3.11/site-packages/prometheus_client/registry.py", line 97, in collect
    yield from collector.collect()
  File "/etc/app/apps/metrics_exporter/metrics_collectors.py", line 56, in collect
    alert_groups_total, missing_org_ids_1 = self._get_alert_groups_total_metric(org_ids)
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/etc/app/apps/metrics_exporter/metrics_collectors.py", line 97, in _get_alert_groups_total_metric
    org_id_from_key = RE_ALERT_GROUPS_TOTAL.match(org_key).groups()[0]
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'groups'
```



```python3
>>> import re
>>> ALERT_GROUPS_TOTAL = "oncall_alert_groups_total"
>>> _RE_BASE_PATTERN = r"{{?{}}}?_(\d+)"
>>> RE_ALERT_GROUPS_TOTAL = re.compile(_RE_BASE_PATTERN.format(ALERT_GROUPS_TOTAL))
>>> org_key = "{oncall_alert_groups_total}_1"
>>> RE_ALERT_GROUPS_TOTAL.match(org_key).groups()[0]
'1'
>>> org_key = "oncall_alert_groups_total_1"
>>> RE_ALERT_GROUPS_TOTAL.match(org_key).groups()[0]
'1'
```

## Checklist

- [x] 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-12-05 12:12:08 -05:00
Joey Orlando
185822a5fa
Merge pull request #3504 from grafana/helm-release/1.3.71
Merge: Release oncall Helm chart 1.3.71
2023-12-05 08:45:43 -05:00
GitHub Actions
fee2abbf98 Release oncall Helm chart 1.3.71 2023-12-05 12:58:16 +00:00
Joey Orlando
168efc730c
v1.3.71 2023-12-05 07:56:23 -05:00
Joey Orlando
52204b3336
Merge branch 'main' into dev 2023-12-05 07:56:06 -05:00
Joey Orlando
61f0c177e8
Update CHANGELOG.md 2023-12-05 07:50:51 -05:00
Dominik Broj
93fee4228d
Rename integrations table tabs (#3501)
# What this PR does
Rename "Connections" tab to "Monitoring Systems" and "Direct Paging" to
"Manual Direct Paging" on Integrations page

## Which issue(s) this PR fixes
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-12-05 12:43:48 +00:00
Dominik Broj
6c3f236db0
add borders to editors (#3490)
# What this PR does
add missing borders to template editors

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

## 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-12-05 10:23:35 +00:00
Matias Bordese
b73da8e2a4
Minor update to schedules API docs (#3488) 2023-12-04 16:01:56 -03:00
Matias Bordese
45200c33a1
Update beat schedule to use crontab schedule types (#3497)
Update celery beat schedule to use crontab schedule types, since
otherwise the timedelta is relative to the celery start and when we have
a restart we have some bigger than expected gaps between task runs
(alternatively it seems we could also use the `relative` option
described
[here](https://docs.celeryq.dev/en/main/userguide/periodic-tasks.html#available-fields))

Related to https://github.com/grafana/oncall-private/issues/2347
2023-12-04 18:42:12 +00:00
dependabot[bot]
332aa8ca82
Bump @adobe/css-tools from 4.3.1 to 4.3.2 in /grafana-plugin (#3478)
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1
to 4.3.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/adobe/css-tools/blob/main/History.md"><code>@​adobe/css-tools</code>'s
changelog</a>.</em></p>
<blockquote>
<h1>4.3.2 / 2023-11-28</h1>
<ul>
<li>Fix redos vulnerability with specific crafted css string -
CVE-2023-48631</li>
<li>Fix Problem parsing with :is() and nested :nth-child() <a
href="https://redirect.github.com/adobe/css-tools/issues/211">#211</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/adobe/css-tools/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@adobe/css-tools&package-manager=npm_and_yarn&previous-version=4.3.1&new-version=4.3.2)](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-12-04 18:41:32 +00:00
jorgeav
4df8985283
Jinja2 template helper filter datetimeformat_as_timezone (#3426)
# What this PR does
Add an additional jinja2 template helper filter to convert a timezone
aware datetime to a different timezone.

## Which issue(s) this PR fixes
Alert payloads that originate from different time zones may include
timestamps having a local time offset. This filter enables
standardization of timestamp timezones.

## 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>
2023-12-04 13:39:04 -05:00
Matias Bordese
e39baa6bbe
Revert "Refactor gcom api calls when syncing org" (#3498)
Reverts grafana/oncall#3489

Reviewing logs, it seems something broke related to [token
auth](https://ops.grafana-ops.net/explore?schemaVersion=1&panes=%7B%22ffS%22:%7B%22datasource%22:%22OP27Xzxnk%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bcluster%3D~%5C%22dev-.%2A%5C%22,%20namespace%3D%5C%22grafana-com%5C%22,%20job%3D%5C%22grafana-com%2Fgrafana-com-api%5C%22%7D%20%7C~%20%5C%22%2Finstances%2F%5Ba-z0-9%5D%2B.config%3Dtrue%5C%22%20%7C%3D%20%5C%22Grafana%20OnCall%5C%22%22,%22editorMode%22:%22code%22,%22queryType%22:%22range%22,%22datasource%22:%7B%22type%22:%22loki%22,%22uid%22:%22OP27Xzxnk%22%7D%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D%7D&orgId=1).
Reverting for now, will revisit in a later PR.
2023-12-04 18:02:58 +00:00