@@ -110,7 +110,7 @@ func (s skew) String() string {
110
110
return fmt .Sprintf ("%s/%s has invalid %s properties: %s" , s .namespace , s .name , MaxOpenShiftVersionProperty , s .err )
111
111
}
112
112
113
- return fmt .Sprintf ("%s/%s is incompatible with OpenShift versions greater than %s" , s .namespace , s .name , s .maxOpenShiftVersion )
113
+ return fmt .Sprintf ("%s/%s is incompatible with OpenShift minor versions greater than %s" , s .namespace , s .name , s .maxOpenShiftVersion )
114
114
}
115
115
116
116
type transientError struct {
@@ -161,7 +161,8 @@ func incompatibleOperators(ctx context.Context, cli client.Client) (skews, error
161
161
if max == nil || max .GTE (* next ) {
162
162
continue
163
163
}
164
- s .maxOpenShiftVersion = max .String ()
164
+
165
+ s .maxOpenShiftVersion = semver.Version {Major : max .Major , Minor : max .Minor }.String ()
165
166
166
167
incompatible = append (incompatible , s )
167
168
}
@@ -234,7 +235,11 @@ func maxOpenShiftVersion(csv *operatorsv1alpha1.ClusterServiceVersion) (*semver.
234
235
return nil , fmt .Errorf (`Failed to parse "%s" as semver: %w` , value , err )
235
236
}
236
237
237
- return & version , nil
238
+ truncatedVersion := semver.Version {Major : version .Major , Minor : version .Minor }
239
+ if ! version .EQ (truncatedVersion ) {
240
+ return nil , fmt .Errorf ("property %s must specify only <major>.<minor> version, got invalid value %s" , MaxOpenShiftVersionProperty , version )
241
+ }
242
+ return & truncatedVersion , nil
238
243
}
239
244
240
245
func notCopiedSelector () (labels.Selector , error ) {
0 commit comments