Commit graph

2479 commits

Author SHA1 Message Date
Joey Orlando
687fcc2829
disable mypy job for now 2023-06-15 15:46:45 +02:00
Joey Orlando
0b926f8721
debugging github issues workflow 2023-06-15 15:42:14 +02:00
Joey Orlando
a45f66a353
debugging issue templates 2023-06-15 15:39:31 +02:00
Joey Orlando
998532ef23
debugging github issue workflow 2023-06-15 15:36:34 +02:00
Joey Orlando
76eacd3ea3
update github issues workflows 2023-06-15 15:34:04 +02:00
Joey Orlando
c7291f98fb
remove on issue label added workflow 2023-06-15 15:28:18 +02:00
Joey Orlando
a44bd31e94
add new bug and feature-request GitHub Issue templates (#2230)
This is how `grafana/grafana` handles [bug
reports](https://github.com/grafana/grafana/issues/new?assignees=&labels=&projects=&template=0-bug-report.yaml&title=Product-Area-Here%3A+short+description+of+bug+here)
(for feature requests they have an [external
link](https://github.com/grafana/grafana/issues/new/choose) pointing
people to head over to their repo's Discussion page).

This _should_ solve the problem of people opening new issues without
properly filling in all the necessary information. Because users that
are not a part of the `grafana` GitHub organization, do not have
permission to add labels, this also solves that by automatically adding
either the "bug" or "feature request" label based on which issue
template they choose to use.
2023-06-15 09:25:10 -04:00
Rares Mardare
9953e1292b
Fixed route expansion in templates&grouping (#2246)
# What this PR does

## Which issue(s) this PR fixes

- Fixed route expansion in templates&grouping
- Added notifications for add/delete routes
2023-06-15 16:14:28 +03:00
Matias Bordese
d272868cec
Update schedule preview to not create new shift by default (#2223) 2023-06-14 19:24:03 +00:00
Matias Bordese
3fae89ad43
Preserve schedule update_shift links on delete (#2224) 2023-06-14 19:13:35 +00:00
Matias Bordese
9e758c3bd5
Unify "name" and "title" field for oncall shift (#2239)
Porting changes from https://github.com/grafana/oncall/pull/1833
2023-06-14 19:05:19 +00:00
Joey Orlando
572131b921
add user locale field to mobile app user settings table + change going on call push notification text (#2131)
# What this PR does

- add user locale field to mobile app user settings table + add a test
that sends `PATCH` requests to this endpoint
- change "you're going on call" push notification text to include
localized shift time. The general format is now:
  ```python
f"You're going on call in {time_until_going_oncall} for schedule
{schedule.name}, {formatted_shift}"
  ```
- `time_until_going_oncall` is a "human-readable" format of the time
until the start)
  - `schedule.name` is self-explanatory
- `formatted_shift` this depends on the shift. If the shift starts and
ends on the same day, the format will be "HH:mm - HH:mm". Otherwise, if
the shift starts and ends on different days, the format will be
"YYYY-MM-DD HH:mm - YYYY-MM-DD HH:mm". **Note** that all datetime
related formatting will use the new `locale` field that we are now
storing in the mobile app user settings table. If no locale is yet
present we will fallback to "en"

## Which issue(s) this PR fixes

closes https://github.com/grafana/oncall/issues/2024
https://github.com/grafana/oncall-mobile-app/issues/187

## 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-14 12:19:58 -04:00
Michael Derynck
c8669ce94c
Add field descriptions for webhooks (#2225)
- Add descriptions for fields
- Change default value of request_data to avoid confusing situation
where if there was a error before request data is built, like in the
template for the request headers, request_data would be a python dict
resulting in hard to read text in the UI status page.
2023-06-14 08:37:30 -06:00
Matias Bordese
35b08a3544
Update CHANGELOG.md 2023-06-14 10:16:55 -03:00
Matias Bordese
f21bd8d0b5
Refactor metrics exporter to use cache.get_many (#2212)
Eventually we could also process orgs by chunks.
2023-06-14 12:14:29 +00:00
Rares Mardare
a9245e3855
Rares/templates minor improvements (#2219)
# What this PR does

## Which issue(s) this PR fixes

- Removed deprecated icon size usage of `xxl`
- Fixed route expand/collapse issue when http endpoint was not showing
- Added missing permission checks
2023-06-14 11:39:13 +00:00
Ildar Iskhakov
28cc97527e
Refactor templatesToRender, add tooltips, fix wording (#2226)
# 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-06-14 15:30:42 +08:00
Ildar Iskhakov
72c9a476d2
Polish route creation (#2222)
# What this PR does
polished route creation
route is now created empty by default
added placeholder text to route template
added warning for route w/o template
made text same size in warnings
changed texts a bit for more consistency with grafana alerting
## 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-06-14 15:09:32 +08:00
Ildar Iskhakov
51b054fd31
Add 'Edit templates' to dropdown, change wording (#2217)
# 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-06-14 14:56:25 +08:00
Joey Orlando
ca4797e268
Merge branch 'dev' of github.com:grafana/oncall into dev 2023-06-14 08:54:22 +02:00
Joey Orlando
de0cc4c441
minor updates to issue creation workflow 2023-06-14 08:54:15 +02:00
Innokentii Konstantinov
ab7cd0aec2 Fix amv2 2023-06-14 14:43:00 +08:00
Ildar Iskhakov
a959912dcb
Add autoresolve switch to templates section on Integrations page (#2150)
# What this PR does
In previous version of integrations page we had autoresolve setting
<img width="1207" alt="Screenshot 2023-06-10 at 12 57 36 AM"
src="https://github.com/grafana/oncall/assets/2262529/a3b7686a-2039-40fd-af5d-959f5a477eb8">
Moving it to templates drawer. For non-alertmanager integrations with
enabled autoresolve:
<img width="1218" alt="Screenshot 2023-06-10 at 12 57 46 AM"
src="https://github.com/grafana/oncall/assets/2262529/3e91e438-9714-45e4-9aa1-a3324a2c74cd">
For non-alertmanager integrations with disabled autoresolve:
<img width="1211" alt="Screenshot 2023-06-10 at 12 58 04 AM"
src="https://github.com/grafana/oncall/assets/2262529/f43fb155-f22c-4f1b-985b-61448bd37917">
For alertmanager based integrations autoresolve template is disabled:
<img width="1223" alt="Screenshot 2023-06-10 at 12 58 22 AM"
src="https://github.com/grafana/oncall/assets/2262529/94533c6c-a8c4-4cce-8ef2-4e132cc30fe3">




## 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-06-14 13:53:17 +08:00
Ildar Iskhakov
952df67580
Fix integrations options order (#2204)
# 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-06-14 09:33:52 +08:00
Joey Orlando
072d43c3d2
make mobile app available to viewers (#1892)
# What this PR does
closes #2153 

## Which issue(s) this PR fixes

## 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-13 14:54:52 -04:00
Matias Bordese
6d77f598d6
Require users when creating a schedule rotation (#2220) 2023-06-13 16:50:37 +00:00
Matias Bordese
1e0bd4395d
Fix preview cutting overlapping events (#2218)
Also update schedules filter by type to allow multiple option selection
as OR.
2023-06-13 15:27:01 +00:00
Yulia Shanyrova
f0aee6e57d
result showing improving (#2214)
result showing improving
2023-06-13 15:06:32 +00:00
Matias Bordese
6e5d417967
Update shift week_start when translating to UTC (#2124)
This fixes scenario described
[here](https://github.com/grafana/oncall/issues/2118#issuecomment-1580499754).

When a rotation is setup in UTC+1, and the shift starts at 00:00 with
Monday as active day and a weekly frequency, the values are translated
to UTC when submitting to the backend, so the shift data becomes
something like: shift starting at 23:00 on Sunday, but since week_start
is on Monday, the "first event" in the week belongs to the "previous
week". This can be addressed by moving the week_start, so a weekly shift
that was starting on a Monday but in UTC tz starts on Sunday,
"translates" to a UTC week_start on Sunday:


![rotation-example](https://github.com/grafana/oncall/assets/260710/5222d3ce-52b7-41d5-8ecb-d01c7a0139cb)


(this is with the proposed changes; otherwise you get the same issue
linked above where the first event in the week is assigned to the other
user group).

About selected week days changed when editing a rotation, see inline
comment (related to
[this](https://github.com/grafana/oncall/issues/1322#issuecomment-1521787786))
2023-06-13 14:31:50 +00:00
Joey Orlando
edb0b9a3c1
improve issue labeling workflow (#2213)
This is a follow up to commit
[57b62c269c](57b62c269c)
to further automate how we handle newly created issues that are not
properly labeled
2023-06-13 09:50:29 -04:00
Yulya Artyukhina
0271cdb8a6
Save only organizations with integrations in cache (#2190)
Save only organizations with integrations in cache for collecting
metrics
2023-06-13 13:31:14 +00:00
Joey Orlando
57b62c269c
add comment on opened issues to remind
about adding labels if none are present
2023-06-13 15:02:59 +02:00
Joey Orlando
5485072d81
minor update to PR comment layout 2023-06-13 14:25:14 +02:00
Joey Orlando
0e7333a9c3
only consider latest semver tags as latest 2023-06-13 14:22:53 +02:00
Joey Orlando
3c755a3a66
add comment to newly created issues which includes the current latest version (#2205) 2023-06-13 08:16:01 -04:00
Joey Orlando
90e0b21d3e
remove SlackActionRecord model/table (#2201)
# What this PR does

Closes #2169 

## 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-13 10:56:06 +00:00
Innokentii Konstantinov
d3ebc17c39 Disable alertmanager_v2 in web ui 2023-06-13 16:13:02 +08:00
Innokentii Konstantinov
f0f2e7c8c6
Draft AlertManager integration v2 (#2167)
# What this PR does
Introduces AlertManagerV2 integration with better grouping and
autoresolving, not intended for production use yet.

---------

Co-authored-by: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2023-06-13 07:10:38 +00:00
Raz Amir
40890e26ba
Helm: Allow using existing secrets for redis and mysql (#2156)
# What this PR does
This PR adds the ability to use an existing secret for external Redis
and external MySQL and it follows the same changes that PR #761 did for
RabbitMQ (including the fix that was done for it later in #775)

## 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: Ildar Iskhakov <Ildar.iskhakov@grafana.com>
2023-06-13 05:42:22 +00:00
Ildar Iskhakov
30b8401f03
Add helm tests for rabbitmq and redis (#2165)
# 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-06-13 09:45:07 +08:00
Michael Derynck
fd9904cd2e Sign drone build 2023-06-12 15:32:12 -06:00
Michael Derynck
363a3488a2
Update CHANGELOG.md 2023-06-12 15:19:24 -06:00
Joey Orlando
d8d3416686
fix drone unit tests job 2023-06-12 18:53:03 +02:00
Joey Orlando
9dde1805aa
add mypy static type checker to backend codebase (#2151)
# What this PR does

- Adds [`mypy` static type checking](https://mypy-lang.org/) to our CI
pipeline. Currently there is still a **ton** of errors being returned by
the tool, as we'll need to fix pre-existing errors. I think we can
slowly chip away at these errors in small PRs, doing them all in one
large PR is likely very risky.
- Also, this PR starts chipping away at one of the main type errors that
we have which is accessing the `datetime` class (from the `datetime`
library) or `timedelta` function on the `django.utils.timezone` module.
Basically we should be instead accessing these two objects from the
native `datetime` module. This makes sense because the [`__all__`
attribute](https://github.com/django/django/blob/main/django/utils/timezone.py#L14-L30)
in `django.utils.timezone` does not re-export `datetime` or `timedelta`.
- splits `engine` dependencies out into `requirements.txt` and
`requirements-dev.txt`

## 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)
- [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required) (N/A)
2023-06-12 12:50:33 -04:00
Matvey Kukuy
213c8c6cc7
Adding a note about OSS env vars to enable tg/slack features (#2157)
Mentioning 
```
FEATURE_TELEGRAM_INTEGRATION_ENABLED=True
FEATURE_SLACK_INTEGRATION_ENABLED=True
```
Closing #1735
2023-06-12 16:35:21 +00:00
Rares Mardare
bebce3badd
Use secondary btn, updated copies on MobileApp Send Push (#2159)
# What this PR does

Changes on MobileApp screen
- Switched buttons to `secondary` instead of `destructive`
- Update copy (Send Test Push/Important) + notification copy
2023-06-12 17:29:25 +03:00
Joey Orlando
8c5f6238dc
get rid of need for FEATURE_PROMETHEUS_EXPORTER_ENABLED to be present in ci-test.py settings file (#2161) 2023-06-12 09:43:05 -04:00
Matias Bordese
cc3c18c89c
Add instructions for prometheus exporter setup (#2103) 2023-06-12 13:04:07 +00:00
Joey Orlando
2d721355a4
update changelog 2023-06-12 14:56:53 +02:00
Joey Orlando
7ae4b7a1c6
Merge branch 'main' into dev 2023-06-12 14:55:12 +02:00