[ 
https://issues.apache.org/jira/browse/YUNIKORN-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yu-Lin Chen resolved YUNIKORN-2572.
-----------------------------------
    Fix Version/s: 1.6.0
       Resolution: Fixed

Merge to master.

> remove un-used conditional
> --------------------------
>
>                 Key: YUNIKORN-2572
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2572
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: core - common
>            Reporter: Hsien-Cheng(Ryan) Huang
>            Assignee: Hsien-Cheng(Ryan) Huang
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.6.0
>
>
> look into this 
> [conditional:|https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/resources.go#L98]
> {code:go}
> if intValue < 0 {
>             return nil, fmt.Errorf("negative resources not permitted: %v", 
> configMap)
> }
> {code}
> This will never be used because regrex defined 
> [here|https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L38].
>  not including "-" as a starting char
> Thus, it will never omit error about negative resource, instead it will raise 
> invalid quantity error at 
> [https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L74]
>  .



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to