Skip to content

Commit

Permalink
remove sorting of eventpolicies
Browse files Browse the repository at this point in the history
Signed-off-by: rahulii <[email protected]>
  • Loading branch information
rahulii committed Aug 9, 2024
1 parent f567e0c commit 0bd3e69
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/reconciler/parallel/parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package parallel
import (
"context"
"fmt"
"sort"

"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -470,11 +469,6 @@ func (r *Reconciler) prepareIngressChannelEventpolicies(p *v1.Parallel, ingressC
return nil, nil
}

// sort the event policies by name to ensure deterministic order.
sort.Slice(applyingEventPoliciesForParallel, func(i, j int) bool {
return applyingEventPoliciesForParallel[i].Name < applyingEventPoliciesForParallel[j].Name
})

ingressChannelEventPolicies := make([]*eventingv1alpha1.EventPolicy, 0, len(applyingEventPoliciesForParallel))
for _, eventPolicy := range applyingEventPoliciesForParallel {
ingressChannelEventPolicies = append(ingressChannelEventPolicies, resources.MakeEventPolicyForParallelIngressChannel(p, ingressChannel, eventPolicy))
Expand Down

0 comments on commit 0bd3e69

Please sign in to comment.