Skip to content

Align the internal pipeline of serial and asynchronous policies #1290

@ekouts

Description

@ekouts

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_wait
  • RegressionTask.run
  • RegressionTask.wait, which calls RegressionTest.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_wait
  • RegressionTask.run
  • RegressionTask.poll, a non blocking call that calls RegressionTest.poll. When the job is marked as finished from the scheduler it will call RegressionTask.wait.
  • RegressionTask.wait (calls the RegressionTest.wait as 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions