-
Notifications
You must be signed in to change notification settings - Fork 412
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
Upgrade to ZIO 2.0.0-RC5 #1194
Merged
Merged
Upgrade to ZIO 2.0.0-RC5 #1194
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe am I missing something, but shouldn't these be declared as ULayers ? (following the ZIOs declaration logic inside
Live
)(same question for
ChannelFactory.scala
, and thedef live: ZLayer[Any, Nothing, DynamicServer]
value inDynamicServer.scala
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ULayer[A]
is a type alias forZLayer[Any, Nothing, A]
. Which one you use is a matter of preference. Some people like theULayer
type alias because it is more terse. Others like to stick withZLayer
because it is fewer names that people need to remember. I tend to prefer not to use the type aliases for layers but here I was just maintaining the existing style.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good for me 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for pestering, any chance we can get this merged in? I'm working on similar PR for softwaremill/tapir and would like to skip the RC6 release of zio-http and go directly to the release that includes this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I think we need to figure out what is going on with the test failures here. I'm not quite sure what is going on since all the tests are passing for me locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests fail also locally for me.
Something gets slow within the websocket upgrades: (https://github.com/dream11/zio-http/blob/main/zio-http/src/test/scala/zhttp/service/WebSocketServerSpec.scala)
Of course, setting the timeout to 30 seconds makes it work,
so does a
foreachPar
rather than aforeach
, but neither of these would be viable solutions (imo).For now, I still can't get what's going wrong :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, that's really interesting. Those tests run in a couple seconds for me locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I guess we might run towards a solution here !
I ran tests, with multiple Scala versions (
2.12
,2.13
,3.1
), on a few computers, and there's only one where the tests fail:CPU: Intel i7 (8 cores) @ 4.900GHz
,Memory: 16Go DDR4 3200MT/s
)CPU: Intel i7 (16 cores) @ 5.100GHz
,Memory: 64Go 2667MT/s
)CPU: Intel i7 (2 cores) @ 1.700GHz
,Memory: 8Go DDR3 1600MHz
)Updating available memory on the MacBook (via
SBT_OPTS
), didn't change anythingHense, the CPU speed, might be responsible for the slow Websockets bulk spawning/updating.
However, it's quite something that this slow down only appears now (since RC5)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, well increasing the timeout seems to have have at least allowed it to pass CI. Do you have a sense for the relative magnitude of the change? I am surprised by it as well and we can definitely follow up.