Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions pkg/crd/markers/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ limitations under the License.
package markers

import (
"cmp"
"encoding/json"
"fmt"
"math"
"slices"
"strings"

apiext "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand Down Expand Up @@ -659,11 +657,6 @@ func (m XValidation) ApplyToSchema(schema *apiext.JSONSchemaProps) error {
FieldPath: m.FieldPath,
OptionalOldSelf: m.OptionalOldSelf,
})
// Sort XValidations by rule to ensure deterministic output order.
// Markers are processed from a map with non-deterministic iteration order.
slices.SortFunc(schema.XValidations, func(a, b apiext.ValidationRule) int {
return cmp.Compare(a.Rule, b.Rule)
})
return nil
}

Expand Down