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

Craig Condit resolved YUNIKORN-2282.
------------------------------------
     Fix Version/s: 1.5.0
    Target Version: 1.5.0
        Resolution: Fixed

Merged to master. Thanks [~Yu-Lin Chen] for the contribution.

> Missing method Stop() in shim SchedulerAPI mock classes
> -------------------------------------------------------
>
>                 Key: YUNIKORN-2282
>                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2282
>             Project: Apache YuniKorn
>          Issue Type: Bug
>          Components: shim - kubernetes
>            Reporter: Yu-Lin Chen
>            Assignee: Yu-Lin Chen
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.5.0
>
>
> We have changed SchedulerAPI interface in YUNIKORN-2233. 
> ([PR|https://github.com/apache/yunikorn-scheduler-interface/pull/114/files])
> However, we didn't add Stop() method to SchedulerAP's mock classes in Shim.
> Which leads building fail in shim with latest 
> yunikorn-core/yunikorn-scheduler-interface.
>  
> {*}Reproduce steps{*}:
> 1. Change yunikorn-k8shim's go.mod to reference the latest yunikorn-core, 
> yunikorn-yunikorn-scheduler-interface
> 2. Build image
> {code:java}
> make clean image {code}
> Error Message:
> {code:java}
> pkg/client/apifactory_mock.go:83:27: cannot use test.NewSchedulerAPIMock() 
> (value of type *test.SchedulerAPIMock) as 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> value in struct literal: *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:103:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:109:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:116:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:122:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:129:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:135:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> pkg/client/apifactory_mock.go:142:17: impossible type assertion: 
> m.clients.SchedulerAPI.(*test.SchedulerAPIMock)
>     *test.SchedulerAPIMock does not implement 
> "github.com/apache/yunikorn-scheduler-interface/lib/go/api".SchedulerAPI 
> (missing method Stop)
> make: *** [Makefile:336: build/bin/yunikorn-scheduler] Error 1 {code}
> Should add Stop() method to below SchedulerAPI mock classes:
>  # SchedulerAPIMock: 
> [https://github.com/apache/yunikorn-k8shim/blob/master/pkg/common/test/schedulerapi_mock.go#L29]
>  # mockSchedulerAPI: 
> [https://github.com/apache/yunikorn-k8shim/blob/master/pkg/cache/application_test.go#L481]
>  
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to