Skip to content

Commit

Permalink
Add more error notification at fail points
Browse files Browse the repository at this point in the history
Signed-off-by: bowenlan-amzn <[email protected]>
  • Loading branch information
bowenlan-amzn committed Oct 11, 2023
1 parent 3ddd75a commit f0c2c67
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ object ManagedIndexRunner :
)
if (result.metadataSaved) {
disableManagedIndexConfig(managedIndexConfig)
publishErrorNotification(policy, managedIndexMetaData)
}
return
}
Expand All @@ -330,7 +331,10 @@ object ManagedIndexRunner :
managedIndexMetaData
.copy(actionMetaData = currentActionMetaData?.copy(failed = true), info = info)
)
if (updated.metadataSaved) disableManagedIndexConfig(managedIndexConfig)
if (updated.metadataSaved) {
disableManagedIndexConfig(managedIndexConfig)
publishErrorNotification(policy, managedIndexMetaData)
}
return
}

Expand All @@ -356,7 +360,10 @@ object ManagedIndexRunner :
policyRetryInfo = PolicyRetryInfoMetaData(true, 0), info = info
)
)
if (updated.metadataSaved) disableManagedIndexConfig(managedIndexConfig)
if (updated.metadataSaved) {
disableManagedIndexConfig(managedIndexConfig)
publishErrorNotification(policy, managedIndexMetaData)
}
return
}
}
Expand All @@ -370,7 +377,10 @@ object ManagedIndexRunner :
policyRetryInfo = PolicyRetryInfoMetaData(true, 0), info = info
)
)
if (updated.metadataSaved) disableManagedIndexConfig(managedIndexConfig)
if (updated.metadataSaved) {
disableManagedIndexConfig(managedIndexConfig)
publishErrorNotification(policy, managedIndexMetaData)
}
return
}

Expand All @@ -383,7 +393,10 @@ object ManagedIndexRunner :
policyRetryInfo = PolicyRetryInfoMetaData(true, 0), info = info
)
)
if (updated.metadataSaved) disableManagedIndexConfig(managedIndexConfig)
if (updated.metadataSaved) {
disableManagedIndexConfig(managedIndexConfig)
publishErrorNotification(policy, managedIndexMetaData)
}
return
}

Expand Down

0 comments on commit f0c2c67

Please sign in to comment.