Peter Bacsko created YUNIKORN-1807: -------------------------------------- Summary: Remove error check from createEventRecord() Key: YUNIKORN-1807 URL: https://issues.apache.org/jira/browse/YUNIKORN-1807 Project: Apache YuniKorn Issue Type: Sub-task Components: core - scheduler Reporter: Peter Bacsko
Currently, {{createEventRecord()}} performs an error check: {noformat} if objectID == "" { return nil, fmt.Errorf("objectID should not be nil") } if reason == "" { return nil, fmt.Errorf("reason should not be nil") } {noformat} These error checks are not necessary. Everything is in our hands here, the two strings are not user-supplied input. We'll have tons of tests, both unit and e2e, such defensive coding is not needed. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@yunikorn.apache.org For additional commands, e-mail: issues-h...@yunikorn.apache.org