Commit graph

2372 commits

Author SHA1 Message Date
Matias Bordese
0883baeb95
Merge pull request #2093 from grafana/helm-release/1.2.36
Merge: Release oncall Helm chart 1.2.36
2023-06-02 15:37:19 -03:00
GitHub Actions
cbf37946d6 Release oncall Helm chart 1.2.36 2023-06-02 17:49:05 +00:00
Matias Bordese
e0b2825535
Merge pull request #2092 from grafana/dev
v1.2.36
2023-06-02 14:47:22 -03:00
Matias Bordese
71f9505db8
Update CHANGELOG.md 2023-06-02 14:33:50 -03:00
Matias Bordese
0ab5312bf1
Use X-WR-TIMEZONE as calendar tz when available, fallback to UTC (#2091)
When checking current shifts to trigger slack notifications, a stable
value for timezone should be used (to avoid triggering multiple
duplicated notifications; using the first `VTIMEZONE` value available
may change on refresh, besides being potentially incorrect).

Also, `VTIMEZONE` shouldn't be used as the calendar timezone, it just
describes a [timezone
definition](https://icalendar.org/iCalendar-RFC-5545/3-6-5-time-zone-component.html)
which can later be [used when specifying a start/end
date/datetime](https://icalendar.org/iCalendar-RFC-5545/3-2-19-time-zone-identifier.html)
("The parameter MUST be specified on properties with a DATE-TIME value
if the DATE-TIME is not either a UTC or a "floating" time.").

OTOH, Google uses the non-standard[ `X-WR-TIMEZONE`
](https://github.com/collective/icalendar/issues/343)field as fallback
TZ for date-times without a `TZID`. Try to use this when available,
otherwise fallback to `UTC`.
2023-06-02 17:28:04 +00:00
Michael Derynck
8dfa929d5d
Use same account for status callback when using TwilioSender (#2083)
Fixes an issue where if a sender is defined for a certain country code
and that sender belongs to a different account than the default from the
environment the status callback would get a 443 response from OnCall
back to Twilio. Checking permission on status callbacks will now use the
same account as was used to send the original message, verify, or make
the call.
2023-06-02 17:19:36 +00:00
Yulia Shanyrova
85d5e57331
fix for MonacoEditor height (#2089)
## Which issue(s) this PR fixes
When Opening Template Editor, on first load Monaco editor height is 0
2023-06-02 12:33:52 +00:00
dimitar-ivanov-93
ef258f5f56
Social auth exception logging (#2041)
This will vastly improve troubleshooting when an unexpected error
occurs.

# What this PR does
Enables logging of the exception that might be thrown by
SocialAuthExceptionMiddleware. It vastly improves the speed and accuracy
of troubleshooting requests to external applications with the aim to
authenticate, since there is usually no response to look at.
## Which issue(s) this PR fixes
Closes [#2035](https://github.com/grafana/oncall/issues/2035)
## 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: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
2023-06-02 11:20:54 +00:00
Vadim Stepanov
8c8b5e0f2d
Fix demo alert for inbound email (#2081)
# What this PR does
Fix HTTP 500 when sending demo alert for inbound integration email. 

- Make all integration configs have consistent `is_demo_alert_enabled`
and `example_payload` values
- Add tests

## 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-06-02 09:44:32 +00:00
Matias Bordese
c9ffa4efc8
Merge pull request #2085 from grafana/helm-release/1.2.35
Merge: Release oncall Helm chart 1.2.35
2023-06-01 16:02:26 -03:00
GitHub Actions
d77b439391 Release oncall Helm chart 1.2.35 2023-06-01 18:30:59 +00:00
Matias Bordese
00d7e8679b
Merge pull request #2084 from grafana/dev
v1.2.35
2023-06-01 15:29:43 -03:00
Matias Bordese
362c382df2
Update CHANGELOG.md 2023-06-01 15:10:52 -03:00
Matias Bordese
5d383c7d1d
Trigger slack shift notifications on current shift change (#2080)
Before this change, a diff ical check (which happens with frequency with
imported ical), particularly with overrides in an API/terraform schedule
would trigger unexpected slack notifications because the prev vs current
ical comparison will flag a diff, but when comparing current and
previous shifts, `current_shifts` will have the shift in progress while
the `prev_shifts` calculated from the overrides-only diff will most of
the time be empty (unless you set/change an override at current time).

Simplified the checks to always compare previous current shifts (ie. the
ones in the schedule from the DB) vs the recalculated ones using the
(refreshed) ical data from the schedule.
2023-06-01 16:27:14 +00:00
Dieter Plaetinck
44b105343a
Better english (#1959)
Not sure if this breaks anything. it probably breaks backwards compat.

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-06-01 12:37:37 +00:00
Matias Bordese
eee5065e74
Add initial setup for local dev prometheus exporter (#2039) 2023-06-01 12:31:33 +00:00
chrisharbro
f618411849
Fix relative link to resolve 404 error (#2069)
Link to the jinja2-templating page was not stepping backwards one level
in the directory, therefore linking to a 404.
2023-06-01 14:25:07 +02:00
chrisharbro
25d04f304c
Fix relative link to resolve 404 error (#2069)
Link to the jinja2-templating page was not stepping backwards one level
in the directory, therefore linking to a 404.
2023-06-01 08:21:07 -04:00
Vadim Stepanov
d1373b58d2
Fix orphaned messages in Slack (#2023)
# What this PR does
Reworks Slack handlers for buttons and select menus for AG Slack
messages.

<img width="602" alt="Screenshot 2023-05-31 at 19 34 05"
src="https://github.com/grafana/oncall/assets/20116910/857bf096-7bdd-427b-94b6-15aad873a8ac">


## Current implementation

- It's possible to end up with orphaned Slack messages that are posted
to Slack but have no `SlackMessage` instance in the DB. For such
messages, clicking buttons will result in an exception and HTTP 500. See
private repo
[issue](https://github.com/grafana/oncall-private/issues/1841) for more
info.
- Bug in authorization system, which effectively bypasses any permission
checks. For example, it's possible to resolve an alert group while being
a Viewer.
- No tests covering most buttons.

## Changes in this PR

- Make the system more robust, don't use `SlackMessage` model to figure
out the alert group being interacted on, instead embed `alert_group_pk`
to every button and use it when receiving interaction requests from
Slack.
- Existing orphaned Slack messages will be repaired. Clicking buttons
under orphaned messages will work (and missing `SlackMessage` instance
will be created on interaction). This is possible because some buttons
already have `alert_group_pk` embedded, and it's possible to get this
data on button clicks (even if the clicked button itself doesn't have
`alert_group_pk` embedded).
- Fix authorization. Show warning window when unauthorized:
<img width="511" alt="Screenshot 2023-05-31 at 19 40 02"
src="https://github.com/grafana/oncall/assets/20116910/5abeeaa7-1b61-4a47-b3af-0e21d5cd1907">

- Added tests for all the buttons under AG message. Add tests checking
authorization, actual execution of scenario steps, orphan message
repairing, backward compatibility, etc. Also add tests on
`AlertGroupSlackRenderer` checking that correct data is embedded into
buttons.
- Cosmetic changes such as renaming `incident`  to `Alert Group`.

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

## 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-06-01 10:21:30 +00:00
Alexander Cherepanov
e66fe67174
Fix a bug #1617 with permissions for telegram user settings (#2075)
# What this PR does

Changes a required role for telegram user settings from Admin to Editor.

## Which issue(s) this PR fixes

closes https://github.com/grafana/oncall/issues/1617

## 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)
2023-06-01 10:08:39 +00:00
Michael Derynck
8ee5eb5921
Merge pull request #2073 from grafana/helm-release/1.2.34
Merge: Release oncall Helm chart 1.2.34
2023-05-31 15:23:06 -06:00
GitHub Actions
9b5737bc27 Release oncall Helm chart 1.2.34 2023-05-31 20:49:54 +00:00
Michael Derynck
61c44741fd
Merge pull request #2072 from grafana/dev
Merge dev to main
2023-05-31 14:48:07 -06:00
Matias Bordese
62a42438e5
Add extra shift changed logging (#2071) 2023-05-31 20:23:29 +00:00
Michael Derynck
8507d393a9
Update CHANGELOG.md 2023-05-31 14:26:44 -06:00
Michael Derynck
61d456ce3c
Limit on Attach To action in Slack (#2049)
# What this PR does
Reduce number of alert groups returned for grouping on slack request to
20 to avoid event trigger expiry.

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

## 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>
2023-05-31 13:49:40 +00:00
Michael Derynck
9169eeb9df
Change email message on_delete to not block organization delete (#2060)
Change email message on delete so that email messages do not need to be
deleted before deleting an organization/user.
2023-05-31 13:44:55 +00:00
Ildar Iskhakov
5975b9dd8c
Change integrations page wording and add more guidance (#1986)
# 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)

---------

Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2023-05-31 11:26:36 +00:00
Yulia Shanyrova
f299fb9814
bug fixes (#2067)
## Which issue(s) this PR fixes

- Wrong field name in validation (Verbal name is required, but should be
Name is required)
- For messenger templates we need to keep \n in the beginning of the
result
-Save and Open in slack button should not close drawer
- If user edit templates, button Cancel should return to templates
drawer
- Cheatsheet should have a scroll, not main drawer
- narrow screen issues in cheatsheet
- How integration works should have the dynamic integration name (first
red mark). Alerting Contact point and notification policy should be
mentioned only for Grafana Alerting
https://files.slack.com/files-pri/T02S4RCS0-F0592BHP42G/screenshot_2023-05-23_at_11.45.29_am.png
- Cheatsheet title doesn't match to template
- Image is not rendered in Result of Edit Template
https://files.slack.com/files-tmb/T02S4RCS0-F058TEPD214-27c1136ad2/screenshot_2023-05-23_at_1.02.47_pm_720.png
- Add description to the Result of conditional template: if True
Selected alert will resolve alert group else Selected alert will not
resolve alert group. And change the icon from Warning to X
- Opening cheatsheet resets the non-saved
template](https://github.com/grafana/oncall-private/issues/1824#issuecomment-1560348999)
2023-05-31 09:40:21 +00:00
Dieter Plaetinck
83b328a0f6
Dieter/mobile app docs tweaks (#2055)
# What this PR does
Better docs for mobile app push notifications and shift pages

## Checklist

- [ ] 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)
2023-05-31 09:39:23 +00:00
Rares Mardare
76a37bd90b
Templates&grouping changes (#2066)
# What this PR does

- removed msteams usage from public
- removed check for chatops
2023-05-31 12:27:39 +03:00
Innokentii Konstantinov
528529de23
Fix 500 on templates when slack or tg integration is disabled (#2064)
# What this PR does
Continue the work, started in
https://github.com/grafana/oncall/pull/2061.
Check if slack or telegram integration is enabled to include related
templates in the response
## Which issue(s) this PR fixes
https://github.com/grafana/oncall/issues/1889

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
2023-05-31 08:22:58 +00:00
Rares Mardare
b93413c032
Rares/templates tweaks 3 (#2052)
# What this PR does

- Added option to expand tree view on main block click
- Fixed showing contact policy for grafana alerting
2023-05-31 07:40:02 +00:00
Ahmed Qashlan
e3181a5afb
Edit critical to be Important to align with the rest of app convention (#2063)
# What this PR does
- Edits the send important notification button to be send critical
notification button to align with the app conventions
## Which issue(s) this PR fixes
Ref #2043
2023-05-31 13:00:43 +08:00
Joey Orlando
5a07db851d
add description to "Default channel for Slack notifications" UI dropdown (#2051)
# What this PR does
<img width="1005" alt="Screenshot 2023-05-30 at 07 53 20"
src="https://github.com/grafana/oncall/assets/9406895/a3533104-5773-4ce4-b717-74feeca1f0f0">

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated (N/A)
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-05-30 14:53:48 -04:00
Matias Bordese
b9766deb53
Merge pull request #2059 from grafana/helm-release/1.2.33
Merge: Release oncall Helm chart 1.2.33
2023-05-30 13:18:08 -03:00
GitHub Actions
8b136a2217 Release oncall Helm chart 1.2.33 2023-05-30 15:40:46 +00:00
Matias Bordese
3fdb64ab36
Merge pull request #2058 from grafana/dev
v1.2.33
2023-05-30 12:39:45 -03:00
Matias Bordese
3e8a252cbd
Update CHANGELOG.md 2023-05-30 12:35:48 -03:00
Matias Bordese
383295a3dd
Merge pull request #2056 from grafana/helm-release/1.2.32
Merge: Release oncall Helm chart 1.2.32
2023-05-30 12:18:53 -03:00
Matias Bordese
835d267fc5
Revert slack org does not exist changes breaking escalate command (#2057) 2023-05-30 15:13:48 +00:00
GitHub Actions
e7b75e2660 Release oncall Helm chart 1.2.32 2023-05-30 13:29:10 +00:00
Matias Bordese
26f43dd0d2
Merge pull request #2054 from grafana/dev
v1.2.32
2023-05-30 10:27:05 -03:00
Matias Bordese
84e2686675
Update CHANGELOG.md 2023-05-30 09:53:20 -03:00
Rares Mardare
4b5b183520
Templating&grouping bugfixing (#2044)
# What this PR does

Bug fixing - responsiveness, functional, copy changes etc
2023-05-30 07:37:37 +00:00
Matias Bordese
bd142927b5
Update find contact point name, receiver could be missing key (#2046)
Fixes issue when syncing contact points and there are receiver configs
with no `grafana_managed_receiver_configs` key.
(eg. `{"name": "autogen-contact-point-default"}`)
2023-05-29 18:52:24 +00:00
Alexander Cherepanov
8049b5075d
Helm chart: added configuration of uwsgi using environment variables (#2045)
# What this PR does

Adds `uwsgi` configuration to helm chart.
Sets environment variables with name capitalized and prefixed with
`UWSGI_`, and dashes are substituted with underscores like described
[here](https://uwsgi-docs.readthedocs.io/en/latest/Configuration.html#environment-variables)

Sets `UWSGI_LISTEN=1024` by default, but can be overwritten or
completely removed by `uwsgi: null`

Or is it better to not specify default value (it's not backward
compatible)?

Also, small indentation fixes for postgresql configuration.

## Which issue(s) this PR fixes

closes https://github.com/grafana/oncall/issues/562

Also, [this PR](https://github.com/grafana/oncall/pull/856) has been
closed because of this PR

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

Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
2023-05-29 17:35:43 +00:00
Joey Orlando
4ebc7231c9
Properly address Organization.DoesNotExist resulting in HTTP 500 on Slack interactive_api_endpoint (#2040)
# Which issue(s) this PR fixes

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

## TODO:
- [ ] add unit tests for this scenario

## Checklist

- [ ] Unit, integration, and e2e (if applicable) tests updated
- [ ] Documentation added (or `pr:no public docs` PR label added if not
required) (N/A)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
2023-05-29 17:06:19 +00:00
Dieter Plaetinck
29ecfc5df9
Mobile app docs updates (#2026)
# What this PR does

This is the first of many mobile app doc tweaks.

Note that right now the docs are very much out of date.
To make this a smooth process, I recommend to merge if it looks "good
enough", don't sweat details at this time. We can make further
refinements later.
If @imtoori approves, this PR may be merged as is, and i'll make new
ones in the future, or i will just keep pushing more and more tweaks
over the next few business days

## 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: Salvatore Giordano <salvatoregiordanoo@gmail.com>
Co-authored-by: Matvey Kukuy <Matvey-Kuk@users.noreply.github.com>
Co-authored-by: Matvey Kukuy <motakuk@gmail.com>
2023-05-29 14:52:42 +00:00
Matvey Kukuy
94b9d5773b
Answering customer's questions by updating docs. (#2042)
Answering customer's questions by updating docs.
2023-05-29 17:47:35 +03:00