DataBiosphere / dos-azul-lambda

Provides access to DSS azul-index in the Data Object Service schemas
https://dos.commons.ucsc-cgp.org
Apache License 2.0
2 stars 2 forks source link

`UpdateDataObject` requests can result in data loss and malformed object #110

Closed natanlao closed 6 years ago

natanlao commented 6 years ago

There are a couple issues at hand.

1. The transformation function obj_to_azul is responsible for converting data objects to Azul objects. The function fails to remove some attributes of the data object. If an UpdateDataObject request is made, the malformed object is uploaded with extra fields that do not belong.

  1. The transformation function azul_to_obj is responsible for converting Azul objects to data objects. This function presents a data object missing fields present in the Azul object. While this is technically compliant with the schema, this can result in data loss on an UpdateDataObject as all attributes not handled in azul_to_obj are literally lost in translation.

┆Issue is synchronized with this JIRA Story ┆Project Name: dos-azul-lambda ┆Issue Number: DAL-71

natanlao commented 6 years ago

This is too broad - I split (1) to #111

natanlao commented 6 years ago

Actually, thinking about it again it's not that broad. But now it's too much work to close both tickets, so I'll just leave this here.