// IsStageFailed returns true if at least one app is failed in the given stage
IsStageFailed returns true if at least one app is failed in the given stage
// IsStageFailed returns true if at least one app is failed in the given stage
func IsStageFailed(apps []argov1alpha1.Application, stage syncv1alpha1.ProgressiveSyncStage, pss utils.ProgressiveSyncState) bool {
	if apps == nil {
		return false
	}
	degradedApps := utils.GetAppsByHealthStatusCode(apps, health.HealthStatusDegraded)
	degradedSyncedApps := utils.GetSyncedAppsByStage(degradedApps, stage, pss)
	return len(degradedSyncedApps) > 0
}
func IsStageFailed ( apps [ ] argov1alpha1 . Application , stage syncv1alpha1 . ProgressiveSyncStage , pss utils . ProgressiveSyncState ) bool { if apps == nil { return false } degradedApps := utils . GetAppsByHealthStatusCode ( apps , health . HealthStatusDegraded ) degradedSyncedApps := utils . GetSyncedAppsByStage ( degradedApps , stage , pss ) return len ( degradedSyncedApps ) > 0 }
IsStageFailed returns true if at least one app is failed in the given stage
IsStageFailed returns true if at least one app is failed in the given stage
// A stage is failed if any of its applications has: // - its Health Status Code == Degraded // - its Sync Status Code == Synced