@@ -1055,11 +1055,11 @@ func (s *Server) streamApplicationEvents(
10551055 actualState = & application.ApplicationResourceResponse {Manifest : "" }
10561056 }
10571057
1058+ var mr * apiclient.ManifestResponse = desiredManifests
10581059 if isApp (rs ) {
10591060 app := & v1alpha1.Application {}
1060- err = json .Unmarshal ([]byte (actualState .Manifest ), app )
1061- if err != nil {
1062- logWithAppStatus (a , logCtx , ts ).WithError (err ).Error ("failed to get resource desired manifest" )
1061+ if err := json .Unmarshal ([]byte (actualState .Manifest ), app ); err != nil {
1062+ logWithAppStatus (a , logCtx , ts ).WithError (err ).Error ("failed to unmarshal child application resource" )
10631063 }
10641064 resourceDesiredManifests , err := s .GetManifests (ctx , & application.ApplicationManifestQuery {
10651065 Name : & rs .Name ,
@@ -1068,11 +1068,11 @@ func (s *Server) streamApplicationEvents(
10681068 if err != nil {
10691069 logWithAppStatus (a , logCtx , ts ).WithError (err ).Error ("failed to get resource desired manifest" )
10701070 } else {
1071- desiredManifests = resourceDesiredManifests
1071+ mr = resourceDesiredManifests
10721072 }
10731073 }
10741074
1075- ev , err := getResourceEventPayload (a , & rs , es , actualState , desiredState , desiredManifests , appTree , manifestGenErr , ts )
1075+ ev , err := getResourceEventPayload (a , & rs , es , actualState , desiredState , mr , appTree , manifestGenErr , ts )
10761076 if err != nil {
10771077 logCtx .WithError (err ).Error ("failed to get event payload" )
10781078 continue
0 commit comments