Skip to content

Commit

Permalink
fix: retry and resumbit notifiction fix (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Gosha <[email protected]>
  • Loading branch information
gosharo authored Jul 11, 2023
1 parent 4c5f6fd commit 4d6c815
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions pkg/event_handler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/webhook_handler/webhook_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4d6c815

Please sign in to comment.