Beispiel #1
0
def get_external_pipeline_subset_result(recon_pipeline, solid_selection):
    check.inst_param(recon_pipeline, 'recon_pipeline', ReconstructablePipeline)

    if solid_selection:
        try:
            sub_pipeline = recon_pipeline.subset_for_execution(solid_selection)
            definition = sub_pipeline.get_definition()
        except DagsterInvalidSubsetError:
            return ExternalPipelineSubsetResult(
                success=False, error=serializable_error_info_from_exc_info(sys.exc_info())
            )
    else:
        definition = recon_pipeline.get_definition()

    external_pipeline_data = external_pipeline_data_from_def(definition)
    return ExternalPipelineSubsetResult(success=True, external_pipeline_data=external_pipeline_data)
Beispiel #2
0
def get_external_pipeline_subset_result(
        recon_pipeline: ReconstructablePipeline,
        solid_selection: Optional[List[str]]):
    check.inst_param(recon_pipeline, "recon_pipeline", ReconstructablePipeline)
    check.opt_list_param(solid_selection, "solid_selection", str)

    if solid_selection:
        try:
            sub_pipeline = recon_pipeline.subset_for_execution(solid_selection)
            definition = sub_pipeline.get_definition()
        except Exception:
            return ExternalPipelineSubsetResult(
                success=False,
                error=serializable_error_info_from_exc_info(sys.exc_info()))
    else:
        definition = recon_pipeline.get_definition()

    external_pipeline_data = external_pipeline_data_from_def(definition)
    return ExternalPipelineSubsetResult(
        success=True, external_pipeline_data=external_pipeline_data)