You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Craig Condit (Jira)" <ji...@apache.org> on 2023/05/11 20:47:00 UTC

[jira] [Resolved] (YUNIKORN-1653) Use enum instead of defined values for tri-state

     [ https://issues.apache.org/jira/browse/YUNIKORN-1653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Craig Condit resolved YUNIKORN-1653.
------------------------------------
    Fix Version/s: 1.3.0
       Resolution: Fixed

Merged to master. Thanks [~samhxwu] for the contribution!

> Use enum instead of defined values for tri-state
> ------------------------------------------------
>
>                 Key: YUNIKORN-1653
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1653
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: shim - kubernetes
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Wu hsuang zong
>            Priority: Major
>              Labels: newbie, pull-request-available
>             Fix For: 1.3.0
>
>
> In the admission controller we have a tri-state that uses an integer as the underlying values. We should move to a iota that represents the same three values for clarity:
> {code:java}
> type triState int
> const (
>    UNSET triState = iota - 1
>    FALSE
>    TRUE
> ) {code}
> Replace all the coded values with the triState values, store the triState and return it from function calls.



--
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