Add regression test for the recent lost runners.

This commit is contained in:
Maximilian Paß
2023-09-17 17:58:09 +02:00
committed by Sebastian Serth
parent 39fc0f9d9d
commit 788cb0f660
2 changed files with 109 additions and 35 deletions

View File

@@ -390,10 +390,10 @@ func filterDuplicateEvents(alloc *nomadApi.Allocation, allocations storage.Stora
return true
case !ok:
// This case happens in case of an error or when an event that led to the deletion of the alloc data is duplicated.
log.WithField("alloc", alloc).Debug("Ignoring unknown allocation")
log.WithField("allocID", alloc.ID).Debug("Ignoring unknown allocation")
return false
case alloc.ClientStatus == allocData.allocClientStatus && alloc.DesiredStatus == allocData.allocDesiredStatus:
log.WithField("alloc", alloc).Debug("Ignoring duplicate event")
log.WithField("allocID", alloc.ID).Debug("Ignoring duplicate event")
return false
default:
return true