Skip to content

Go: PubSub Publish Sharded#3692

Merged
jbrinkman merged 19 commits intomainfrom
go/jbrinkman-pubsub-publishshard
Apr 28, 2025
Merged

Go: PubSub Publish Sharded#3692
jbrinkman merged 19 commits intomainfrom
go/jbrinkman-pubsub-publishshard

Conversation

@jbrinkman
Copy link
Copy Markdown
Collaborator

@jbrinkman jbrinkman commented Apr 28, 2025

Description

  • Add Sharded support for Publish command on GlideClusterClient
  • Add documentation example
  • Add Table driven Integration tests
  • Update Changelog

Issue link

This Pull Request is linked to issue (#3664)

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

@jbrinkman jbrinkman requested a review from a team as a code owner April 28, 2025 16:53
@jbrinkman jbrinkman mentioned this pull request Apr 25, 2025
7 tasks
@Yury-Fridlyand Yury-Fridlyand added the go 🏃 golang wrapper label Apr 28, 2025
…e PubSubMessageQueue with signal channel support; refactor integration tests to utilize new client creation methods and improve message handling.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…erns into a single comprehensive test function, improving maintainability and readability. This change introduces a parameterized approach to test various client types and message reading methods.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…e verification logic and introducing parameterized tests for various client types and message reading methods. This update improves test maintainability and readability while ensuring comprehensive coverage of PubSub functionality.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…t for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…client function. Update Go module dependencies to include new libraries for improved functionality. Refactor baseClient methods for PubSubChannels and PubSubChannelsWithPattern, ensuring proper error handling and client closure in tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…ing and improve readability. Update related tests for clarity and consistency in naming conventions. Add new integration tests for PubSubNumSub functionality across standalone and cluster clients.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…ve clarity and usability for developers.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…t for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
…publishing

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
Signed-off-by: jbrinkman <joe.brinkman@improving.com>
@jbrinkman jbrinkman force-pushed the go/jbrinkman-pubsub-publishshard branch from 9c910b7 to f6d02a2 Compare April 28, 2025 22:33
@jbrinkman jbrinkman merged commit 26343b1 into main Apr 28, 2025
28 of 30 checks passed
shohamazon pushed a commit to shohamazon/glide-for-redis that referenced this pull request May 4, 2025
* Add PubSubHandler interface and GetQueue method to BaseClient; enhance PubSubMessageQueue with signal channel support; refactor integration tests to utilize new client creation methods and improve message handling.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Refactor PubSub integration tests to consolidate message receipt patterns into a single comprehensive test function, improving maintainability and readability. This change introduces a parameterized approach to test various client types and message reading methods.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Refactor and enhance PubSub integration tests by consolidating message verification logic and introducing parameterized tests for various client types and message reading methods. This update improves test maintainability and readability while ensuring comprehensive coverage of PubSub functionality.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubChannels and PubSubChannelsWithPattern methods to baseClient for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Enhance client management by adding strong reference checks in close_client function. Update Go module dependencies to include new libraries for improved functionality. Refactor baseClient methods for PubSubChannels and PubSubChannelsWithPattern, ensuring proper error handling and client closure in tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix formatting

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubNumPat method to baseClient for counting unique subscribed patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSub NumSub

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Refactor PubSubNumSub method in baseClient to simplify response handling and improve readability. Update related tests for clarity and consistency in naming conventions. Add new integration tests for PubSubNumSub functionality across standalone and cluster clients.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix merge errors

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* docs: added detailed parameter and return value descriptions to improve clarity and usability for developers.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubChannels and PubSubChannelsWithPattern methods to baseClient for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix formatting

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubNumPat method to baseClient for counting unique subscribed patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* sharded publish

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* implement sharded mode support in pubsub tests for subscriptions and publishing

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* update publish command docs

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* refactor: update skipIfServerVersionLowerThanBy to work with subtests

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix linting error

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

---------

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
ikolomi pushed a commit that referenced this pull request May 11, 2025
* Add PubSubHandler interface and GetQueue method to BaseClient; enhance PubSubMessageQueue with signal channel support; refactor integration tests to utilize new client creation methods and improve message handling.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Refactor PubSub integration tests to consolidate message receipt patterns into a single comprehensive test function, improving maintainability and readability. This change introduces a parameterized approach to test various client types and message reading methods.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Refactor and enhance PubSub integration tests by consolidating message verification logic and introducing parameterized tests for various client types and message reading methods. This update improves test maintainability and readability while ensuring comprehensive coverage of PubSub functionality.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubChannels and PubSubChannelsWithPattern methods to baseClient for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Enhance client management by adding strong reference checks in close_client function. Update Go module dependencies to include new libraries for improved functionality. Refactor baseClient methods for PubSubChannels and PubSubChannelsWithPattern, ensuring proper error handling and client closure in tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix formatting

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubNumPat method to baseClient for counting unique subscribed patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSub NumSub

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Refactor PubSubNumSub method in baseClient to simplify response handling and improve readability. Update related tests for clarity and consistency in naming conventions. Add new integration tests for PubSubNumSub functionality across standalone and cluster clients.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix merge errors

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* docs: added detailed parameter and return value descriptions to improve clarity and usability for developers.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubChannels and PubSubChannelsWithPattern methods to baseClient for enhanced channel management. Update PubSubCommands interface to include new methods. Introduce example utility functions for standalone and cluster clients with subscription capabilities, ensuring a clean state before tests.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix formatting

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* Add PubSubNumPat method to baseClient for counting unique subscribed patterns. Update PubSubCommands interface and implement integration tests for standalone and cluster clients. Add example usage for documentation.

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* sharded publish

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* implement sharded mode support in pubsub tests for subscriptions and publishing

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* update publish command docs

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* refactor: update skipIfServerVersionLowerThanBy to work with subtests

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

* fix linting error

Signed-off-by: jbrinkman <joe.brinkman@improving.com>

---------

Signed-off-by: jbrinkman <joe.brinkman@improving.com>
@jbrinkman jbrinkman deleted the go/jbrinkman-pubsub-publishshard branch June 13, 2025 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go 🏃 golang wrapper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants