def get_external_execution_plan_snapshot(recon_pipeline, args): check.inst_param(recon_pipeline, "recon_pipeline", ReconstructablePipeline) check.inst_param(args, "args", ExecutionPlanSnapshotArgs) try: pipeline = ( recon_pipeline.subset_for_execution(args.solid_selection) if args.solid_selection else recon_pipeline ) return snapshot_from_execution_plan( create_execution_plan( pipeline=pipeline, run_config=args.run_config, mode=args.mode, step_keys_to_execute=args.step_keys_to_execute, known_state=args.known_state, ), args.pipeline_snapshot_id, ) except: # pylint: disable=bare-except return ExecutionPlanSnapshotErrorData( error=serializable_error_info_from_exc_info(sys.exc_info()) )
def execution_plan_snapshot_command(args): check.inst_param(args, 'args', ExecutionPlanSnapshotArgs) recon_pipeline = (recon_pipeline_from_origin( args.pipeline_origin).subset_for_execution(args.solid_selection) if args.solid_selection else recon_pipeline_from_origin( args.pipeline_origin)) try: return snapshot_from_execution_plan( create_execution_plan( pipeline=recon_pipeline, run_config=args.run_config, mode=args.mode, step_keys_to_execute=args.step_keys_to_execute, ), args.pipeline_snapshot_id, ) except: # pylint: disable=bare-except return ExecutionPlanSnapshotErrorData( error=serializable_error_info_from_exc_info(sys.exc_info()))