oncall-engine/tools/migrators/lib
Joey Orlando 4c72781d6d
feat: enhance PagerDuty migrator filtering + and improve user migration operations (#5471)
## Summary of Changes

### Improved Filtering Logic
- Changed filtering logic to use OR operations between filter types
(team, users, regex)
- Resources matching ANY filter are now included in the migration
- Made filtering more intuitive and aligned with user expectations

### New `PAGERDUTY_FILTER_USERS` option for `add_users_to_grafana.py`
script
- This new config (environment variable) allows importing only a subset
of users from your PagerDuty instance.
- Added full test coverage for `add_users_to_grafana.py`
- Updated documentation to reflect latest changes

### Added Verbose Logging Option
- Added `PAGERDUTY_VERBOSE_LOGGING` environment variable to control
output verbosity
- When disabled, only shows summary counts without detailed per-resource
output
- Significantly reduces output for large PagerDuty instances

### Fixed User Handling
- Properly skips user fetching and processing when `MIGRATE_USERS=false`
- Marks schedules and escalation policies properly when not migrating
users
- When `MIGRATE_USERS=true` and `PAGERDUTY_FILTER_USERS` is set, only
those specific users are migrated

### Added Migration Progress Summary
- Shows counts of filtered resources and those eligible for migration
- Provides better visibility into the migration process

### Updated Tests
- Added comprehensive tests for the new OR-based filtering logic
- Added tests for user filtering
- Added tests for verbose and non-verbose logging modes

### Updated Documentation
- Clearly documented the new filtering behavior
- Explained the verbose logging option
- Updated configuration descriptions to be more accurate

These changes address issues with filtering behavior and user handling,
making the PagerDuty migrator more intuitive, efficient, and flexible.
2025-03-17 08:04:05 -04:00
..
common Service to service model migration (#5485) 2025-03-15 21:07:59 -04:00
grafana Service to service model migration (#5485) 2025-03-15 21:07:59 -04:00
oncall Service to service model migration (#5485) 2025-03-15 21:07:59 -04:00
pagerduty feat: enhance PagerDuty migrator filtering + and improve user migration operations (#5471) 2025-03-17 08:04:05 -04:00
splunk Splunk OnCall migration tool (#4267) 2024-05-14 13:53:59 +00:00
tests feat: enhance PagerDuty migrator filtering + and improve user migration operations (#5471) 2025-03-17 08:04:05 -04:00
__init__.py Splunk OnCall migration tool (#4267) 2024-05-14 13:53:59 +00:00
base_config.py Service to service model migration (#5485) 2025-03-15 21:07:59 -04:00
network.py migration scripts: add missing arg in recursive call (#4883) 2024-08-21 08:43:29 -04:00
utils.py Splunk OnCall migration tool (#4267) 2024-05-14 13:53:59 +00:00