[ https://issues.apache.org/jira/browse/YUNIKORN-1807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Bacsko updated YUNIKORN-1807: ----------------------------------- Target Version: 1.4.0 > 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 > Assignee: Peter Bacsko > Priority: Major > > 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 classic 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