pipelines.results.helpers module#

pipelines.results.helpers.build_pipeline_execution(pipeline: Pipeline, run_id: str, runner: PipelineRunner, reporter: PipelineReporter, input_data: Dict[str, Any], build_all=True) PipelineExecution#

Creates a pipeline execution object along with all the pipeline results, task executions and task results.

Parameters:
  • pipeline – The Pipeline object to create the results storage for

  • run_id – A UUID for referencing the run

  • runner – The PipelineRunner object that will be used to run the pipeline

  • reporter – The PipelineReporter object that will be used to report status changed

  • input_data – A json serializable dict containing the input parameters

  • build_all – If True, all results objects are create otherwise only the pipeline execution object will be created (to store config errors for example)

pipelines.results.helpers.cleanup_task_results(before: datetime | None = None) Sequence[str]#

Removes all results objects from the storage.

Parameters:

before – If set only objects created before the date will be removed. Otherwise all will be removed.

pipelines.results.helpers.get_pipeline_digest() Dict[str, PipelineDigestItem]#

Returns the PipelineDigest object providing stats for all registered pipeline classes.

pipelines.results.helpers.get_pipeline_execution(run_id) PipelineExecution | None#

Fetch a specific pipeline execution from the storage.

If the pipeline execution isn’t found, None will be returned.

Parameters:

run_id – The id of the pipeline run to fetch the execution for

pipelines.results.helpers.get_pipeline_executions(pipeline_id: str | None = None) Sequence[PipelineExecution]#

Gets all pipeline executions from the storage. If pipeline_id is supplied only executions for the given pipeline id will be returned

Parameters:

pipeline_id – The id of the registered pipeline class

pipelines.results.helpers.get_pipeline_result(_id) PipelineResult | None#

Fetch a specific pipeline result from the storage.

If the pipeline result isn’t found, None will be returned.

Parameters:

_id – The id of the result to fetch from storage

pipelines.results.helpers.get_pipeline_results(run_id: str | None = None) Sequence[PipelineResult]#

Gets all pipeline results from the storage. If run_id is supplied only results for that particular run will be returned.

Parameters:

run_id – The id of the run to filter results by

pipelines.results.helpers.get_pipeline_results_storage() PipelineResultsStorage#

Gets the configured pipeline results storage.

pipelines.results.helpers.get_task_execution(_id) TaskExecution | None#

Fetch a specific task execution from the storage.

If the pipeline result isn’t found, None will be returned.

Parameters:

_id – The id of the task execution to fetch from storage

pipelines.results.helpers.get_task_executions(run_id: str | None = None, pipeline_result_id: str | None = None) Sequence[TaskExecution]#

Gets all task executions from the storage.

Parameters:
  • run_id – The id of the run to filter results by

  • pipeline_result_id – The id of the parent pipeline result object to filter results by

pipelines.results.helpers.get_task_result(_id) TaskResult | None#

Fetch a specific task result from the storage.

If the pipeline result isn’t found, None will be returned.

Parameters:

_id – The id of the task result to fetch from storage

pipelines.results.helpers.get_task_results(run_id: str | None = None, pipeline_result_id: str | None = None, task_execution_id: str | None = None) Sequence[TaskResult]#

Gets all task results from the storage.

Parameters:
  • run_id – The id of the run to filter results by

  • pipeline_result_id – The id of the grandparent pipeline result object to filter results by

  • task_execution_id – The id of the parent task execution object to filter results by

pipelines.results.helpers.reset_storage_object()#

Resets the cached storage object so that it is reevaluated from the settings the next time get_pipeline_results_storage is called.