History Provider
A History Provider is a class for retrieving previous runs of an Executor, in the event that the Executor triggers a job in an external service. We wrote an example history provider for Apache Airflow.
The main method of a history provider is get_runs
:
class HistoryProvider:
@classmethod
def get_runs(cls, process: Process, request, *args, **kwargs) -> typing.Iterable["RunResult"]:
pass
The parameters are the Process object to retrieve runs from, the Django request that triggered the job, and any additional parameters that are passed to the Django view. The return result is any iterable of RunResults that would be returned by the Executor.
A History Provider, if assigned to a Process, will override the run results of the executor displayed to the user in the Spade UI.