Alerting: Support optimistic concurrency in notification policies service (#93932)
* update notification policy provisioning service to support optimistic concurrency * rewrite tests and include concurrency tests
This commit is contained in:
@@ -32,7 +32,7 @@ func (c *defaultNotificationPolicyProvisioner) Provision(ctx context.Context,
|
||||
for _, file := range files {
|
||||
for _, np := range file.Policies {
|
||||
err := c.notificationPolicyService.UpdatePolicyTree(ctx, np.OrgID,
|
||||
np.Policy, models.ProvenanceFile)
|
||||
np.Policy, models.ProvenanceFile, "")
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: %w", file.Filename, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user