-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
on_done not called when token has expired #4145
Comments
Thanks for reaching out. Unfortunately we cannot guarantee compatibility with third-party libraries like aws-vault. To investigate a boto3 issue here we would need a code snippet to reproduce the issue, in addition to debug logs (with sensitive info redacted) which you can get by adding |
|
Here's a minimal reproducer (and I believe the simplest example of using
|
Thanks for following up. We don't recommend using s3transfer directly, as noted in the README:
Have you tried using the Boto3 upload methods for S3? You can handle any errors as documented here or handle events like after-call-error. |
Sorry, I pulled from the wrong
|
That snippet is still using the TransferManager directly which isn't recommended:
|
Then what is the recommended way to upload multiple files in parallel in a separate thread using This is the only information I could find about uploading in parallel and it looks like I'm doing a simpler version of what that code shows, so is there a better way? |
Hi @daveisfera — we recommend using upload_file or upload_fileobj. And here is the documentation on multithreading/multiprocessing. Although the S3Transfer code you shared is public it's still recommended to use Boto3 directly. Also looking back at the logs you shared, it looks like you're |
I'm glad to switch but that documentation doesn't seem to provide information on how to actually perform the uploads in another thread. It also mentions events but I don't see how to receive an event notification like
You are correct. I'll check and see if I can get logs from when the callback doesn't happen |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Still waiting for guidance on how to do the upload in parallel and receive notifications of when it completes or has an error |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
I can reproduce the issue with the original example I sent but not the updated one that imports from
It appears that's a general callback and not tied to a specific object/call so is there an example of how to link those calls back to the original call? Basically, the |
Describe the bug
If the token has expired, then the file isn't uploaded (expected), but on_done is not called and there's no way to get notification of the failure
(refiling boto/s3transfer#304 here since I use
s3transfer
throughboto3
)Expected Behavior
An error would be reported
Current Behavior
The upload silently fails
Reproduction Steps
aws-vault
on_done
is never calledPossible Solution
Report an error using
on_done
in the same way from before the expirationAdditional Information/Context
No response
SDK version used
1.34.97
Environment details (OS name and version, etc.)
Debian Bookworm with Python 3.12.3
The text was updated successfully, but these errors were encountered: