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

Bump hyper version to v1 #184

Merged
merged 7 commits into from
Jun 9, 2024
Merged

Conversation

shunsukew
Copy link
Contributor

@shunsukew shunsukew commented Jun 7, 2024

Resolve #185

The latest jsonrpsee release bumped its dependency hyper's version to v1.
https://github.com/paritytech/jsonrpsee/releases/tag/v0.23.0

This introduced low level api removal such as hyper::service::make_service_fn, and some others. See https://hyper.rs/guides/1/upgrading/. SubwayServerBuilder build function need to be updated accordingly.

Because we want to make use of a new feature added to jsonrpsee, hyper version upgrades is required as a first step.
paritytech/jsonrpsee#1388
paritytech/jsonrpsee#1389

@shunsukew shunsukew changed the title Update hyper version Update hyper version v1 Jun 7, 2024
@shunsukew shunsukew changed the title Update hyper version v1 Update to hyper v1 Jun 7, 2024
@shunsukew shunsukew changed the title Update to hyper v1 Bump hyper version to v1 Jun 7, 2024
@shunsukew
Copy link
Contributor Author

shunsukew commented Jun 7, 2024

For some reason, test doesn't finish on my local env. but don't know at which one it is stacking.
I’m checking now
Screenshot 2024-06-08 at 1 36 37

@shunsukew
Copy link
Contributor Author

shunsukew commented Jun 8, 2024

Specifying port 0 in tests merge_subscription_works and upstream_error_propagate seem causing this issue.
During tests connecting to addr 0.0.0.0:0 will have below error and forever looping try to establish a ws connection to upstream server at WsClientBuilder.

2024-06-08T12:21:43.712626Z  INFO subway::extensions::client: Connecting to endpoint: ws://0.0.0.0:0
2024-06-08T12:21:43.712626Z  INFO subway::extensions::client: Connecting to endpoint: ws://0.0.0.0:0
2024-06-08T12:21:43.713347Z  WARN subway::extensions::client: Unable to connect to endpoint: 'ws://0.0.0.0:0' error: Error when opening the TCP socket: Can't assign requested address (os error 49)

@xlc Why port 0 is used for those tests?

@xlc
Copy link
Member

xlc commented Jun 8, 2024

port 0 usually means let the system to allocate an unused port

@shunsukew
Copy link
Contributor Author

shunsukew commented Jun 8, 2024

port 0 usually means let the system to allocate an unused port

I see, in that case, the cause is really clear. I needed to return addr with actual allocated port.
Thank you so much

@xlc xlc merged commit a7e6469 into AcalaNetwork:master Jun 9, 2024
1 check passed
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.

Update SubwayServerBuilder for hyper v1 Compatibility
2 participants