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

Refactor some JetStream helper code, add support for specifying JetStream domain #3485

Merged
merged 5 commits into from
Jan 19, 2025

Conversation

neilalexander
Copy link
Contributor

@neilalexander neilalexander commented Dec 31, 2024

This should gracefully handle some more potential errors that the consumer fetches can return with retries, as well as setting some client settings for reconnects etc when using an external NATS Server.

Also allow specifying the JetStream domain in case of a leafnode scenario and better manage client reuse across Dendrite. And also update NATS Server to 2.10.24 for good measure.

This code is backported from Harmony.

Signed-off-by: Neil Alexander [email protected]

@neilalexander neilalexander requested a review from a team as a code owner December 31, 2024 21:36
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 55.00000% with 45 lines in your changes missing coverage. Please review.

Project coverage is 49.37%. Comparing base (9de3e84) to head (7c6d747).

Files with missing lines Patch % Lines
setup/jetstream/nats.go 38.09% 20 Missing and 6 partials ⚠️
setup/jetstream/helpers.go 67.24% 15 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3485      +/-   ##
==========================================
- Coverage   49.41%   49.37%   -0.04%     
==========================================
  Files         524      524              
  Lines       59800    59814      +14     
==========================================
- Hits        29548    29536      -12     
- Misses      26769    26788      +19     
- Partials     3483     3490       +7     
Flag Coverage Δ
unittests 49.37% <55.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

setup/jetstream/helpers.go Show resolved Hide resolved
setup/jetstream/nats.go Outdated Show resolved Hide resolved
Signed-off-by: Neil Alexander <[email protected]>
@S7evinK
Copy link
Contributor

S7evinK commented Jan 2, 2025

Sytest is unhappy until #3471 is merged.

Copy link
Contributor

@S7evinK S7evinK left a comment

Choose a reason for hiding this comment

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

I've been running this since about this comment and didn't encounter any issues with Jetstream. So changes seem to work out. (Also tested restarting external NATS, which looks fine)

Thanks!

@S7evinK S7evinK enabled auto-merge (squash) January 19, 2025 08:50
@S7evinK S7evinK merged commit f4506a0 into element-hq:main Jan 19, 2025
19 checks 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.

3 participants