You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2020/05/28 04:47:00 UTC

[jira] [Commented] (YUNIKORN-186) clean up events in k8shim

    [ https://issues.apache.org/jira/browse/YUNIKORN-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17118314#comment-17118314 ] 

Wilfred Spiegelenburg commented on YUNIKORN-186:
------------------------------------------------

In YUNIKORN-185 a number of unit tests were added and later removed because they were giving race conditions.
After the refactor similar tests must be added to the code base. The race condition was most likely due to inconsistent locking and accessing fields of unlocked object ({{string()}} functions?)

> clean up events in k8shim
> -------------------------
>
>                 Key: YUNIKORN-186
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-186
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: shim - kubernetes
>            Reporter: Wilfred Spiegelenburg
>            Priority: Minor
>
> The events in the shim use a complex structure with functions declared. However one of the functions is hardcoded to always return nil, one is used to pass a the ID of the object it is called on around which we can also get in the handler and the last one is to get the wrapped event. The event can be simplified a lot.
> The state machine and events are declared in separate files. They should be moved into one file to show the dependency between the two and make sure they are aligned.
> States are maintained disconnected from the state machine and events. State, events and the state machine should all be in the same location
> We can simplify this structure similar to what we use in the core:
> - no large object passed around
> - make the event type an int, implement using an iota
> - implement a string() function on the state and type
> - split the state type into a state per object and not one global list



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org