[
https://issues.apache.org/jira/browse/YUNIKORN-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hsien-Cheng(Ryan) Huang updated YUNIKORN-2572:
----------------------------------------------
Description:
look into this [conditional:|#L98].]
~if intValue < 0 {~
~return nil, fmt.Errorf("negative resources not permitted: %v",
configMap)~
This will never be used because regrex defined [here. not including
"-".|https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L38]
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]
was:
look into this [conditional:|#L98].]
~if intValue < 0 {~
~return nil, fmt.Errorf("negative resources not permitted: %v",
configMap)~
This will never be used because regrex defined [here. not including
"-".|https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L38]
Thus, it will never omit error about negative resource.
> 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
> Fix For: 1.5.0
>
>
> look into this [conditional:|#L98].]
> ~if intValue < 0 {~
> ~return nil, fmt.Errorf("negative resources not permitted: %v",
> configMap)~
> This will never be used because regrex defined [here. not including
> "-".|https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L38]
> 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]