Skip to content

Commit

Permalink
update runRolloutWebhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
tyagian committed Sep 10, 2023
1 parent 3d7f523 commit 4c34c09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ func (c *Controller) advanceCanary(name string, namespace string) {
return
}
} else {
c.runRolloutWebhooks(cd);
if ok := c.runAnalysis(cd); !ok {
if err := canaryController.SetStatusFailedChecks(cd, cd.Status.FailedChecks+1); err != nil {
c.recordEventWarningf(cd, "%v", err)
Expand Down Expand Up @@ -754,11 +755,9 @@ func (c *Controller) runRolloutWebhooks(canary *flaggerv1.Canary,retryLimit int)
if webhook.Type == "" || webhook.Type == flaggerv1.RolloutHook {
if canary.Status.WebhookRetries >= retryLimit {
c.recordEventWarningf(canary, "Retries exceeded limit for webhook %s", webhook.Name)
c.recordEventWarningf(canary, "Halt %s.%s advancement external check %s failed %v",canary.Name, canary.Namespace, webhook.Name, err)
return false
}
if err := CallWebhook(canary.Name, canary.Namespace, flaggerv1.CanaryPhaseProgressing, webhook); if err != nil {

Check failure on line 760 in pkg/controller/scheduler.go

View workflow job for this annotation

GitHub Actions / build-flagger

expected operand, found 'if'
c.recordEventWarningf(canary, "Retrying: %s.%s advancement external check %s failed %v",canary.Name, canary.Namespace, webhook.Name, err)
canary.Status.WebhookRetries++

Check failure on line 761 in pkg/controller/scheduler.go

View workflow job for this annotation

GitHub Actions / build-flagger

missing ',' in composite literal
return false

Check failure on line 762 in pkg/controller/scheduler.go

View workflow job for this annotation

GitHub Actions / build-flagger

missing ',' in composite literal
}
Expand Down

0 comments on commit 4c34c09

Please sign in to comment.