Skip to content

Commit

Permalink
fix: handle empty desired state
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-codefresh committed Nov 8, 2023
1 parent 12dd9b2 commit b3591f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.1-cap-CR-20837
2.8.1-cap-CR-21280-empty-desired-state
3 changes: 3 additions & 0 deletions server/application/application_event_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,9 @@ func (s *applicationEventReporter) getApplicationEventPayload(
}

func getResourceDesiredState(rs *appv1.ResourceStatus, ds *apiclient.ManifestResponse, logger *log.Entry) *apiclient.Manifest {
if ds == nil {
return &apiclient.Manifest{}
}
for _, m := range ds.Manifests {
u, err := appv1.UnmarshalToUnstructured(m.CompiledManifest)
if err != nil {
Expand Down

0 comments on commit b3591f4

Please sign in to comment.