Skip to content

Conversation

@mtmk
Copy link
Member

@mtmk mtmk commented Sep 3, 2025

Note: This is a prerelease update. It might change in future releases.

This pull request adds support for new JetStream cluster-related fields and improves cluster configuration and testing. The main changes include extending the ClusterInfo model with additional properties, updating server configuration options to allow custom cluster names, and adding a comprehensive test to verify the new fields. Additionally, a utility for comparing server versions was introduced to facilitate conditional testing logic.

JetStream Cluster Model Enhancements

  • Added new properties to ClusterInfo: RaftGroup, LeaderSince, SystemAccount, and TrafficAccount, with appropriate serialization attributes and conditional logic for .NET versions. These properties allow for richer cluster metadata and are supported in server v2.12 and above. [1] [2]

Server Configuration Improvements

  • Updated NatsServerOptsBuilder and NatsServerOpts to support specifying a custom cluster name via the new WithClusterName method and related property changes, ensuring cluster configuration can be customized in tests. [1] [2] [3] [4] [5]

Testing Enhancements

  • Added a new test Check_JetStream_cluster_related_fields to ClusterTests2.cs that verifies the presence and correctness of the new cluster fields, including conditional checks for server v2.12+ features.
  • Introduced a utility extension method ServerVersionIsGreaterThenOrEqualTo to facilitate version-dependent test logic.
  • Minor import addition for Regex to support version parsing.

@mtmk mtmk changed the title Add missing raft_group to cluster info Update ClusterInfo with new 2.12 Fields Sep 3, 2025
@mtmk mtmk marked this pull request as ready for review September 3, 2025 12:54
@mtmk mtmk requested a review from scottf September 3, 2025 12:54
Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

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

LGTM

@mtmk mtmk merged commit 46c9833 into main Sep 4, 2025
18 checks passed
@mtmk mtmk deleted the Update-ClusterInfo-with-new-2.12-Fields branch September 4, 2025 06:11
mtmk added a commit that referenced this pull request Sep 17, 2025
* Fix Object Store Rename (#954)
* Add support for initial connection retry (#928)
* Fix BackoffWithJitter extension (#929)
* Reduce log noise unregistered inbox messages (#949)
* Add server version check test util (#947)
* Update ClusterInfo with new 2.12 Fields (#945)
@mtmk mtmk mentioned this pull request Sep 17, 2025
mtmk added a commit that referenced this pull request Sep 17, 2025
* Fix Object Store Rename (#954)
* Add support for initial connection retry (#928)
* Fix BackoffWithJitter extension (#929)
* Reduce log noise unregistered inbox messages (#949)
* Add server version check test util (#947)
* Update ClusterInfo with new 2.12 Fields (#945)
@mtmk mtmk changed the title Update ClusterInfo with new 2.12 Fields (prerelease) Update ClusterInfo with new 2.12 Fields Sep 18, 2025
@mtmk mtmk changed the title (prerelease) Update ClusterInfo with new 2.12 Fields (preview) Update ClusterInfo with new 2.12-preview Fields Sep 18, 2025
@mtmk mtmk mentioned this pull request Sep 22, 2025
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