You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Peter Bacsko (Jira)" <ji...@apache.org> on 2023/06/10 07:16:00 UTC
[jira] [Created] (YUNIKORN-1807) Remove error check from createEventRecord()
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: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org