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 2024/04/23 16:13:00 UTC

[jira] [Created] (YUNIKORN-2577) Remove named returns from IsPodFitNodeViaPreemption

Wilfred Spiegelenburg created YUNIKORN-2577:
-----------------------------------------------

             Summary: Remove named returns from IsPodFitNodeViaPreemption
                 Key: YUNIKORN-2577
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2577
             Project: Apache YuniKorn
          Issue Type: Improvement
          Components: shim - kubernetes
            Reporter: Wilfred Spiegelenburg


IsPodFitNodeViaPreemption has defined named returns but does not use them. They should be removed as the way they are used can cause issues that are hard to debug.

As part of this change we need to further cleanup:
* The variable {{ok}} also gets shadowed multiple times, not just from the named return declaration.
* The if construct around {{GetPodNoLock()}} is not needed as it returns a nil for the pod if it returns false. Just adding the result for the pod always has the same effect.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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