mirror of https://github.com/grafana/grafana.git
[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:
parent
c6ebb91eb1
commit
2dc0628b3d
|
@ -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 |
|
||||||
|
|
|
@ -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},
|
||||||
}
|
}
|
||||||
|
|
|
@ -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))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue