[arvados-workbench2] created: 2.6.0-3-g8c9aa790

git repository hosting git at public.arvados.org
Wed Apr 19 20:03:32 UTC 2023


        at  8c9aa7907fbe42585b721a163f218367d6900633 (commit)


commit 8c9aa7907fbe42585b721a163f218367d6900633
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Apr 19 17:03:00 2023 -0300

    20384: Upgrades caniuse-lite, as recommended when running 'yarn start'
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/yarn.lock b/yarn.lock
index 580aa8ed..8fb47686 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4987,9 +4987,9 @@ __metadata:
   linkType: hard
 
 "caniuse-lite at npm:^1.0.0, caniuse-lite at npm:^1.0.30000981, caniuse-lite at npm:^1.0.30001035, caniuse-lite at npm:^1.0.30001109, caniuse-lite at npm:^1.0.30001219":
-  version: 1.0.30001414
-  resolution: "caniuse-lite at npm:1.0.30001414"
-  checksum: 97210cfd15ded093b20c33d35bef9711a88402c3345411dad420c991a41a3e38ad17fd66721e8334c86e9b2e4aa2c1851d3631f1441afb73b92d93b2b8ca890d
+  version: 1.0.30001480
+  resolution: "caniuse-lite at npm:1.0.30001480"
+  checksum: c0b40f02f45ee99c73f732a3118028b2ab1544962d473d84f2afcb898a5e3099bd4c45f316ebc466fb1dbda904e86b72695578ca531a0bfa9d6337e7aad1ee2a
   languageName: node
   linkType: hard
 

commit e69d290241aa38d38429291ede383d2994cbdc69
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Apr 19 17:00:03 2023 -0300

    20384: Fixes linter warnings.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/src/views-components/sharing-dialog/sharing-dialog-component.tsx b/src/views-components/sharing-dialog/sharing-dialog-component.tsx
index df232724..f83cec60 100644
--- a/src/views-components/sharing-dialog/sharing-dialog-component.tsx
+++ b/src/views-components/sharing-dialog/sharing-dialog-component.tsx
@@ -16,7 +16,6 @@ import {
     Checkbox,
     FormControlLabel,
     Typography,
-    Tooltip,
 } from '@material-ui/core';
 import {
     StyleRulesCallback,
@@ -40,7 +39,6 @@ import {
 import DateFnsUtils from "@date-io/date-fns";
 import moment from 'moment';
 import { SharingPublicAccessForm } from './sharing-public-access-form';
-import { AddIcon } from 'components/icon/icon';
 
 export interface SharingDialogDataProps {
     open: boolean;
@@ -66,7 +64,7 @@ export type SharingDialogComponentProps = SharingDialogDataProps & SharingDialog
 
 export default (props: SharingDialogComponentProps) => {
     const { open, loading, saveEnabled, sharedResourceUuid,
-        sharingURLsNr, privateAccess, sharingURLsDisabled, permissions,
+        sharingURLsNr, privateAccess, sharingURLsDisabled,
         onClose, onSave, onCreateSharingToken, refreshPermissions } = props;
     const showTabs = !sharingURLsDisabled && extractUuidObjectType(sharedResourceUuid) === ResourceObjectType.COLLECTION;
     const [tabNr, setTabNr] = React.useState<number>(SharingDialogTab.PERMISSIONS);
diff --git a/src/views-components/sharing-dialog/sharing-invitation-form.tsx b/src/views-components/sharing-dialog/sharing-invitation-form.tsx
index 702add91..33154732 100644
--- a/src/views-components/sharing-dialog/sharing-invitation-form.tsx
+++ b/src/views-components/sharing-dialog/sharing-invitation-form.tsx
@@ -3,12 +3,9 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { reduxForm } from 'redux-form';
-import { connect } from 'react-redux';
-import { compose } from 'redux';
 import SharingInvitationFormComponent from './sharing-invitation-form-component';
 import { SHARING_INVITATION_FORM_NAME } from 'store/sharing-dialog/sharing-dialog-types';
 import { PermissionLevel } from 'models/permission';
-import { WithStyles } from '@material-ui/core/styles';
 
 interface InvitationFormData {
     permissions: PermissionLevel;
diff --git a/src/views-components/sharing-dialog/sharing-public-access-form-component.tsx b/src/views-components/sharing-dialog/sharing-public-access-form-component.tsx
index 03885a43..5fc3f4e3 100644
--- a/src/views-components/sharing-dialog/sharing-public-access-form-component.tsx
+++ b/src/views-components/sharing-dialog/sharing-public-access-form-component.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import React from 'react';
-import { Grid, StyleRulesCallback, Divider, Typography } from '@material-ui/core';
+import { Grid, StyleRulesCallback, Typography } from '@material-ui/core';
 import { Field, WrappedFieldProps } from 'redux-form';
 import { WithStyles } from '@material-ui/core/styles';
 import withStyles from '@material-ui/core/styles/withStyles';

commit b1aeab91c0233289ec4521651c82d6bc0d71b905
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Apr 19 16:50:32 2023 -0300

    20384: Adds clickable log collection UUID to the "snip line" on log viewer.
    
    Also, fixes the way we notify the user that some logs may have been dropped
    by only requesting the last page of logs, and showing the message at the
    start if there're remaining log objects on the API server.
    This change was done to fix the case where the "some logs were skipped"
    message appeared with only a handful of log lines (or none) afterwards.
    
    Also, shows the "snip line" message on individual event type filters, something
    that was not happening before.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/src/store/process-logs-panel/process-logs-panel-actions.ts b/src/store/process-logs-panel/process-logs-panel-actions.ts
index 16177f18..53ec4609 100644
--- a/src/store/process-logs-panel/process-logs-panel-actions.ts
+++ b/src/store/process-logs-panel/process-logs-panel-actions.ts
@@ -4,12 +4,11 @@
 
 import { unionize, ofType, UnionOf } from "common/unionize";
 import { ProcessLogs, getProcessLogsPanelCurrentUuid } from './process-logs-panel';
-import { LogEventType } from 'models/log';
+import { LogEventType, LogResource } from 'models/log';
 import { RootState } from 'store/store';
 import { ServiceRepository } from 'services/services';
 import { Dispatch } from 'redux';
-import { groupBy, min, reverse } from 'lodash';
-import { LogResource } from 'models/log';
+import { groupBy, reverse } from 'lodash';
 import { LogService } from 'services/log-service/log-service';
 import { ResourceEventMessage } from 'websocket/resource-event-message';
 import { getProcess } from 'store/processes/process';
@@ -36,7 +35,7 @@ export const initProcessLogsPanel = (processUuid: string) =>
         const process = getProcess(processUuid)(getState().resources);
         const maxPageSize = getState().auth.config.clusterConfig.API.MaxItemsPerResponse;
         if (process && process.container) {
-            const logResources = await loadContainerLogs(process.container.uuid, logService, maxPageSize);
+            const logResources = await loadContainerLogs(process.container.uuid, logService, maxPageSize, process.containerRequest.logUuid);
             const initialState = createInitialLogPanelState(logResources);
             dispatch(processLogsPanelActions.INIT_PROCESS_LOGS_PANEL(initialState));
         }
@@ -70,52 +69,44 @@ export const addProcessLogsPanelItem = (message: ResourceEventMessage<{ text: st
         }
     };
 
-const loadContainerLogs = async (containerUuid: string, logService: LogService, maxPageSize: number) => {
+const loadContainerLogs = async (containerUuid: string, logService: LogService, maxPageSize: number, logCollectionUUID: string | null) => {
     const requestFilters = new FilterBuilder()
         .addEqual('object_uuid', containerUuid)
         .addIn('event_type', PROCESS_PANEL_LOG_EVENT_TYPES)
         .getFilters();
-    const requestOrderAsc = new OrderBuilder<LogResource>()
-        .addAsc('eventAt')
-        .getOrder();
     const requestOrderDesc = new OrderBuilder<LogResource>()
         .addDesc('eventAt')
         .getOrder();
     const { items, itemsAvailable } = await logService.list({
         limit: maxPageSize,
         filters: requestFilters,
-        order: requestOrderAsc,
+        order: requestOrderDesc,
     });
 
-    // Request additional logs if necessary
     const remainingLogs = itemsAvailable - items.length;
     if (remainingLogs > 0) {
-        const { items: itemsLast } = await logService.list({
-            limit: min([maxPageSize, remainingLogs]),
-            filters: requestFilters,
-            order: requestOrderDesc,
-            count: 'none',
-        })
-        if (remainingLogs - itemsLast.length > 0) {
-            const snipLine = {
-                ...items[items.length - 1],
-                eventType: LogEventType.SNIP,
-                properties: {
-                    text: `================ 8< ================ 8< ========= Some log(s) were skipped ========= 8< ================ 8< ================`
-                },
-            }
-            return [...items, snipLine, ...reverse(itemsLast)];
+        const snipLine = {
+            ...items[items.length - 1],
+            eventType: LogEventType.SNIP,
+            properties: {
+                text: `================ 8< ========= Some logs may not be displayed${logCollectionUUID && ". You can read full logs at: " + logCollectionUUID} ========= 8< ================`
+            },
         }
-        return [...items, ...reverse(itemsLast)];
+        return [snipLine, ...reverse(items)];
     }
     return items;
 };
 
 const createInitialLogPanelState = (logResources: LogResource[]) => {
-    const allLogs = logsToLines(logResources);
+    const allLogs = logsToLines(logResources.filter(
+        e => e.eventType !== LogEventType.SNIP
+    ));
     const mainLogs = logsToLines(logResources.filter(
         e => MAIN_EVENT_TYPES.indexOf(e.eventType) > -1
     ));
+    const snipLine = logsToLines(logResources.filter(
+        e => e.eventType === LogEventType.SNIP
+    ));
     const groupedLogResources = groupBy(logResources, log => log.eventType);
     const groupedLogs = Object
         .keys(groupedLogResources)
@@ -129,6 +120,7 @@ const createInitialLogPanelState = (logResources: LogResource[]) => {
         ...Object.keys(groupedLogs)
     ].filter(e => e !== LogEventType.SNIP);
     const logs = {
+        [LogEventType.SNIP]: snipLine,
         [MAIN_FILTER_TYPE]: mainLogs,
         [ALL_FILTER_TYPE]: allLogs,
         ...groupedLogs
@@ -156,7 +148,6 @@ const MAIN_EVENT_TYPES = [
     LogEventType.CRUNCH_RUN,
     LogEventType.STDERR,
     LogEventType.STDOUT,
-    LogEventType.SNIP,
 ];
 
 const PROCESS_PANEL_LOG_EVENT_TYPES = [
@@ -170,5 +161,4 @@ const PROCESS_PANEL_LOG_EVENT_TYPES = [
     LogEventType.STDOUT,
     LogEventType.CONTAINER,
     LogEventType.KEEPSTORE,
-    LogEventType.SNIP,
 ];
diff --git a/src/store/process-logs-panel/process-logs-panel.ts b/src/store/process-logs-panel/process-logs-panel.ts
index 0ca5d679..83f41055 100644
--- a/src/store/process-logs-panel/process-logs-panel.ts
+++ b/src/store/process-logs-panel/process-logs-panel.ts
@@ -4,6 +4,7 @@
 
 import { matchProcessRoute } from 'routes/routes';
 import { RouterState } from 'react-router-redux';
+import { LogEventType } from 'models/log';
 
 export interface ProcessLogsPanel {
     filters: string[];
@@ -16,7 +17,7 @@ export interface ProcessLogs {
 }
 
 export const getProcessPanelLogs = ({ selectedFilter, logs }: ProcessLogsPanel) => {
-    return logs[selectedFilter];
+    return [...logs[LogEventType.SNIP] || [], ...logs[selectedFilter]];
 };
 
 export const getProcessLogsPanelCurrentUuid = (router: RouterState) => {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list