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/21 09:34:00 UTC

[jira] [Updated] (YUNIKORN-24) UT compatibility issue with GO 1.13.x

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

Wilfred Spiegelenburg updated YUNIKORN-24:
------------------------------------------
    Priority: Minor  (was: Major)

> UT compatibility issue with GO 1.13.x
> -------------------------------------
>
>                 Key: YUNIKORN-24
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-24
>             Project: Apache YuniKorn
>          Issue Type: Test
>          Components: test - unit
>            Reporter: Wilfred Spiegelenburg
>            Priority: Minor
>
> UT starts to fail on flag after upgrade GO to 1.13.x.
> This seems to be caused by us relying on undefined behaviour and fixes in the go language.
> Calling {{flag.Parse()}} in an init is considered an incorrect behaviour.
> This is part of the 1.13 release notes: [https://tip.golang.org/doc/go1.13#testing]
> We currently call {{flag.Parse()}} in the init of the {{SchedulerConf}} which we need to change.
>  * not to use {{init()}} functions, the cost of convenience is some un-expected behaviors like this. 
>  * remove these init functions and replace them with {{sync.once}}
> {{init()}} functions could be problematic. However it is simpler than having to check in each location that the package is initialised. Using {{sync.once}} could add overhead or wrapping which we do not need. I think we need to look at a combination of the two: {{init()}} when we know it is package local initialisation only. If we have interaction with other packages or optional initialisation use the {{sync.once}}
> This {{flag.Parse()}} is a case of interacting with multiple packages, I don't think we will have many more of these cases.



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