ryankert01 opened a new pull request, #850: URL: https://github.com/apache/yunikorn-core/pull/850
### What is this PR for? This [conditional](https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/resources.go#L98) is not used because intValue will never be negative, since it's before filtered by [regular expression](https://github.com/apache/yunikorn-core/blob/55e9fe650760bdf30d27a7ecf85b34d5f96c492f/pkg/common/resources/quantity.go#L38). ```go if intValue < 0 { return nil, fmt.Errorf("negative resources not permitted: %v", configMap) } ``` 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. ### What type of PR is it? * [ ] - Bug Fix * [x] - Improvement * [ ] - Feature * [ ] - Documentation * [ ] - Hot Fix * [ ] - Refactoring ### Todos * [ ] - Task ### What is the Jira issue? https://issues.apache.org/jira/browse/YUNIKORN-2572 ### How should this be tested? ```sh make test ``` ### Screenshots (if appropriate) ### Questions: N/A -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
