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

Upgrade to Netty 5 #1873

Closed
violetagg opened this issue Nov 5, 2021 · 0 comments · Fixed by #2369
Closed

Upgrade to Netty 5 #1873

violetagg opened this issue Nov 5, 2021 · 0 comments · Fixed by #2369
Assignees
Labels
type/enhancement A general enhancement
Milestone

Comments

@violetagg
Copy link
Member

violetagg commented Nov 5, 2021

https://github.com/netty/netty/wiki/New-and-noteworthy-in-5.0
https://github.com/netty/netty/wiki/Netty-5-Migration-Guide

@violetagg violetagg added type/enhancement A general enhancement status/need-triage A new issue that still need to be evaluated as a whole labels Nov 5, 2021
@violetagg violetagg added this to the 2.0.x Backlog milestone Nov 5, 2021
@violetagg violetagg self-assigned this Nov 5, 2021
@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label Nov 5, 2021
@violetagg violetagg modified the milestones: 2.0.x Backlog, 1.1.x Backlog Jan 28, 2022
@violetagg violetagg modified the milestones: 1.1.x Backlog, 2.0.x Backlog May 16, 2022
@violetagg violetagg modified the milestones: 2.0.x Backlog, 2.0.0-M1 May 19, 2022
violetagg added a commit that referenced this issue May 19, 2022
- Add dependency to Netty Contrib (codec-haproxy, codec-extras, socks-proxy) 5.0.0.Final-SNAPSHOT
- Add dependency to netty-buffer:4.1.77.Final
- Update artifactId to netty5-*

Related to #1873
violetagg added a commit that referenced this issue May 19, 2022
*-native-* is the artifact for the native code
*-classes-* is the artifact for the java code

Related to #1873
violetagg added a commit that referenced this issue May 19, 2022
*-native-* is the artifact for the native code
*-classes-* is the artifact for the java code

Related to #1873
violetagg added a commit that referenced this issue May 19, 2022
- netty-handler-proxy to io.netty.contrib
- ByteBuf API is obtain from Netty 4

Related to #1873
violetagg added a commit that referenced this issue May 19, 2022
- netty-codec-haproxy to io.netty.contrib
- netty-handler-proxy to io.netty.contrib
- JsonObjectDecoder to io.netty.contrib
- ByteBuf API is obtain from Netty 4

Related to #1873
violetagg added a commit that referenced this issue May 20, 2022
)

- netty-handler-proxy to io.netty.contrib
- ByteBuf API is obtain from Netty 4

Related to #1873
violetagg added a commit that referenced this issue May 20, 2022
- netty-codec-haproxy to io.netty.contrib
- netty-handler-proxy to io.netty.contrib
- JsonObjectDecoder to io.netty.contrib
- ByteBuf API is obtain from Netty 4

Related to #1873
violetagg added a commit that referenced this issue May 20, 2022
- There is no VoidPromise anymore so no need to handle this use case in ProxyProvider

Related to #1873
violetagg added a commit that referenced this issue Jun 29, 2022
- `@Sharable` is removed netty/netty#12522
- `ByteToMessageDecoderForBuffer` is renamed to `ByteToMessageDecoder` netty/netty#12512
- `ByteBuf` adapters are moved to Netty Contrib netty/netty#12512
- Enable `ObservabilitySmokeTest` netty/netty#12518
- `ByteBufAllocatorMetrics` functionality needs migration #2341
- Adapt CI build

Related to #1873
violetagg added a commit that referenced this issue Jun 29, 2022
- `@Sharable` is removed netty/netty#12522
- `ByteToMessageDecoderForBuffer` is renamed to `ByteToMessageDecoder` netty/netty#12512
- `ByteBuf` adapters are moved to Netty Contrib netty/netty#12512
- Enable `ObservabilitySmokeTest` netty/netty#12518
- `ByteBufAllocatorMetrics` functionality needs migration #2341
- Adapt CI build

Related to #1873
violetagg added a commit that referenced this issue Jun 30, 2022
Remove the temporary workarounds from CI build

Related to #1873
violetagg added a commit that referenced this issue Jun 30, 2022
Remove the temporary workarounds from CI build

Related to #1873
violetagg added a commit that referenced this issue Jun 30, 2022
Remove the temporary workarounds from CI build

Related to #1873
pderop added a commit to pderop/reactor-netty that referenced this issue Jun 30, 2022
pderop added a commit that referenced this issue Jun 30, 2022
Related to #1873

This PR is an attempt to bring back the HttpMetricsHandlerTests into netty5 branch.
What has been done:

- in AbstractHttpClientMetricsHandler.java: it seems that now the processed data must also be extracted from the HttpContent parameter that can be passed as argument.
- Same thing done for AbstractHttpServerMetricsHandler.java: the HttpContent must be checked from the extractProcessedDataFromBuffer method.
- in HttpTrafficHandler.java, it seems that the handler can't fire an event after having removed itself from the pipeline, so the removal from the pipeline is now done after the event is fired.
- In AbstractHttpServerMetricsHandler.write method, sometimes the ChannelOperations seems to not be available anymore during listener invocation. This is probably caused by this Always notify FutureListener via the EventExecutor netty/netty#9489, where listeners are now invoked asynchronously. So the ChannelOperations is retrieved and cached before the listener is added.
- HttpMetricsHandlerTests.java: the test has been refactored in order to always expect to observe 4 disconnects when H1 is used, and three disconnects when H2 or H2C is used.
- The test is now rescheduling tasks in the event loops in order to ensure that meters are fully updated (remember that the meters are updated from listeners which are unfortunately rescheduled in event loops queue).
pderop added a commit that referenced this issue Jul 6, 2022
This PR is an attempt to stabilise the HttpMetricsHandlerTests, because now in netty5, channel listeners execution is rescheduled at the end of the current event loop queue, see Netty PR #9489 (Always notify FutureListener via the EventExecutor)
So, this is problem for the HttpMetricsHandlerTests tests, because when we receive a response from a server, we start to verify metrics, while the metrics may be not be already up-to-date because they are updated using write listeners, which may not be executed yet at the time the client receives the response.

This PR ensures that when the server sends the last response, then all listeners are fully executed. We simply use a channel handler which is placed at the end of the pipeline. So, when the server sends the full response, the write listeners will be executed in reverse order (from left to right, so our channel handler listener will be executed lastly).

Related to #1873
pderop added a commit that referenced this issue Jul 6, 2022
Use socks-proxy from netty-contrib main branch, because the PR is now merged: netty-contrib/socks-proxy#11

Related to #1873
violetagg added a commit that referenced this issue Jul 8, 2022
- Adapt to the changes for asynchronous connect in AbstractChannel
netty/netty#12570
- Adapt the CI to the changes made in Future interface
netty/netty#12569

Related to #1873
violetagg added a commit that referenced this issue Jul 8, 2022
violetagg added a commit that referenced this issue Jul 8, 2022
@violetagg violetagg linked a pull request Jul 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant