-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Description
Serial and asynchronous policy have a slightly different internal pipeline, that leads to code duplication sometimes.
In the serial policy the RegressionTask stages are:
- ...
RegressionTask.compile_waitRegressionTask.runRegressionTask.wait, which callsRegressionTest.wait. This is a blocking call and periodically checks itself to see when the job is finished, it is polling for the job through the scheduler.RegressionTask.sanity- ...
In the asynchronous one the stages are:
- ...
RegressionTask.compile_waitRegressionTask.runRegressionTask.poll, a non blocking call that callsRegressionTest.poll. When the job is marked asfinishedfrom the scheduler it will callRegressionTask.wait.RegressionTask.wait(calls theRegressionTest.waitas before but the polling here is unnecessary)RegressionTask.sanity- ...
On the serial policy, the polling of the job is done through the blocking wait method of the scheduler, while on the async one the polling is implemented on the policy itself, by calling the finished method of the scheduler. @rsarm had mentioned it first in one of the standups but I came across it and I also think we should change it. I think we should move the "polling" in the scheduler wait, from the scheduler to the serial policy and poll instead with the finished method like we do on the async policy.