[arvados-workbench2] updated: 2.4.0-314-g868a6881

git repository hosting git at public.arvados.org
Fri Oct 21 20:05:54 UTC 2022


Summary of changes:
 src/views/process-panel/process-panel-root.tsx | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

       via  868a6881bba9107eaf25e2b055dec55bf1fda42d (commit)
       via  9310afc8e2fbfcf17ef46cb4976b47d93bb99bb6 (commit)
      from  01642466dba12671ad61eb0f2e241fbc71c48e95 (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 868a6881bba9107eaf25e2b055dec55bf1fda42d
Author: Stephen Smith <stephen at curii.com>
Date:   Fri Oct 21 16:03:24 2022 -0400

    16073: Avoid clearing output definitions when mounts disappear while process executes
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx
index 6b88e261..5dd7c6d0 100644
--- a/src/views/process-panel/process-panel-root.tsx
+++ b/src/views/process-panel/process-panel-root.tsx
@@ -70,6 +70,7 @@ export const ProcessPanelRoot = withStyles(styles)(
     ({ process, auth, processLogsPanel, fetchOutputs, ...props }: ProcessPanelRootProps) => {
 
     const [outputDetails, setOutputs] = useState<OutputDetails | undefined>(undefined);
+    const [outputDefinitions, setOutputDefinitions] = useState<CommandOutputParameter[]>([]);
     const [rawInputs, setInputs] = useState<CommandInputParameter[] | undefined>(undefined);
 
     const [processedOutputs, setProcessedOutputs] = useState<ProcessIOParameter[] | undefined>(undefined);
@@ -85,6 +86,7 @@ export const ProcessPanelRoot = withStyles(styles)(
     // Resets state when changing processes
     React.useEffect(() => {
         setOutputs(undefined);
+        setOutputDefinitions([]);
         setInputs(undefined);
         setProcessedOutputs(undefined);
         setProcessedInputs(undefined);
@@ -100,7 +102,11 @@ export const ProcessPanelRoot = withStyles(styles)(
     // Format raw output into ProcessIOParameter[] when it changes
     React.useEffect(() => {
         if (outputDetails !== undefined && outputDetails.rawOutputs && containerRequest) {
-            const outputDefinitions = getOutputParameters(containerRequest);
+            const newOutputDefinitions = getOutputParameters(containerRequest);
+            // Avoid setting output definitions back to [] when mounts briefly go missing
+            if (newOutputDefinitions.length) {
+                setOutputDefinitions(newOutputDefinitions);
+            }
             setProcessedOutputs(formatOutputData(outputDefinitions, outputDetails.rawOutputs, outputDetails.pdh, auth));
         }
     }, [outputDetails, auth, containerRequest]);

commit 9310afc8e2fbfcf17ef46cb4976b47d93bb99bb6
Author: Stephen Smith <stephen at curii.com>
Date:   Fri Oct 21 14:33:02 2022 -0400

    16073: Avoid applying empty inputs when existing inputs already loaded
    
    Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen at curii.com>

diff --git a/src/views/process-panel/process-panel-root.tsx b/src/views/process-panel/process-panel-root.tsx
index 248c5215..6b88e261 100644
--- a/src/views/process-panel/process-panel-root.tsx
+++ b/src/views/process-panel/process-panel-root.tsx
@@ -109,11 +109,15 @@ export const ProcessPanelRoot = withStyles(styles)(
     //   Can be sync because inputs are either already in containerRequest mounts or props
     React.useEffect(() => {
         if (containerRequest) {
-            const rawInputs = getRawInputs(containerRequest);
-            setInputs(rawInputs);
-
-            const inputs = getInputs(containerRequest);
-            setProcessedInputs(formatInputData(inputs, auth));
+            // Since mounts can disappear and reappear, only set inputs if raw / processed inputs is undefined or new inputs has content
+            const newRawInputs = getRawInputs(containerRequest);
+            if (rawInputs === undefined || newRawInputs && newRawInputs.length) {
+                setInputs(newRawInputs);
+            }
+            const newInputs = getInputs(containerRequest);
+            if (processedInputs === undefined || newInputs && newInputs.length) {
+                setProcessedInputs(formatInputData(newInputs, auth));
+            }
         }
     }, [requestUuid, auth, containerRequest]);
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list