Ejemplo n.º 1
0
def _create_pipeline_run(instance, pipeline, execution_params):
    step_keys_to_execute = execution_params.step_keys
    if not execution_params.step_keys and execution_params.previous_run_id:
        execution_plan = create_execution_plan(
            pipeline,
            execution_params.environment_dict,
            run_config=RunConfig(
                mode=execution_params.mode, previous_run_id=execution_params.previous_run_id
            ),
        )
        step_keys_to_execute = get_retry_steps_from_execution_plan(instance, execution_plan)
    return pipeline_run_from_execution_params(execution_params, step_keys_to_execute)
Ejemplo n.º 2
0
def get_step_keys_to_execute(instance, pipeline_def, execution_params):
    check.inst_param(instance, 'instance', DagsterInstance)
    check.inst_param(pipeline_def, 'pipeline_def', PipelineDefinition)
    check.inst_param(execution_params, 'execution_params', ExecutionParams)

    if not execution_params.step_keys and is_resume_retry(execution_params):
        # Get step keys from parent_run_id if it's a resume/retry
        execution_plan = create_execution_plan(
            pipeline_def, execution_params.environment_dict, mode=execution_params.mode,
        )
        return get_retry_steps_from_execution_plan(
            instance, execution_plan, execution_params.execution_metadata.parent_run_id
        )
    else:
        return execution_params.step_keys
Ejemplo n.º 3
0
def get_step_keys_to_execute(instance, pipeline_def, execution_params):
    check.inst_param(instance, 'instance', DagsterInstance)
    check.inst_param(pipeline_def, 'pipeline_def', PipelineDefinition)
    check.inst_param(execution_params, 'execution_params', ExecutionParams)

    if not execution_params.step_keys and execution_params.previous_run_id:
        execution_plan = create_execution_plan(
            pipeline_def,
            execution_params.environment_dict,
            run_config=RunConfig(
                mode=execution_params.mode,
                previous_run_id=execution_params.previous_run_id,
                tags=execution_params.execution_metadata.tags,
            ),
        )
        return get_retry_steps_from_execution_plan(
            instance, execution_plan, execution_params.previous_run_id
        )
    else:
        return execution_params.step_keys