[ARVADOS-WORKBENCH2] updated: 1.2.0-505-g28e6743
Git user
git at public.curoverse.com
Tue Oct 2 02:19:25 EDT 2018
Summary of changes:
src/models/process.ts | 24 ++++++++++++++++++++++
src/models/workflow.ts | 3 +++
.../run-process-panel/run-process-inputs-form.tsx | 4 ++--
3 files changed, 29 insertions(+), 2 deletions(-)
via 28e674396a7933312d4af62b3ca6552d3e0855e8 (commit)
from 7597dab11b25e5bb67becf99db622f7f7737a235 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 28e674396a7933312d4af62b3ca6552d3e0855e8
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Tue Oct 2 08:11:26 2018 +0200
Add workflow based mounts generator
Feature #13863
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/models/process.ts b/src/models/process.ts
index 1e04cb1..9762d50 100644
--- a/src/models/process.ts
+++ b/src/models/process.ts
@@ -3,5 +3,29 @@
// SPDX-License-Identifier: AGPL-3.0
import { ContainerRequestResource } from "./container-request";
+import { MountType, MountKind } from '~/models/mount-types';
+import { WorkflowResource, parseWorkflowDefinition } from '~/models/workflow';
+import { WorkflowInputsData } from './workflow';
export type ProcessResource = ContainerRequestResource;
+
+export const createWorkflowMounts = (workflow: WorkflowResource, inputs: WorkflowInputsData): { [path: string]: MountType } => {
+ return {
+ '/var/spool/cwl': {
+ kind: MountKind.COLLECTION,
+ writable: true,
+ },
+ 'stdout': {
+ kind: MountKind.MOUNTED_FILE,
+ path: '/var/spool/cwl/cwl.output.json',
+ },
+ '/var/lib/cwl/workflow.json': {
+ kind: MountKind.JSON,
+ content: parseWorkflowDefinition(workflow)
+ },
+ '/var/lib/cwl/cwl.input.json': {
+ kind: MountKind.JSON,
+ content: inputs,
+ }
+ };
+};
diff --git a/src/models/workflow.ts b/src/models/workflow.ts
index 88ceb6e..d7d97c4 100644
--- a/src/models/workflow.ts
+++ b/src/models/workflow.ts
@@ -107,6 +107,9 @@ export type StringArrayCommandInputParameter = GenericArrayCommandInputParameter
export type FileArrayCommandInputParameter = GenericArrayCommandInputParameter<CWLType.FILE, File>;
export type DirectoryArrayCommandInputParameter = GenericArrayCommandInputParameter<CWLType.DIRECTORY, Directory>;
+export type WorkflowInputsData = {
+ [key: string]: boolean | number | string | File | Directory;
+};
export const parseWorkflowDefinition = (workflow: WorkflowResource): WorkflowResoruceDefinition => {
const definition = safeLoad(workflow.definition);
return definition;
diff --git a/src/views/run-process-panel/run-process-inputs-form.tsx b/src/views/run-process-panel/run-process-inputs-form.tsx
index b928996..e92b1e4 100644
--- a/src/views/run-process-panel/run-process-inputs-form.tsx
+++ b/src/views/run-process-panel/run-process-inputs-form.tsx
@@ -7,7 +7,7 @@ import { reduxForm, InjectedFormProps } from 'redux-form';
import { CommandInputParameter, CWLType, IntCommandInputParameter, BooleanCommandInputParameter, FileCommandInputParameter } from '~/models/workflow';
import { IntInput } from '~/views/run-process-panel/inputs/int-input';
import { StringInput } from '~/views/run-process-panel/inputs/string-input';
-import { StringCommandInputParameter, FloatCommandInputParameter, isPrimitiveOfType } from '../../models/workflow';
+import { StringCommandInputParameter, FloatCommandInputParameter, isPrimitiveOfType, File, Directory, WorkflowInputsData } from '../../models/workflow';
import { FloatInput } from '~/views/run-process-panel/inputs/float-input';
import { BooleanInput } from './inputs/boolean-input';
import { FileInput } from './inputs/file-input';
@@ -27,7 +27,7 @@ export const RunProcessInputsForm = compose(
(values, input) => ({ ...values, [input.id]: input.default }),
{}),
})),
- reduxForm<any, RunProcessInputFormProps>({
+ reduxForm<WorkflowInputsData, RunProcessInputFormProps>({
form: RUN_PROCESS_INPUTS_FORM
}))(
(props: InjectedFormProps & RunProcessInputFormProps) =>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list