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

Attempt fix to StreamingForm blocking due to unsafe.run #2845

Merged
merged 4 commits into from
May 14, 2024

Conversation

kyri-petrou
Copy link
Collaborator

@kyri-petrou kyri-petrou commented May 14, 2024

The current StreamingForm implementation uses unsafe.run in order to avoid wrapping each emitted byte into a ZIO. This means that the underlying implementation is blocking, which is causing CI to hang now that auto-blocking is disabled.

This PR fixes it (as a temporary patch) by running the stream in the blocking threadpool. We need to come up with a better design for it, but I think this should be adequate for RC7

@kyri-petrou kyri-petrou marked this pull request as ready for review May 14, 2024 07:37
@@ -73,7 +73,7 @@ object ClientHttpsSpec extends ZIOHttpSpec {
),
),
)
} @@ nonFlaky(20),
} @@ nonFlaky(20) @@ ignore,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The server the test uses seems to be not working at the moment which is causing CI to fail so I disabled the test. We should open a separate ticket to use a local server instance (perhaps even zio-http now that it supports SSL) instead of relying on a remote server

@987Nabil 987Nabil merged commit 07d8a2a into zio:main May 14, 2024
62 checks passed
@kyri-petrou kyri-petrou deleted the fix-multipart-stream-blocking branch May 14, 2024 09:09
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.

2 participants