Closed shashank-iitbhu closed 3 months ago
ParameterType
and DistributionType
can be made exclusive using this logic
// Check that only one of ParameterType or DistributionType is specified
if (param.ParameterType != "" && param.DistributionType != "") ||
(param.ParameterType == "" && param.DistributionType == "") {
allErrs = append(allErrs, field.Invalid(parametersPath.Index(i).Child("parameterType"),
param.ParameterType, "either parameterType or distributionType must be specified, but not both"))
}
cc @andreyvelich @tenzen-y
/area gsoc
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: tenzen-y
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What this PR does / why we need it:
DistributionType
toParameterSpec
inpkg/apis/controller/experiments/v1beta1/experiment_types.go
.DistributionType
.Which issue(s) this PR fixes _(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged)_: Fixes #2374Checklist: