RHELMISC-7213: Dropbox uploader create folder but does not create share folder#568
Conversation
63ce935 to
431c478
Compare
akihikodaki
left a comment
There was a problem hiding this comment.
Please explain what this change solves and how in the commit message.
431c478 to
3e3ceb9
Compare
akihikodaki
left a comment
There was a problem hiding this comment.
This change will try to share, create, and print a link to the folder even if the creation of the folder fails.
1f7d84c to
c389691
Compare
akihikodaki
left a comment
There was a problem hiding this comment.
It still tries to share and create a link to the folder even if the creation of the folder fails.
@akihikodaki I don't think this is a problem. Sharing will fail in this case too. This is more complicated to make sure that folder is created before trying to share it. What are your suggestions? |
Add a variable to tell if a folder is already created or not instead of having two |
c389691 to
6797944
Compare
akihikodaki
left a comment
There was a problem hiding this comment.
In general, rescue an error instead of detecting an error pattern before execution. In this case, rescue DropboxApi::Errors::FolderConflictError.
It saves I/O and avoids a race condition.
Fix retry behavior in handle_exceptions when share_folder fails. Previously, when share_folder failed, handle_exceptions would retry the entire block, attempting to create an already existing folder. This led to unnecessary retries and potential errors. Now the operations are separated: - Folder creation has its own exception handling block - Share folder and link generation are handled separately - Prevents redundant folder creation attempts during retries This ensures cleaner retry logic and proper error handling for each operation independently. Signed-off-by: Vitalii Chulak <vitalii@daynix.com>
6797944 to
df0845d
Compare
No description provided.