Bug #15230

[wb2] Crash loading federated collection

Added by Peter Amstutz about 1 month ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
05/17/2019
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

  1. Perform a search that returns a collection result for a different cluster
  2. Double click on the collection to view it
  3. The page crashes:
TypeError: item.properties is undefined
./src/views/collection-panel/collection-panel.tsx/class_1.prototype.render
src/workbench2/src/views/collection-panel/collection-panel.tsx:124

  121 |     label='Content size' value={data && formatFileSize(data.fileSize)} />
  122 | <DetailsAttribute classLabel={classes.label} classValue={classes.value}
  123 |     label='Owner' value={item && item.ownerUuid} />
> 124 | {(item.properties.container_request || item.properties.containerRequest) &&
  125 |     <span onClick={() => dispatch<any>(navigateToProcess(item.properties.container_request || item.properties.containerRequest))}>
  126 |         <DetailsAttribute classLabel={classes.link} label='Link to process' />
  127 |     </span>

Viewing the same collection with the same workbench on its home cluster works fine.


Subtasks

Task #15240: Review 15230-fed-collection-crashResolvedPeter Amstutz

History

#1 Updated by Peter Amstutz about 1 month ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz about 1 month ago

  • Description updated (diff)

#3 Updated by Peter Amstutz about 1 month ago

  • Status changed from In Progress to New

#4 Updated by Peter Amstutz about 1 month ago

  • Target version set to 2019-05-22 Sprint
  • Assigned To set to Peter Amstutz
  • Subject changed from Crash loading federated collection to [wb2] Crash loading federated collection
  • Project changed from Arvados Workbench 2 to Arvados

#5 Updated by Peter Amstutz about 1 month ago

  • Status changed from New to In Progress

#6 Updated by Peter Amstutz about 1 month ago

  • Target version deleted (2019-05-22 Sprint)
  • Project changed from Arvados to Arvados Workbench 2

The reason for the workbench2 crash is that federated requests for collection records get unmarshalled into arvados.Collection and then serialized again, and in the process any fields not in arvados.Collection get lost, including properties. Workbench2 is assuming that the 'properties' field would be present, and fails when it is missing.

Although the long-term goal is to be able to use a single workbench2 instance to access the entire federation, we're not supporting that for the 1.4 release (there's lots of other things that need to happen.) So the short term fix is to do something similar to workbench1 and provide a cross-instance link.

#7 Updated by Peter Amstutz about 1 month ago

  • Target version set to 2019-05-22 Sprint
  • Project changed from Arvados Workbench 2 to Arvados

#8 Updated by Peter Amstutz about 1 month ago

15230-fed-collection-crash @ commit:215016dc53873f311b5eb3e7e86f2d967ec447fe

Refactor wb2 uuid linking to use getNavUrl which determines the correct path and redirects to other workbench instances in the case of federated uuids. Also disable context menu interaction with search results.

Updates various "Details" side panels to use new linking, also fixes some detail panel bugs either linking things that shouldn't be linked, linking things that should be linked, transforming field values incorrectly, or adding missing fields.

#9 Updated by Eric Biagiotti about 1 month ago

Peter Amstutz wrote:

15230-fed-collection-crash @ commit:215016dc53873f311b5eb3e7e86f2d967ec447fe

Refactor wb2 uuid linking to use getNavUrl which determines the correct path and redirects to other workbench instances in the case of federated uuids. Also disable context menu interaction with search results.

Updates various "Details" side panels to use new linking, also fixes some detail panel bugs either linking things that shouldn't be linked, linking things that should be linked, transforming field values incorrectly, or adding missing fields.

Just a few small comments:

- navigation-action.ts looks like it has a few debug logs still.
- PDHs are not copyable the same way the collection UUID is.
- In process details, should container uuid be a link? What about owner?

#10 Updated by Peter Amstutz about 1 month ago

Eric Biagiotti wrote:

Peter Amstutz wrote:

15230-fed-collection-crash @ commit:215016dc53873f311b5eb3e7e86f2d967ec447fe

Refactor wb2 uuid linking to use getNavUrl which determines the correct path and redirects to other workbench instances in the case of federated uuids. Also disable context menu interaction with search results.

Updates various "Details" side panels to use new linking, also fixes some detail panel bugs either linking things that shouldn't be linked, linking things that should be linked, transforming field values incorrectly, or adding missing fields.

Just a few small comments:

- navigation-action.ts looks like it has a few debug logs still.

Fixed.

- PDHs are not copyable the same way the collection UUID is.

I ended up moving the "copy to clipboard" feature into the DetailsAttribute component so it appears consistently for every field with a UUID or PDH.

- In process details, should container uuid be a link? What about owner?

Owner is now linked.

There's no component for rendering containers (which have similar but not identical fields to container requests), and unlike wb1, wb2 doesn't have a "generic record render" fallback. That's why it isn't linked.

15230-fed-collection-crash @ commit:da4bec7681a503f4a0dbb258cdef5be9e6762299

#11 Updated by Eric Biagiotti about 1 month ago

Works great! LGTM, thanks.

#12 Updated by Peter Amstutz about 1 month ago

  • Status changed from In Progress to Resolved

#13 Updated by Tom Morris about 1 month ago

  • Release set to 15

Also available in: Atom PDF