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

RHELMISC-7213: Dropbox uploader create folder but does not create share folder #568

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jedoku
Copy link
Contributor

@Jedoku Jedoku commented Jan 30, 2025

No description provided.

@Jedoku Jedoku requested a review from kostyanf14 January 30, 2025 10:10
lib/resultuploaders/dropbox/dropbox.rb Outdated Show resolved Hide resolved
lib/resultuploaders/dropbox/dropbox.rb Outdated Show resolved Hide resolved
@Jedoku Jedoku force-pushed the RHELMISC-7213-Dropbox-uploader-create-folder-but-does-not-create-share-link branch from 63ce935 to 431c478 Compare February 4, 2025 11:07
Copy link
Contributor

@akihikodaki akihikodaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what this change solves and how in the commit message.

@Jedoku Jedoku force-pushed the RHELMISC-7213-Dropbox-uploader-create-folder-but-does-not-create-share-link branch from 431c478 to 3e3ceb9 Compare February 10, 2025 10:28
Copy link
Contributor

@akihikodaki akihikodaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will try to share, create, and print a link to the folder even if the creation of the folder fails.

@Jedoku Jedoku force-pushed the RHELMISC-7213-Dropbox-uploader-create-folder-but-does-not-create-share-link branch 2 times, most recently from b312897 to 1f7d84c Compare February 12, 2025 10:17
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>
@Jedoku Jedoku force-pushed the RHELMISC-7213-Dropbox-uploader-create-folder-but-does-not-create-share-link branch from 1f7d84c to c389691 Compare February 12, 2025 10:26
@Jedoku Jedoku requested a review from akihikodaki February 17, 2025 08:46
Copy link
Contributor

@akihikodaki akihikodaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still tries to share and create a link to the folder even if the creation of the folder fails.

@kostyanf14
Copy link
Contributor

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?

@akihikodaki
Copy link
Contributor

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 handle_exceptions. Sharing will fail indeed, but it's better to avoid trying that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants