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

[jira] [Resolved] (YUNIKORN-928) refactor admission controller code

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

Wilfred Spiegelenburg resolved YUNIKORN-928.
--------------------------------------------
    Fix Version/s: 1.0.0
       Resolution: Fixed

code changes have been committed,

thank you [~wfps1210] for your first contribution!

> refactor admission controller code
> ----------------------------------
>
>                 Key: YUNIKORN-928
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-928
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: shim - kubernetes
>            Reporter: Wilfred Spiegelenburg
>            Assignee: Chung En Lee
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.0.0
>
>
> During the logging review in YUNIKORN-927 I noticed a possible nil pointer and a number of sub optimal code paths:
>  * in the serve function we check for a nil {{AdmissionReview.Request}} this is after all the calls are made that access the same object without nil checks. We either do not need this or have possible nil pointers
>  * we should unwrap the {{AdmissionReview}} and use the {{AdmissionRequest}} in our internal calls
>  * we create {{AdmissionResponse}} objects all over the code (9 places) we need to refactor that into a single function that takes the fields: uid, resultMessage and patch and returns the correct object



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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