yunikorn-k8shim icon indicating copy to clipboard operation
yunikorn-k8shim copied to clipboard

[YUNIKORN-2724] Improve the signature of methods notifyTaskComplete()…

Open ryankert01 opened this issue 7 months ago • 0 comments

… and ensureAppAndTaskCreated()

What is this PR for?

From the review https://github.com/apache/yunikorn-k8shim/pull/864

Change notifyTaskComplete(string, string) to notifyTaskComplete(*Application, string). It removes a number of extra getApplication() calls we really do not need. Similar for ensureAppAndTaskCreated() which is only ever called from this function. Add a parameter to it to make it: ensureAppAndTaskCreated(*v1.Pod, *Application) and only execute application creation if app == nil.

What type of PR is it?

  • [ ] - Bug Fix
  • [x] - Improvement
  • [ ] - Feature
  • [ ] - Documentation
  • [ ] - Hot Fix
  • [ ] - Refactoring

Todos

  • [ ] - Task

What is the Jira issue?

https://issues.apache.org/jira/browse/YUNIKORN-2724

How should this be tested?

make test

github ci

Screenshots (if appropriate)

Questions:

  • [ ] - The licenses files need update.
  • [ ] - There is breaking changes for older versions.
  • [ ] - It needs documentation.

ryankert01 avatar Jul 08 '24 15:07 ryankert01