Skip to content

Commit

Permalink
fixed app deletion events sometimes not being sent (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
roi-codefresh authored May 11, 2022
1 parent 2167dba commit 2b915fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.14-cap-CR-11584-fix-resource-cache
2.1.14-cap-CR-11708-send-app-deletion
5 changes: 5 additions & 0 deletions server/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,11 @@ func (s *Server) StartEventSource(es *events.EventSource, stream events.Eventing
func (s *Server) shouldSendApplicationEvent(ae *appv1.ApplicationWatchEvent) bool {
logCtx := log.WithField("application", ae.Application.Name)

if ae.Type == watch.Deleted {
logCtx.Info("application deleted")
return true
}

cachedApp, err := s.cache.GetLastApplicationEvent(&ae.Application)
if err != nil || cachedApp == nil {
return true
Expand Down

0 comments on commit 2b915fe

Please sign in to comment.