Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
With the MockScheduler object, it's possible to test Yunikorn as a whole without having an actual Kubernetes cluster.
Currently, MockScheduler has some limitations. For example:
- adding node only updates the core, not the shim
- recovery is skipped (ignored because of APIProvider.IsTestingMode())
- predicates are not called (ignored because of APIProvider.IsTestingMode())
- cannot simulate shared informer calls like AddPod(), UpdatePod(), etc.
However, it's possible to update the logic in such a way that we can simulate the entire lifecycle of an application (ie. all relevant code paths):
- New *v1.Pod object -> shim -> SI object -> core -> allocation
- allocation -> SI object -> shim -> bind pod
- Running state: updated *v1.Pod -> shim -> process pod object in the cache
- Completed/Failed state: updated *v1.Pod -> shim > process pod object in the cache -> SI object -> core -> update application state
- *v1.Node object -> shim -> update cache -> SI object -> core -> node&cluster update
This can also gives us a possibility to check the performance of Yunikorn and collect CPU&heap samples. This will not be a replacement of a real performance test, but with a proper test case, we can quickly do a rough assessment of performance/memory usage related changes.
Attachments
There are no Sub-Tasks for this issue.