-
Notifications
You must be signed in to change notification settings - Fork 31
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
Normal stream errors unexpectedly kill the fiber in multipartUpload #188
Comments
lets revert it ! please create a PR |
Can do. Do we want to just revert it and go back to the previous approach of wrapping exceptions, or switch to a different approach like returning a |
@chriskite Lets remove all Please change the signature to have return type ZIO[R, Throwable, Unit] def multipartUpload[R](
bucketName: String,
key: String,
content: ZStream[R, Throwable, Byte],
options: MultipartUploadOptions
)(parallelism: Int): ZIO[R, Throwable, Unit] Also can you do the changes for getObject def getObject(bucketName: String, key: String): Stream[Throwable, Byte] thank you |
regis-leray
added a commit
that referenced
this issue
Mar 31, 2021
regis-leray
added a commit
that referenced
this issue
Apr 1, 2021
regis-leray
added a commit
that referenced
this issue
Apr 1, 2021
regis-leray
added a commit
that referenced
this issue
Apr 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The signature for multipartUpload is:
content
, the stream passed in by the library user, has the error channel typeThrowable
, indicating that it is allowed to fail with aThrowable
.However,
multipartUpload
does the following:Now the
Throwable
we were allowed to fail with causes an unexpected fiber death. This caused a production issue for us, as without looking into the code we would not have known that something allowed in the method signature would be considered a fiber-killing code defect.This behavior was introduced in #170 and I would argue it is incorrect. A stream failing with a normal error is not a defect that cannot be recovered from. I would suggest that instead of dying or wrapping
content
stream errors with a custom type, just keep theThrowable
type as the return error channel type formultipartUpload
.I would be happy to put together a PR for this change.
The text was updated successfully, but these errors were encountered: