-
Notifications
You must be signed in to change notification settings - Fork 32
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
Google Storage NIO: FileAlreadyExistsException exception is not honoured when overwriting files #762
Comments
Latest version google-cloud-nio library introduced an issue when the publishDir directive tries to overwrite a file already existing in the target directory. An Google custom exception is thrown instead of the expected FileAlreadyExistsException error. This commit reverts the dependecy to the last know version having the expected behaviour. See googleapis/java-storage-nio#762 Fixes #2455
Latest version google-cloud-nio library introduced an issue when the publishDir directive tries to overwrite a file already existing in the target directory. An Google custom exception is thrown instead of the expected FileAlreadyExistsException error. This commit reverts the dependecy to the last know version having the expected behaviour. See googleapis/java-storage-nio#762 Fixes #2455
Latest version google-cloud-nio library introduced an issue when the publishDir directive tries to overwrite a file already existing in the target directory. An Google custom exception is thrown instead of the expected FileAlreadyExistsException error. This commit reverts the dependecy to the last know version having the expected behaviour. See googleapis/java-storage-nio#762 Fixes #2455
Latest version google-cloud-nio library introduced an issue when the publishDir directive tries to overwrite a file already existing in the target directory. An Google custom exception is thrown instead of the expected FileAlreadyExistsException error. This commit reverts the dependecy to the last know version having the expected behaviour. See googleapis/java-storage-nio#762 Fixes #2455
Hi @pditommaso, The error you're receiving is an optimistic copy protection to try and help prevent accidentally overwriting any data. In this case, since you do in fact want to overwrite you'll need to add an option to your Files.copy(foo, bar, java.nio.file.StandardCopyOption.REPLACE_EXISTING); Adding that option will ensure the request that is sent is tolerant of an overwrite happening. |
Hi Ben, thanks for the swift reply. Yes, I've realised that however, it would not make sense to honour the |
Thank you for clarifying, I missed that the first time around. According to the definition of |
I was finally able to get consensus from several folks and determined we're okay moving forward adding the special handling. Unfortunately, I can't yet give a specific timeframe for when the fix will be implemented and released. We'll provide an update when we know more time wise. |
Latest version google-cloud-nio library introduced an issue when the publishDir directive tries to overwrite a file already existing in the target directory. An Google custom exception is thrown instead of the expected FileAlreadyExistsException error. This commit reverts the dependecy to the last know version having the expected behaviour. See googleapis/java-storage-nio#762 Fixes nextflow-io#2455
Sorry for the long delay on this @pditommaso, the fix has just been merged and will go out in the next release (I would guess next week some time). |
Nice, thanks a lot. For the records, is the target release number already know (so I can keep an eye on it)? |
I expect that it'll release in v 0.123.21. You can follow #816 for release status updates. Our robots will comment and update that issues after it's merged and the artifacts have been pushed to maven central. |
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Environment details
General, Core, and Other are also allowed as types
Steps to reproduce
foo.txt
intomy-bucket
bar.txt
intomy-bucket
foo.txt
tobar.txt
Code example
Stack trace
External references such as API reference guides
Any additional information below
This work as expected up to version
0.121.2
The text was updated successfully, but these errors were encountered: