[
https://issues.apache.org/jira/browse/YUNIKORN-1772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Craig Condit resolved YUNIKORN-1772.
------------------------------------
Fix Version/s: 1.3.0
Target Version: 1.3.0
Resolution: Fixed
Merged to master. Thanks [~yangpoan] for the contribution.
> 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
> Fix For: 1.3.0
>
> 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: [email protected]
For additional commands, e-mail: [email protected]