Skip to content

Commit

Permalink
feat: support creation of apps with empty dir
Browse files Browse the repository at this point in the history
  • Loading branch information
pasha-codefresh committed Dec 4, 2023
1 parent a858ad3 commit dede45e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion event_reporter/reporter/application_event_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,15 @@ func (r *applicationEventReporter) getDesiredManifests(ctx context.Context, a *a
})
if err != nil {
notManifestGenerationError := !strings.Contains(err.Error(), "Manifest generation error")

// we can ignore the error
notAppPathDoesntExistsError := !strings.Contains(err.Error(), "app path does not exist")

// when application deleted rbac also throws erorr with PermissionDenied
// we can ignore the error, as we check rbac access before reporting events
notPermissionDeniedError := !strings.Contains(err.Error(), "PermissionDenied")

if notManifestGenerationError && notPermissionDeniedError {
if notManifestGenerationError && notPermissionDeniedError && notAppPathDoesntExistsError {
return nil, fmt.Errorf("failed to get application desired state manifests: %w", err), false
}
// if it's manifest generation error we need to still report the actual state
Expand Down

0 comments on commit dede45e

Please sign in to comment.