Skip to content

Commit

Permalink
Retry on Webhook EOF Errors
Browse files Browse the repository at this point in the history
Mitigation for knative/pkg#1509.

Same fix was used in eventing core to mitigate webhook EOF
errors.

Signed-off-by: Pierangelo Di Pilato <[email protected]>
  • Loading branch information
pierDipi committed Nov 10, 2021
1 parent e696b90 commit 39c994f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/lib/creation.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,11 @@ func UpdateKafkaSourceV1Beta1OrFail(c *testlib.Client, kafkaSource *sourcesv1bet
return retry.RetryOnConflict(retry.DefaultRetry, func() error {
latestKafkaSource := GetKafkaSourceV1Beta1OrFail(c, kafkaSource.Name)
kafkaSource.Spec.DeepCopyInto(&latestKafkaSource.Spec)
kafkaSourceClientSet, err := kafkaclientset.NewForConfig(c.Config)
client, err := kafkaclientset.NewForConfig(c.Config)
if err != nil {
c.T.Fatalf("Failed to create v1beta1 KafkaSource client: %v", err)
}

kSources := kafkaSourceClientSet.SourcesV1beta1().KafkaSources(c.Namespace)
_, err = kSources.Update(context.Background(), latestKafkaSource, metav1.UpdateOptions{})
_, err = client.SourcesV1beta1().KafkaSources(c.Namespace).Update(context.Background(), latestKafkaSource, metav1.UpdateOptions{})
return err
})
})
Expand Down

0 comments on commit 39c994f

Please sign in to comment.