From db1b49c624d76d4f151df6f0aeae1853a6e72d47 Mon Sep 17 00:00:00 2001 From: Gosha Date: Mon, 10 Jul 2023 17:39:43 +0300 Subject: [PATCH] fix: retry and resumbit notifiction fix Signed-off-by: Gosha --- pkg/event_handler/main.go | 8 -------- pkg/webhook_handler/webhook_handler.go | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/pkg/event_handler/main.go b/pkg/event_handler/main.go index d4ce1a1b..7156cd24 100644 --- a/pkg/event_handler/main.go +++ b/pkg/event_handler/main.go @@ -2,7 +2,6 @@ package event_handler import ( "context" - "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1" "github.com/rookout/piper/pkg/clients" "github.com/rookout/piper/pkg/conf" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -14,13 +13,6 @@ func Start(ctx context.Context, stop context.CancelFunc, cfg *conf.GlobalConfig, MatchExpressions: []metav1.LabelSelectorRequirement{ {Key: "piper.rookout.com/notified", Operator: metav1.LabelSelectorOpExists}, - {Key: "piper.rookout.com/notified", - Operator: metav1.LabelSelectorOpNotIn, - Values: []string{ - string(v1alpha1.WorkflowSucceeded), - string(v1alpha1.WorkflowFailed), - string(v1alpha1.WorkflowError), - }}, // mean that there already completed and notified }, } watcher, err := clients.Workflows.Watch(&ctx, labelSelector) diff --git a/pkg/webhook_handler/webhook_handler.go b/pkg/webhook_handler/webhook_handler.go index 6d92436f..798919ef 100644 --- a/pkg/webhook_handler/webhook_handler.go +++ b/pkg/webhook_handler/webhook_handler.go @@ -44,7 +44,7 @@ func (wh *WebhookHandlerImpl) RegisterTriggers(ctx *context.Context) error { return fmt.Errorf("failed to get triggers content: %v", err) } - log.Printf("triggers content is: \n %s \n", *triggers.Content) + log.Printf("triggers content is: \n %s \n", *triggers.Content) // DEBUG err = yaml.Unmarshal([]byte(*triggers.Content), wh.Triggers) if err != nil {