Commit graph

28 commits

Author SHA1 Message Date
Vadim Stepanov
f83c5fca52
PD migrator: retry on network errors (#1650) 2023-03-28 16:57:37 +01:00
Vadim Stepanov
6d08955892
PD migrator: fix route order (#1570)
Fix a bug when it's not possible to migrate when there's non-sequential
event rule order (due to disabled event rules).
2023-03-17 17:03:53 +00:00
Vadim Stepanov
2bfe131591
PD migrator: ignore deleted services in event rules (#1569)
Update PD migrator to create routes with no escalation chain selected
for event rules referencing deleted services
2023-03-17 11:32:30 +00:00
Vadim Stepanov
f85f77dbc7
PD migrator: allow migrating inbound email integrations (#1566) 2023-03-16 19:25:00 +00:00
Vadim Stepanov
4aa4adfecb
PD migrator: add ability to migrate event rules (#1555)
# What this PR does
Adds an ability to migrate global event rulesets to OnCall integrations.

## Which issue(s) this PR fixes
Related to https://github.com/grafana/oncall/issues/1300
2023-03-16 14:58:21 +00:00
Vadim Stepanov
a194bdc72b
PD migrator: fix layer levels (#1455)
# What this PR does
Current implementation of PD migrator creates schedule layers with
priority levels starting from 0.
This PR makes so layers start from 1, so it's closer to original PD
schedules that are starting from 1.

## Checklist

- [x] Tests updated
2023-03-06 14:01:35 +00:00
Vadim Stepanov
c20229fefd
PD migrator: migrate overrides (#1454)
# What this PR does
Allows PD migrator to migrate overrides (the current implementation only
migrates rotation layers).
Also tweaks public API so created overrides are consistent with the web
UI.

## Checklist

- [x] Tests updated
2023-03-06 13:44:28 +00:00
Vadim Stepanov
10cf1055b1
PD migrator: create shifts in UTC timezone (#1411)
# What this PR does
Make PagerDuty migrator create shifts in UTC timezone when migrating web
schedules.

## Checklist

- [x] Tests updated
2023-02-24 15:05:10 +00:00
Vadim Stepanov
e2392988c8
PD migrator: handle deactivated users in PD when migrating schedules (#1407)
# What this PR does
Handle deactivated users in PD when migrating schedules using PD
migrator.

## Checklist

- [x] Tests updated
2023-02-24 11:12:10 +00:00
Vadim Stepanov
a2eed312f9
PD migrator: migrate on-call shifts using public API (#1317)
Allow PD migrator tool to migrate on-call shifts when migrating
schedules (currently it migrates schedules using PD ICal file):
https://github.com/grafana/oncall/issues/1283.

This PR will allow to select the mode of schedule migration via
`SCHEDULE_MIGRATION_MODE_WEB` env variable (`ical` or `web`). Due to
differences in the scheduling systems of PD and OnCall, it's not always
possible to migrate shifts automatically (migration plan will show any
schedules and layers that can't be migrated).

PD rotations that will be possible to migrate:
- Any rotation without restrictions ("restriction" is a PD term for
describing active periods for rotation)
- Daily rotations with daily restrictions
- Weekly rotations with weekly restrictions
- Some weekly rotations with daily restrictions
- Some daily rotations with weekly restrictions

There will be a separate PR to update the
[instruction](https://github.com/grafana/oncall/tree/dev/tools/pagerduty-migrator#readme)
since this one is pretty huge already.
2023-02-23 11:34:03 +00:00
Vadim Stepanov
e1cabea5ee
PD migrator: handle resource names with extra spaces (#1327)
# What this PR does
Currently PD migrator can fail with HTTP 400 error when dealing with PD
resource names like " Schedule" (note the extra space). This PR makes
sure that PD migrator script can handle such cases.
2023-02-15 17:31:30 +00:00
Vadim Stepanov
71c00d59bf
Improve PD migrator traceback on HTTP 400 (#1325)
# What this PR does
Improves PagerDuty migrator error traceback when getting HTTP 400 errors
from OnCall public API.
2023-02-15 11:37:07 +00:00
Vadim Stepanov
9230783104
PD migrator: fix case sensitivity issues (#1320)
# What this PR does
Fix case sensitivity issues for PD migrator when using MySQL
`utf8mb4_unicode_ci` collation.
This fixes a bug when the migrator tries to create a resource but fails
to do so because there is already a resource with the same name but
different capitalisation (e.g. migrating PD schedule with name "Test"
and there's already a schedule with name "test" in OnCall).

## Checklist

- [x] Tests updated
2023-02-14 12:25:44 +00:00
Vadim Stepanov
9503a77579
Fix "existing schedule will be deleted" message for PD migrator (#1076)
Resolves https://github.com/grafana/oncall/issues/1066
2023-01-04 17:36:15 +00:00
Vadim Stepanov
9ebf20c488
Make user matching by email case-insensitive for PD migrator (#1056)
https://github.com/grafana/oncall/issues/1025
2022-12-30 16:11:35 +00:00
Vadim Stepanov
1b67a8ec68
Add PD migrator lint & test steps to CI (#1053)
# What this PR does

- Add PD migrator related hooks to `.pre-commit-config.yaml`
- Add Github Actions step for running PD migrator tests
2022-12-30 16:03:39 +00:00
Gilberto Junior
f16c4b26c6
Increasing library default timeout (#1005)
# What this PR does

## Which issue(s) this PR fixes

Issues: https://github.com/grafana/oncall/issues/990

## Checklist

- [X] Tests updated
2022-12-16 13:09:04 +02:00
Joey Orlando
c08eeb72a3
add precommit rules for markdown/json files (#915)
* add markdownlint precommit steps + fix existing errors

* prettier json linting
2022-12-01 14:26:54 +01:00
Vadim Stepanov
41f8d4afb1
PD migrator: add support for email notifications (#839) 2022-11-11 13:40:43 +00:00
Vadim Stepanov
427c6c95c5
Edit docs for PagerDuty migrator scripts (#662)
* add docs on add_users_pagerduty_to_grafana.py

* spelling
2022-10-19 12:33:59 +01:00
Vadim Stepanov
b9c543b0e8
PagerDuty migrator minor improvements (#659)
* tolerate ONCALL_API_URL without trailing slash

* tolerate ONCALL_API_URL without trailing slash

* show vendor name if integration type is not supported

* isort

* black
2022-10-18 15:32:07 +01:00
Gilberto Junior
a7c37b2fba
Pagerduty migrator/add scripts (#403)
* Script to import users from pagerduty to Grafana

* Added README

* Update tools/pagerduty-migrator/scripts/README.md

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>

* Update tools/pagerduty-migrator/scripts/add_users_pagerduty_to_grafana.py

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>

* Update tools/pagerduty-migrator/scripts/add_users_pagerduty_to_grafana.py

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>

* Update tools/pagerduty-migrator/scripts/add_users_pagerduty_to_grafana.py

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>

* Update tools/pagerduty-migrator/scripts/add_users_pagerduty_to_grafana.py

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>

* Update tools/pagerduty-migrator/scripts/add_users_pagerduty_to_grafana.py

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>

* Adjusted script to follow project pattern

* Changed variable name.

* Guidance for running the script

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
2022-10-04 10:19:13 +01:00
Vadim Stepanov
e63374db19
Update README.md 2022-09-07 11:05:46 +01:00
Vadim Stepanov
b68dd9bc92
fix deleting the last notification rule for pagerduty migrator (#484) 2022-09-07 10:58:31 +01:00
Vadim Stepanov
315a356fda
Handle vendor = None for pagerduty migrator (#483) 2022-09-05 15:59:05 +01:00
Vadim Stepanov
cc477e2128
Fix default_route_id in PD migrator (#305) 2022-07-29 10:26:39 +01:00
Vadim Stepanov
2d4dca2659 Add PagerDuty migrator 2022-06-14 19:26:32 +03:00
Michael Derynck
6b40f95033 World, meet OnCall!
Co-authored-by: Eve832 <eve.meelan@grafana.com>
    Co-authored-by: Francisco Montes de Oca <nevermind89x@gmail.com>
    Co-authored-by: Ildar Iskhakov <ildar.iskhakov@grafana.com>
    Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com>
    Co-authored-by: Julia <ferril.darkdiver@gmail.com>
    Co-authored-by: maskin25 <kengurek@gmail.com>
    Co-authored-by: Matias Bordese <mbordese@gmail.com>
    Co-authored-by: Matvey Kukuy <motakuk@gmail.com>
    Co-authored-by: Michael Derynck <michael.derynck@grafana.com>
    Co-authored-by: Richard Hartmann <richih@richih.org>
    Co-authored-by: Robby Milo <robbymilo@fastmail.com>
    Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
    Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
    Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
2022-06-03 08:09:47 -06:00