Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Failing Linter #1350

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion reposerver/repository/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,5 @@ func TestGetAppDetailsKustomize(t *testing.T) {
})
assert.NoError(t, err)
assert.Nil(t, res.Kustomize.Images)
assert.Equal(t, []*argoappv1.KustomizeImageTag{{"nginx", "1.15.4"}, {"k8s.gcr.io/nginx-slim", "0.8"}}, res.Kustomize.ImageTags)
assert.Equal(t, []*argoappv1.KustomizeImageTag{{Name: "nginx", Value: "1.15.4"}, {Name: "k8s.gcr.io/nginx-slim", Value: "0.8"}}, res.Kustomize.ImageTags)
}
12 changes: 5 additions & 7 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,12 @@ func RetryUntilSucceed(action func() error, desc string, ctx context.Context, ti
log.Infof("Completed %s", desc)
return
}
if err != nil {
if ctxCompleted {
log.Infof("Stop retrying %s", desc)
return
}
log.Warnf("Failed to %s: %+v, retrying in %v", desc, err, timeout)
time.Sleep(timeout)
if ctxCompleted {
log.Infof("Stop retrying %s", desc)
return
}
log.Warnf("Failed to %s: %+v, retrying in %v", desc, err, timeout)
time.Sleep(timeout)

}
}
Expand Down