Skip to content

Commit

Permalink
fixed cache bug (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
roi-codefresh authored Jan 4, 2022
1 parent 8d9c86f commit 2270d83
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,14 @@ func (s *Server) shouldSendApplicationEvent(ae *appv1.ApplicationWatchEvent) boo
return true
}

cachedApp.Status.ReconciledAt = ae.Application.Status.ReconciledAt // ignore this diff
cachedApp.Status.ReconciledAt = ae.Application.Status.ReconciledAt // ignore those in the diff
cachedApp.Spec.Project = ae.Application.Spec.Project //
for i := range cachedApp.Status.Conditions {
cachedApp.Status.Conditions[i].LastTransitionTime = nil
}
for i := range ae.Application.Status.Conditions {
ae.Application.Status.Conditions[i].LastTransitionTime = nil
}

cachedAppSpec, err := json.Marshal(&cachedApp.Spec)
if err != nil {
Expand Down

0 comments on commit 2270d83

Please sign in to comment.