-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PagerDuty Migrator: Add filtering capabilities and fix user notification rule preservation #5454
Open
joeyorlando
wants to merge
8
commits into
main
Choose a base branch
from
jorlando/pagerduty-migrator-improvements
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+745
−101
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add filtering by team, users, and regex patterns for schedules, escalation policies, and integrations - Fix notification policy preservation behavior - Add comprehensive test coverage for new features
- Add filter_schedules, filter_escalation_policies, and filter_integrations functions - Add comprehensive test coverage for filtering functionality - Add dedicated notification rules tests
- Fix notification rules preservation behavior - Add dedicated test file for notification rules - Improve test coverage for notification policy scenarios
joeyorlando
commented
Feb 14, 2025
@@ -20,6 +20,7 @@ | |||
"Zabbix Webhook (for 5.0 and 5.2)": "zabbix", | |||
"Elastic Alerts": "elastalert", | |||
"Firebase": "fabric", | |||
"Amazon CloudWatch": "amazon_sns", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a request to map Amazon CloudWatch Integration in PagerDuty to our Amazon SNS Integration (apparently these are essentially the same thing?)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds filtering capabilities to the PagerDuty migrator tool and fixes user notification rule preservation behavior.
Closes https://github.com/grafana/irm/issues/612
Changes
1. Added Resource Filtering
Added the ability to filter PagerDuty resources during migration based on:
New environment variables for filtering:
Example Usage
Filter by team:
Filter by specific users:
Filter schedules by name pattern:
Filter escalation policies by name pattern:
Filter integrations by name pattern:
2. Fixed User Notification Rule Preservation
Introduces a
PRESERVE_EXISTING_USER_NOTIFICATION_RULES
config (default oftrue
). The migrator now:PRESERVE_EXISTING_USER_NOTIFICATION_RULES
is TruePRESERVE_EXISTING_USER_NOTIFICATION_RULES
is FalseExample Usage
Preserve existing notification policies (default):
Replace existing notification policies:
3. Improved Testing
Added comprehensive test coverage for filtering functionality and updated user notification rule preservation tests
Testing Done