Show warning that --yolo, --concurrency and --rpp fields are valid for executortype poolmgr only (#2971)
* yolo, concurrency and rpp are specifically introduced for executortype poolmgr ``` Show warning if these fields are used with other executortype. Update CLI with this information. ``` Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> * Add warning for fn update too Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> * Show warning while updating `--yolo`, `--con` and `--rpp` to an already created newdeploy function. Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> * Fixed a minor bug Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> * Optmize and increase code readability Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> * Rename function to checkExecutorPoolManager Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> --------- Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
@@ -154,6 +154,11 @@ func (opts *UpdateSubCommand) complete(input cli.Input) error {
|
||||
function.Spec.IdleTimeout = &fnTimeout
|
||||
}
|
||||
|
||||
err = checkExecutorPoolManager(input, function.Spec.InvokeStrategy.ExecutionStrategy.ExecutorType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if input.IsSet(flagkey.FnConcurrency) {
|
||||
function.Spec.Concurrency = input.Int(flagkey.FnConcurrency)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user