Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring of job status in workflow page #363

Merged
merged 8 commits into from
Dec 6, 2023
Merged

Conversation

zonia3000
Copy link
Collaborator

@zonia3000 zonia3000 commented Dec 5, 2023

Checklist before merging

  • I added an appropriate entry to CHANGELOG.md

Copy link

github-actions bot commented Dec 5, 2023

Coverage report
 ---------------------------------------|---------|----------|---------|---------|-------------------
File                                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------------------|---------|----------|---------|---------|-------------------
All files                              |   40.89 |    25.37 |    42.5 |   44.01 |                   
 src                                   |       0 |        0 |       0 |       0 |                   
  hooks.server.js                      |       0 |        0 |       0 |       0 | 5-61              
 src/lib/common                        |   63.55 |    60.43 |   73.07 |   65.09 |                   
  component_utilities.js               |   74.28 |    69.49 |   78.57 |    75.4 | ...04,116,155-158 
  errors.js                            |   34.28 |    40.74 |      50 |   35.29 | 9-65,78,84,87,127 
  jschema_validation.js                |   84.61 |       60 |     100 |     100 | 25-33             
 src/lib/components/admin              |   78.28 |    60.79 |   95.23 |   86.72 |                   
  UserEditor.svelte                    |   78.28 |    60.79 |   95.23 |   86.72 | ...1240,1281-1282 
 src/lib/components/common             |   71.48 |    52.88 |   83.33 |    73.3 |                   
  BooleanIcon.svelte                   |   73.91 |    31.25 |    90.9 |   79.36 | 3-12,109-115,132  
  ConfirmActionButton.svelte           |     100 |    62.96 |     100 |     100 | ...32-36,48,50-52 
  Modal.svelte                         |    92.3 |    86.66 |     100 |   91.89 | 60-71             
  StandardDismissableAlert.svelte      |   60.24 |    47.61 |      75 |   61.64 | ...34,139-140,158 
  StandardErrorAlert.svelte            |       0 |        0 |     100 |       0 | 4-27              
 src/lib/components/common/filterable  |   72.13 |       30 |      75 |      80 |                   
  Th.svelte                            |   72.13 |       30 |      75 |      80 | ...53,75-77,86-89 
 src/lib/components/common/jschema     |    6.73 |     7.67 |    7.55 |     7.3 |                   
  ArrayProperty.svelte                 |       0 |        0 |       0 |       0 | 6-556             
  BooleanProperty.svelte               |       0 |        0 |       0 |       0 | 5-265             
  JSchema.svelte                       |       0 |        0 |       0 |       0 | 34-578            
  NumberProperty.svelte                |       0 |        0 |       0 |       0 | 5-238             
  ObjectProperty.svelte                |       0 |        0 |       0 |       0 | 6-840             
  PropertiesBlock.svelte               |       0 |        0 |       0 |       0 | 6-348             
  PropertyDescription.svelte           |       0 |        0 |       0 |       0 | 4-167             
  PropertyDiscriminator.svelte         |       0 |        0 |       0 |       0 | 8-576             
  SchemaInput.svelte                   |       0 |        0 |     100 |       0 | 4-58              
  StringProperty.svelte                |       0 |        0 |       0 |       0 | 5-235             
  schema_management.js                 |   86.97 |    71.42 |   86.84 |   86.41 | ...77,294-304,364 
 src/lib/components/jobs               |   71.95 |    48.77 |   74.59 |   74.55 |                   
  JobInfoModal.svelte                  |   60.52 |    16.14 |   70.31 |   64.54 | ...66-671,726-736 
  JobLogsModal.svelte                  |   68.31 |       25 |   82.14 |   74.15 | ...77-178,189-196 
  JobStatusIcon.svelte                 |       0 |        0 |     100 |       0 | 3-17              
  JobsList.svelte                      |   75.38 |    56.36 |   73.87 |   77.53 | ...3080,3104-3107 
  StatusBadge.svelte                   |    90.9 |       50 |     100 |   91.89 | 12,61,65          
 src/lib/components/projects           |   65.11 |    45.27 |   70.95 |   70.97 |                   
  CreateUpdateDatasetModal.svelte      |   65.51 |    53.09 |   74.85 |    72.6 | ...1939,1981-1982 
  ProjectDatasetsList.svelte           |   83.33 |    52.63 |    87.5 |   88.12 | ...31,496-498,514 
  ProjectInfoModal.svelte              |   72.58 |    12.82 |     100 |   85.71 | 58-62             
  ProjectsList.svelte                  |   94.66 |       90 |     100 |   92.72 | 46,68-70          
  WorkflowImport.svelte                |   48.92 |    32.05 |      40 |   54.69 | ...97,409-415,439 
  WorkflowsList.svelte                 |   55.19 |       25 |   60.37 |   60.16 | ...07-736,763-764 
 src/lib/components/tasks              |   25.14 |    16.08 |   36.16 |      27 |                   
  TaskCollection.svelte                |   56.83 |    39.49 |   65.27 |    62.8 | ...1204,1213-1224 
  TaskCollectionLogsModal.svelte       |   42.04 |     4.54 |   58.33 |   46.75 | ...36-154,166-178 
  TaskEditModal.svelte                 |    5.64 |     6.66 |    21.5 |     5.7 | ...1163-1256,1267 
  TaskInfoModal.svelte                 |     5.7 |     3.24 |   20.73 |    6.34 | ...40,864,874-892 
 src/lib/components/workflow           |   20.57 |    14.35 |   21.57 |   20.71 |                   
  ArgumentForm.svelte                  |       0 |        0 |       0 |       0 | 15-128            
  ArgumentsSchema.svelte               |       0 |        0 |       0 |       0 | 8-350             
  MetaPropertiesForm.svelte            |       0 |        0 |       0 |       0 | 16-141            
  TasksOrderModal.svelte               |       0 |        0 |       0 |       0 | 5-130             
  VersionUpdate.svelte                 |   14.69 |     11.7 |    2.22 |   13.66 | ...5,279,283-1407 
  WorkflowTaskSelection.svelte         |   52.26 |    33.33 |   66.66 |   55.91 | ...18,665-692,710 
  task_form_utils.js                   |       0 |        0 |       0 |       0 | 19-122            
  version-checker.js                   |    90.9 |    88.88 |     100 |    90.9 | 22                
 src/lib/components/workflow/common    |       0 |        0 |       0 |       0 |                   
  FormBaseEntry.svelte                 |       0 |        0 |       0 |       0 | 7-790             
  FormBuilder.svelte                   |       0 |        0 |       0 |       0 | 5-129             
  FormStructure.svelte                 |       0 |        0 |       0 |       0 | 9-1152            
  NewEntryProperty.svelte              |       0 |        0 |       0 |       0 | 3-727             
 src/lib/server/api                    |       0 |        0 |       0 |       0 |                   
  admin_api.js                         |       0 |        0 |       0 |       0 | 10-40             
 src/lib/server/api/v1                 |       0 |        0 |       0 |       0 |                   
  auth_api.js                          |       0 |        0 |       0 |       0 | 11-99             
  dataset_api.js                       |       0 |        0 |       0 |       0 | 10-19             
  project_api.js                       |       0 |        0 |       0 |       0 | 12-176            
  task_api.js                          |       0 |        0 |       0 |       0 | 10-22             
  workflow_api.js                      |       0 |        0 |       0 |       0 | 10-68             
 src/lib/stores                        |      75 |      100 |     100 |      75 |                   
  authStores.js                        |       0 |      100 |     100 |       0 | 3                 
  errorStores.js                       |     100 |      100 |     100 |     100 |                   
  projectStores.js                     |     100 |      100 |     100 |     100 |                   
  serverStores.js                      |       0 |      100 |     100 |       0 | 3                 
  taskStores.js                        |     100 |      100 |     100 |     100 |                   
 src/routes                            |   72.25 |    70.58 |       0 |   65.11 |                   
  +layout.server.js                    |       0 |        0 |       0 |       0 | 6-38              
  +layout.svelte                       |   96.38 |    86.95 |     100 |    98.3 | 4                 
  +page.svelte                         |   97.82 |       80 |     100 |     100 | 32                
  proxy.js                             |       0 |        0 |       0 |       0 | 7-92              
 src/routes/admin                      |   61.53 |       50 |   85.71 |   60.29 |                   
  +page.svelte                         |   61.53 |       50 |   85.71 |   60.29 | 1-11,51-71        
 src/routes/admin/jobs                 |   50.35 |    42.41 |   54.76 |   56.07 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 6-11              
  +page.svelte                         |   50.46 |    42.41 |    55.2 |   56.21 | ...1823,1847-1853 
 src/routes/admin/users                |   70.33 |    13.28 |      50 |   78.23 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-10              
  +page.svelte                         |   70.71 |    13.28 |   51.28 |   78.71 | ...33-657,702-709 
 src/routes/admin/users/[userId]       |   49.88 |     37.5 |   83.33 |   52.56 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-10              
  +page.svelte                         |   50.22 |     37.5 |    90.9 |   52.95 | ...,57-59,225-380 
 src/routes/admin/users/[userId]/edit  |   83.01 |       50 |    92.3 |   89.43 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-10              
  +page.svelte                         |   84.61 |       50 |     100 |   91.36 | 6-39              
 src/routes/admin/users/register       |   58.11 |       50 |    90.9 |   59.25 |                   
  +page.svelte                         |   58.11 |       50 |    90.9 |   59.25 | 21-45,71-104      
 src/routes/api/[...path]              |       0 |      100 |     100 |       0 |                   
  +server.js                           |       0 |      100 |     100 |       0 | 6-9               
 src/routes/api/admin/[...path]        |       0 |      100 |     100 |       0 |                   
  +server.js                           |       0 |      100 |     100 |       0 | 6-9               
 src/routes/api/auth/[...path]         |       0 |      100 |     100 |       0 |                   
  +server.js                           |       0 |      100 |     100 |       0 | 6-9               
 src/routes/auth/login                 |   59.52 |    52.94 |       0 |   58.06 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-22              
  +page.svelte                         |   69.44 |    52.94 |     100 |      72 | 12,24-32,99-108   
  cookie.js                            |       0 |      100 |       0 |       0 | 17-28             
 src/routes/auth/login/oauth2          |       0 |        0 |       0 |       0 |                   
  +layout.server.js                    |       0 |        0 |       0 |       0 | 6-38              
  +page.svelte                         |       0 |      100 |     100 |       0 | 1                 
 src/routes/auth/logout                |   63.63 |       50 |      80 |   63.15 |                   
  +page.svelte                         |   63.63 |       50 |      80 |   63.15 | 6-16,24           
 src/routes/auth/token/logout          |       0 |      100 |       0 |       0 |                   
  +server.js                           |       0 |      100 |       0 |       0 | 13-26             
 src/routes/jobs                       |   46.91 |     6.25 |      40 |   52.85 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 6-25              
  +page.svelte                         |   55.07 |     6.25 |   61.53 |   60.65 | ...-60,95-108,127 
 src/routes/profile                    |   41.98 |     7.77 |   69.23 |   46.29 |                   
  +page.svelte                         |   41.98 |     7.77 |   69.23 |   46.29 | ...72-385,395-406 
 src/routes/projects                   |      50 |      100 |       0 |   46.15 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-21              
  +page.svelte                         |     100 |      100 |     100 |     100 |                   
 src/routes/projects/[projectId]       |   75.28 |     37.5 |   84.37 |   78.93 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 4-12              
  +page.svelte                         |   76.13 |     37.5 |   85.71 |   79.94 | ...23-655,661-662 
 ...s/[projectId]/datasets/[datasetId] |       0 |        0 |       0 |       0 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 7-14              
  +page.svelte                         |       0 |        0 |     100 |       0 | 6-185             
 ...[projectId]/workflows/[workflowId] |   37.12 |    24.78 |   46.27 |   40.88 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-18              
  +page.svelte                         |   37.18 |    24.78 |   46.36 |   40.96 | ...5522,5533-5534 
 ...ectId]/workflows/[workflowId]/jobs |   43.91 |       20 |   44.44 |   48.03 |                   
  +page.server.js                      |       0 |        0 |       0 |       0 | 6-35              
  +page.svelte                         |   47.19 |    21.21 |      60 |    51.3 | ...61-266,283-295 
 ...orkflows/experimental/[workflowId] |       0 |        0 |       0 |       0 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 5-18              
  +page.svelte                         |       0 |        0 |       0 |       0 | 22-1135           
 src/routes/sandbox                    |       0 |        0 |       0 |       0 |                   
  +layout.js                           |       0 |        0 |       0 |       0 | 4-5               
 src/routes/sandbox/jsonschema         |       0 |      100 |     100 |       0 |                   
  +page.svelte                         |       0 |      100 |     100 |       0 | 5-15              
 src/routes/tasks                      |   57.48 |     6.25 |    28.3 |   63.11 |                   
  +page.server.js                      |       0 |      100 |       0 |       0 | 4-5               
  +page.svelte                         |   57.59 |     6.25 |   28.84 |   63.25 | ...1134,1175-1282 
---------------------------------------|---------|----------|---------|---------|-------------------
 

@zonia3000
Copy link
Collaborator Author

The new page is accessible from the path /projects/{projectId}/workflows/experimental/{workflowId}

image

It's a preliminary version to check the basic idea. I still have to change the "Run workflow" button to "Stop workflow" when the job starts.

Notice that I've added both input and output dataset dropdowns, as per Figma sketches, but I'm using only the output dataset to retrieve the list of statuses, as described by @tcompa in #90 (comment):

call the new status endpoint, with dataset_id=job.output_dataset_id

It's not clear to me how to use the combination of input and output datasets in this context.

Moreover I'm never receiving the running status. Jobs remain in submitted status for a while, then go directly to done or failed.

@zonia3000
Copy link
Collaborator Author

zonia3000 commented Dec 5, 2023

I've also done some improvements to the workflow task forms, as discussed with @jluethi.

  • "Arguments properties" and "Arguments list" texts in accordion headers have been replaced with their related property name
  • Accordions containing required properties appear opened by default
  • It is now possible to select text inside property description popovers

image

@jluethi
Copy link
Collaborator

jluethi commented Dec 5, 2023

This sounds & looks amazing, looking forward to testing it! 🚀

I'm using only the output dataset to retrieve the list of statuses, as described by

Yes, only the output dataset has relevant statuses. That's why we're discussing dropping the idea of input datasets :) [see initial issue here, not kept up to date: https://github.com/fractal-analytics-platform/fractal-server/issues/785]
Once we get rid of the concept of an input dataset, we then would only need one dropdown. But to be evaluated & implemented first ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants