Skip to content

Commit

Permalink
individual step runner updates
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Rancourt <kent.rancourt@gmail.com>
  • Loading branch information
krancour committed Dec 5, 2024
1 parent 821fd87 commit 139c3de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 9 additions & 3 deletions internal/directives/argocd_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

kargoapi "github.com/akuity/kargo/api/v1alpha1"
Expand Down Expand Up @@ -125,9 +126,14 @@ func (a *argocdUpdater) Name() string {
return "argocd-update"
}

// DefaultAttempts implements the RetryableStepRunner interface.
func (a *argocdUpdater) DefaultAttempts() int64 {
return -1
// DefaultTimeout implements the RetryableStepRunner interface.
func (a *argocdUpdater) DefaultTimeout() *time.Duration {
return ptr.To(5 * time.Minute)
}

// DefaultErrorThreshold implements the RetryableStepRunner interface.
func (a *argocdUpdater) DefaultErrorThreshold() uint32 {
return 0 // Will fall back to the system default.
}

// RunPromotionStep implements the PromotionStepRunner interface.
Expand Down
5 changes: 0 additions & 5 deletions internal/directives/git_pr_waiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ func (g *gitPRWaiter) Name() string {
return "git-wait-for-pr"
}

// DefaultAttempts implements the RetryableStepRunner interface.
func (g *gitPRWaiter) DefaultAttempts() int64 {
return -1
}

// RunPromotionStep implements the PromotionStepRunner interface.
func (g *gitPRWaiter) RunPromotionStep(
ctx context.Context,
Expand Down

0 comments on commit 139c3de

Please sign in to comment.