During the process of running a grading job on Orca, if a container is created but not started, then it will need to be cleaned up from the local Docker registry. To ensure this happens, a clean up handler is installed into the grading job executor, which the docker version of this class takes advantage of.
Solution (Changes Made)
_cleanup_handler added on class GradingJobExecutor
DockerGradingJobExecutor implements this method and removes the container if it is found to exist.
*InvalidWorkerStateException thrown if container exists and could not be cleaned up, as this means we may not be able to clean up resources successfully on the worker.
Feature/Problem Description
During the process of running a grading job on Orca, if a container is created but not started, then it will need to be cleaned up from the local Docker registry. To ensure this happens, a clean up handler is installed into the grading job executor, which the docker version of this class takes advantage of.
Solution (Changes Made)
_cleanup_handler
added on classGradingJobExecutor
DockerGradingJobExecutor
implements this method and removes the container if it is found to exist. *InvalidWorkerStateException
thrown if container exists and could not be cleaned up, as this means we may not be able to clean up resources successfully on the worker.