Skip to content

Commit 2b915fe

Browse files
fixed app deletion events sometimes not being sent (#87)
1 parent 2167dba commit 2b915fe

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.14-cap-CR-11584-fix-resource-cache
1+
2.1.14-cap-CR-11708-send-app-deletion

server/application/application.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,11 @@ func (s *Server) StartEventSource(es *events.EventSource, stream events.Eventing
905905
func (s *Server) shouldSendApplicationEvent(ae *appv1.ApplicationWatchEvent) bool {
906906
logCtx := log.WithField("application", ae.Application.Name)
907907

908+
if ae.Type == watch.Deleted {
909+
logCtx.Info("application deleted")
910+
return true
911+
}
912+
908913
cachedApp, err := s.cache.GetLastApplicationEvent(&ae.Application)
909914
if err != nil || cachedApp == nil {
910915
return true

0 commit comments

Comments
 (0)