ncbo / ontologies_linked_data

Models and serializers for ontologies and related artifacts backed by 4store
Other
17 stars 8 forks source link

downloads of ontology in csv format results in error if new submission is created but not yet processed #170

Open alexskr opened 11 months ago

alexskr commented 11 months ago

When a new submission is created .csv.gz file is removed from the previous submission before the latest submission gets parsed and becomes ready. Downloading ontology in csv format will results in 500 error until latest submission is successfully parsed. see https://github.com/ncbo/ontologies_api/issues/123

This problem is usually not noticeable because latest submission typically gets parsed within a few minutes after it is created. However, in some edge cases this becomes a problem:

  1. adding an a new UMLS release can take multiple days so downloads of csv is broken at that time.
  2. if latest ontology fails to parse then downloads of csv files will result in error even though it is possible to browse ontology classes in the UI

possible solutions:

  1. delay removing artifacts for previous submissions until after the latest submission is successfully parsed
  2. at the bare minimum api should respond with 404 status instead of 500.
jvendetti commented 11 months ago

The generation of CSV representations of ontologies is interleaved with indexing. If an ontology fails to index, the CSV will not be generated.