Skip to content

Commit

Permalink
Fix two "bad conflict resolution" issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Oded-B committed Jun 12, 2024
1 parent 0c25bc9 commit b35fdff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/pkg/argocd/argocd.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,8 @@ func findArgocdAppBySHA1Label(ctx context.Context, componentPath string, repo st
}
foundApps, err := appIf.List(ctx, &appLabelQuery)
if err != nil {
log.Errorf("Error listing ArgoCD applications: %v", err)
componentDiffResult.DiffError = err
return componentDiffResult
return nil, fmt.Errorf("Error listing ArgoCD applications: %v", err)

}

Check failure on line 177 in internal/pkg/argocd/argocd.go

View workflow job for this annotation

GitHub Actions / golangci-lint

unnecessary trailing newline (whitespace)
if len(foundApps.Items) == 0 {
return nil, fmt.Errorf("No ArgoCD application found for component path sha1 %s(repo %s), used this label selector: %s", componentPathSha1, repo, labelSelector)
Expand Down Expand Up @@ -245,7 +244,7 @@ func generateDiffOfAComponent(ctx context.Context, componentPath string, prBranc
return componentDiffResult
}

log.Debugf("Found ArgoCD application: %s", foundApps.Items[0].Name)
log.Debugf("Found ArgoCD application: %s", foundApp.Name)
// Get the application and its resources, resources are the live state of the application objects.
// The 2nd "app fetch" is needed for the "refreshTypeHArd", we don't want to do that to non-relevant apps"
refreshType := string(argoappv1.RefreshTypeHard)
Expand Down

0 comments on commit b35fdff

Please sign in to comment.