[release-12.0.3] CloudMigrations: Add Mute Timings as dependency for Notification Policies (#106884)

CloudMigrations: Add Mute Timings as dependency for Notification Policies (#106751)

(cherry picked from commit db845ed8de)

Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
This commit is contained in:
grafana-delivery-bot[bot] 2025-06-18 13:02:55 +02:00 committed by GitHub
parent c6ebb91eb1
commit 2dc0628b3d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -114,7 +114,7 @@ After connecting to the cloud stack, this is the empty state of the migration as
| Folders | Nothing else | | Folders | Nothing else |
| All Alert rule groups | All other resources | | All Alert rule groups | All other resources |
| Alert Rules | <ul><li>Dashboards</li> <li>Library Elements</li> <li>Data Sources</li> <li>Plugins</li> <li>Folders</li> <li>Notification Policies</li> <li>Notification Templates</li> <li>Contact Points</li> <li>Mute Timings</li></ul> | | Alert Rules | <ul><li>Dashboards</li> <li>Library Elements</li> <li>Data Sources</li> <li>Plugins</li> <li>Folders</li> <li>Notification Policies</li> <li>Notification Templates</li> <li>Contact Points</li> <li>Mute Timings</li></ul> |
| Notification Policies | <ul><li>Notification Templates</li> <li>Contact Points</li></ul> | | Notification Policies | <ul><li>Notification Templates</li> <li>Contact Points</li> <li>Mute Timings</li></ul> |
| Notification Templates | Nothing else | | Notification Templates | Nothing else |
| Contact Points | Notification Templates | | Contact Points | Notification Templates |
| Mute Timings | Nothing else | | Mute Timings | Nothing else |

View File

@ -24,7 +24,7 @@ var ResourceDependency = DependencyMap{
MuteTimingType: nil, MuteTimingType: nil,
NotificationTemplateType: nil, NotificationTemplateType: nil,
ContactPointType: {NotificationTemplateType}, ContactPointType: {NotificationTemplateType},
NotificationPolicyType: {ContactPointType}, NotificationPolicyType: {ContactPointType, MuteTimingType},
AlertRuleType: {DatasourceDataType, FolderDataType, DashboardDataType, MuteTimingType, ContactPointType, NotificationPolicyType}, AlertRuleType: {DatasourceDataType, FolderDataType, DashboardDataType, MuteTimingType, ContactPointType, NotificationPolicyType},
AlertRuleGroupType: {AlertRuleType}, AlertRuleGroupType: {AlertRuleType},
} }

View File

@ -144,10 +144,11 @@ func TestResourceDependencyParse(t *testing.T) {
NotificationPolicyType, NotificationPolicyType,
ContactPointType, ContactPointType,
NotificationTemplateType, NotificationTemplateType,
MuteTimingType,
} }
result, err := ResourceDependency.Parse(input) result, err := ResourceDependency.Parse(input)
require.NoError(t, err) require.NoError(t, err)
require.Len(t, result, 3) require.Len(t, result, len(input))
}) })
}) })