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

stored_files name clash leads to leakage between samples #939

Closed
ml-evs opened this issue Oct 17, 2024 · 0 comments · Fixed by #942
Closed

stored_files name clash leads to leakage between samples #939

ml-evs opened this issue Oct 17, 2024 · 0 comments · Fixed by #942
Assignees
Labels
bug Something isn't working priority/high
Milestone

Comments

@ml-evs
Copy link
Member

ml-evs commented Oct 17, 2024

I've just run into quite a nasty issue with the stored_files field in our store. When you go to a sample that has a file called x.csv uploaded to it, then visit another sample and try to upload a file called x.csv, the stored files cache is not cleared properly and it treats this as a duplicate to be overwritten. Most worryingly, if you accept that the file should be replaced, it uploads it to the original sample, i.e., the first one you clicked on.

Proposed fix:

  • properly clear the store when loading new files
  • stop matching files on filenames anyway, since many instruments produce files with the same name for different experiments. The API shouldn't care that you have two files with the same name either way, so neither should the UI.

This might be related to the #636 and #500 (which I actually thought we had fixed...).

I'll try to take a look at this fairly urgently, although it is an unlikely enough scenario to come up in "production".

@ml-evs ml-evs added bug Something isn't working priority/high labels Oct 17, 2024
@ml-evs ml-evs self-assigned this Oct 17, 2024
@ml-evs ml-evs added this to the v0.5.x milestone Oct 17, 2024
@ml-evs ml-evs changed the title stored_files in store name clash leads to leakage between samples stored_files name clash leads to leakage between samples Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant