legumeinfo / mine-issues

Report ALL issues on LIS mines here! Regardless of which mine you found it on!
2 stars 0 forks source link

loaders should make temp files with non-colliding names and clean up after themselves #164

Open adf-ncgr opened 2 months ago

adf-ncgr commented 2 months ago

/tmp/temp.gff3 is one example, I think I ran into another too.

svengato commented 2 months ago

I have tentatively added a concluding tempfile.delete(); to the following files.

lis-bio-sources/lis-annotation/src/main/java/org/intermine/bio/dataconversion/AnnotationFileConverter.java
lis-bio-sources/lis-markers/src/main/java/org/intermine/bio/dataconversion/MarkerGFF3FileConverter.java
java/ncgr/datastore/src/main/java/org/ncgr/datastore/validation/AnnotationCollectionValidator.java 
java/ncgr/datastore/src/main/java/org/ncgr/datastore/validation/SyntenyCollectionValidator.java
adf-ncgr commented 2 months ago

looks like this package is also implicated: https://github.com/ncgr/java/blob/main/datastore/src/main/java/org/ncgr/datastore/validation/AnnotationCollectionValidator.java note that this is in the ncgr github, though I'm guessing probably only for historical reasons. Would probably be good to refactor so that it is handled like other libs and not with odd little scripts like update-ncgr-libs.sh. But since I've now lost a good chunk of time today trying to figure out where a reference to /tmp/temp.gff was still coming in even after I tried switching to use of java.nio.file.Files.createTempFile I think I'm not going to tackle that just now...

svengato commented 2 weeks ago

I fixed the "clean up after themselves" part in commit e9332c2.