You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/05/30 12:15:00 UTC

[jira] [Updated] (YUNIKORN-1772) Simplify the cache Context.SelectApplications function

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

ASF GitHub Bot updated YUNIKORN-1772:
-------------------------------------
    Labels: pull-request-available  (was: )

> Simplify the cache Context.SelectApplications function
> ------------------------------------------------------
>
>                 Key: YUNIKORN-1772
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-1772
>             Project: Apache YuniKorn
>          Issue Type: Improvement
>          Components: shim - kubernetes
>            Reporter: PoAn Yang
>            Assignee: PoAn Yang
>            Priority: Minor
>              Labels: pull-request-available
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> In production code, we only use [cache Context.SelectApplications|https://github.com/apache/yunikorn-k8shim/blob/2c502c01f7a116281d94efb250ac4184a371a06a/pkg/cache/context.go#LL928C2-L928C2] in [KubernetesShim.schedule|https://github.com/apache/yunikorn-k8shim/blob/2c502c01f7a116281d94efb250ac4184a371a06a/pkg/shim/scheduler.go#L279] with a {{nil}} filter.
> In testing code, [MockScheduler.waitAndAssertApplicationState|https://github.com/apache/yunikorn-k8shim/blob/2c502c01f7a116281d94efb250ac4184a371a06a/pkg/shim/scheduler_mock_test.go#L155-L157] and [MockScheduler.waitAndAssertTaskState|https://github.com/apache/yunikorn-k8shim/blob/2c502c01f7a116281d94efb250ac4184a371a06a/pkg/shim/scheduler_mock_test.go#L193] use it to filter apps by application ID, but this can be replaced by [cache Context.GetApplication|https://github.com/apache/yunikorn-k8shim/blob/2c502c01f7a116281d94efb250ac4184a371a06a/pkg/cache/context.go#L799].
> So we can use a new function {{{}GetAllApplications{}}}, and remove SelectApplications in the code base.



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