This is an automated email from the ASF dual-hosted git repository.

chia7712 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-k8shim.git


The following commit(s) were added to refs/heads/master by this push:
     new ebcb25ba [YUNIKORN-2470] remove the argument from task DeleteTaskPod 
(#799)
ebcb25ba is described below

commit ebcb25ba8c19b772b5026b5c82b7e27a449b86df
Author: Nick Chao <[email protected]>
AuthorDate: Fri Mar 8 01:54:40 2024 +0800

    [YUNIKORN-2470] remove the argument from task DeleteTaskPod (#799)
    
    Closes: #799
    
    Signed-off-by: Chia-Ping Tsai <[email protected]>, Yu-Lin Chen 
<[email protected]>
---
 pkg/cache/application.go | 4 ++--
 pkg/cache/task.go        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pkg/cache/application.go b/pkg/cache/application.go
index ffead77a..06295b52 100644
--- a/pkg/cache/application.go
+++ b/pkg/cache/application.go
@@ -607,7 +607,7 @@ func (app *Application) 
handleReleaseAppAllocationEvent(allocationID string, ter
        for _, task := range app.taskMap {
                if task.allocationID == allocationID {
                        task.setTaskTerminationType(terminationType)
-                       err := task.DeleteTaskPod(task.pod)
+                       err := task.DeleteTaskPod()
                        if err != nil {
                                log.Log(log.ShimCacheApplication).Error("failed 
to release allocation from application", zap.Error(err))
                        }
@@ -624,7 +624,7 @@ func (app *Application) 
handleReleaseAppAllocationAskEvent(taskID string, termin
        if task, ok := app.taskMap[taskID]; ok {
                task.setTaskTerminationType(terminationType)
                if task.IsPlaceholder() {
-                       err := task.DeleteTaskPod(task.pod)
+                       err := task.DeleteTaskPod()
                        if err != nil {
                                log.Log(log.ShimCacheApplication).Error("failed 
to release allocation ask from application", zap.Error(err))
                        }
diff --git a/pkg/cache/task.go b/pkg/cache/task.go
index 3a41157d..9bdb2229 100644
--- a/pkg/cache/task.go
+++ b/pkg/cache/task.go
@@ -175,7 +175,7 @@ func (task *Task) getTaskAllocationID() string {
        return task.allocationID
 }
 
-func (task *Task) DeleteTaskPod(pod *v1.Pod) error {
+func (task *Task) DeleteTaskPod() error {
        return task.context.apiProvider.GetAPIs().KubeClient.Delete(task.pod)
 }
 


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

Reply via email to