rabbitmq / rabbitmq-stream-dotnet-client

RabbitMQ client for the stream protocol
https://rabbitmq.github.io/rabbitmq-stream-dotnet-client/stable/htmlsingle/index.html
Other
122 stars 41 forks source link

Fixing Endpoint passed to StreamSystem #319

Closed TroelsL closed 1 year ago

TroelsL commented 1 year ago

This fix ensures that the clientParams passed to the StreamSystem matches the one set on the Client (and the one the connection has just been established to).

Fixes an issue where the server is bound to multiple IPs, and it advertises a local IP address over a public one.

Resolves: https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/issues/315

codecov[bot] commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (a2e06bf) 92.79% compared to head (aa87f14) 92.69%.

:exclamation: Current head aa87f14 differs from pull request most recent head 748cc9d. Consider uploading reports for the commit 748cc9d to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #319 +/- ## ========================================== - Coverage 92.79% 92.69% -0.11% ========================================== Files 112 112 Lines 9804 9805 +1 Branches 785 785 ========================================== - Hits 9098 9089 -9 - Misses 536 544 +8 - Partials 170 172 +2 ``` | [Files](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-dotnet-client/pull/319?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq) | Coverage Δ | | |---|---|---| | [RabbitMQ.Stream.Client/StreamSystem.cs](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-dotnet-client/pull/319?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq#diff-UmFiYml0TVEuU3RyZWFtLkNsaWVudC9TdHJlYW1TeXN0ZW0uY3M=) | `81.69% <100.00%> (+0.06%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-dotnet-client/pull/319/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Gsantomaggio commented 1 year ago

Thank you @TroelsL we are looking on it

Gsantomaggio commented 1 year ago

It looks good to me, but I'd like to hear @Zerpet, who recently worked on https://github.com/rabbitmq/rabbitmq-stream-dotnet-client/pull/305, and I'd like to understand if there is any side effect.

The endpoint is not passed since it is filled when there is the query metadata.

TroelsL commented 1 year ago

Closing this PR due to a false positive. The change here will have no effect on the current implementation as the value passed set on ClientParameters.EndPoint in the context of StreamSystem is never used.