-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adding files to an included bundle that are already in the target. #129
Comments
What behavior do we want?
|
Keep the original and include it in the database. I don't mind it being a force flag really - I believe that this situation only happens for manual stuff - so a force might be useful :) |
Intuitively I would think that there should not be any files present in the housekeeper directories if they have not been added through the API. Can we clarify the manual stuff this happens with? @karlnyr |
moving description over from a duplicated issue: The command below was run in the /home/proj/production/housekeeper-bundles/ADM1091A3/2018-06-05 directory: for f in *; do housekeeper add file -t fastq -t H9GA6ADXX -b ADM1091A3 ./${f}; done |
Though I agree that ideally we should avoid manually modifying the database, I have also found this issue and wondered if having a |
Suggested solution: Before hard linking the file, check if there is a file present. If so use Path.samefile() to compare them. If True, only add to the Database. This might be a bit cumbersome but avoids the problem of overwriting anything already in the bundle directory. |
Note: With the current implementation, one can already achieve this by using the flag |
I attempted to add a file to a bundle but the file already existed in the path. A user should be able to add the file if it already exists within the bundle path.
For example
file_1
onbundle_1
which has the root of/home/housekeeper-bundles
and a version from June 2nd, 2023:When trying to add the file to the already included bundle - should it not just add the file link into the database?
The text was updated successfully, but these errors were encountered: