churromorales commented on PR #13804: URL: https://github.com/apache/druid/pull/13804#issuecomment-1487385805
> it is a good question. I think the way I coded it was not very clear, I apologize for that. I tried to make the `KubernetesTaskRunnerTest` cover the different scenarios. Lets look at this case.... startup overlord, 1st thing it does is go to k8s and see if there are any running tasks. If there are tasks, watch them and do bookkeeping when they finish. The conditional block you are referring to handles that case. It first does a check to see if the task is not active, then checks the state. If it is still running it does the `if` statement you suggested (in following lines to monitorJob())`, so no need to do it twice. It's just a short circuit in case its already finished, grab the status and return, no need to make more k8s calls. Does that help make sense of how things are working? These are good questions, and I want to make sure the code is doing the correct thing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
