Exception thrown in synchronous call "bleeds over" to asynchronous call #2869
Labels
bug
This issue is a bug.
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
p2
This is a standard priority issue
queued
This issues is on the AWS team's backlog
Describe the bug
We're running a small test suite of things after upgrading our aging S3 client library to this one. One of the things we've done is added asynchronous/parallel uploading with
putObjectAsync
, but our usages ofgetObject
only ever fetch one object so we have that synchronous.If we force a failure condition from
getObject
(such as fetching an object that doesn't exist), the next calls to any Promise-based functions throw a 'ghost' exception of the synchronous call, despite it not relating to any of the promises we're waiting on.Expected Behavior
No exception thrown
Current Behavior
Exceptions thrown. Here's the exception log we're dealing with;
Reproduction Steps
In our runTask, we're running two separate tasks: one is a get, which tries to get a file into a path it does not have permissions to write to,
test-get-successv2.png
. This is supposed to fail, and is failing as expected.However, the next task is then supposed to do an unrelated
put_many
to paths that, when executed without the get having run prior, succeed with no errors. It is only when running with theget
that theput_many
then throws exceptions.Our "get" function is very simple, only running this (with error checking, etc):
return $this->s3->getObject($params);
Our
put_many
is a bit more complex, but all it really does is do several$this->s3->putObjectAsync
's, puts them in an array, and then\GuzzleHttp\Promise\Utils::unwrap
's them. That unwrap is what's throwing the ghost exception from the priorgetObject
.Note that the paths in the exception were not sent at all to
put_many
.Possible Solution
No response
Additional Information/Context
No response
SDK version used
3.275.1
Environment details (Version of PHP (
php -v
)? OS name and version, etc.)PHP 8.0, rest should be unrelated
The text was updated successfully, but these errors were encountered: