-
Notifications
You must be signed in to change notification settings - Fork 27
[FSSDK-12072] Integrate Redis Streams into agent #448
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
Conversation
This commit integrates Redis Streams for persistent notification delivery from v4.3.0-beta.1 with the existing CMAB Redis cache support in master. Features Added: - Redis Streams implementation for notification synchronization with persistent message delivery, automatic retries, consumer groups, and configurable batching - Flexible Redis authentication utility supporting auth_token, redis_secret, and password fields with environment variable fallback - Applied flexible auth pattern to all Redis clients: ODP cache, UPS, CMAB cache, and synchronization pubsub - Configurable CMAB prediction endpoint via config or environment variable Changes: - Added pkg/syncer/pubsub/redis_streams.go and comprehensive tests - Added pkg/utils/redisauth for flexible password authentication - Updated all Redis clients (ODP, UPS, CMAB) with UnmarshalJSON for auth - Updated config.yaml with Redis Streams parameters and auth_token field - Updated CHANGELOG.md with [Unreleased] section documenting new features - Updated CI workflow to use Redis 6 and added Redis to test-coverage job - Added docs/redis-streams.md with complete Redis Streams documentation Configuration: - CMAB configuration remains under client.cmab section - Redis Streams enabled via synchronization.notification.default - All Redis clients support auth_token, redis_secret, password fields - Environment variables: REDIS_PASSWORD, REDIS_ODP_PASSWORD, REDIS_UPS_PASSWORD, REDIS_CMAB_PASSWORD Testing: - All existing tests pass - Added 5 new auth tests for CMAB Redis cache - Redis Streams includes 18 comprehensive tests - redisauth utility includes 14 tests covering all scenarios Both features coexist without conflicts - Redis Streams uses STREAM data type for messaging while CMAB cache uses STRING type for key-value storage.
jaeopt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! A few suggestions to be considered.
jaeopt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. A few more suggestions.
jaeopt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit integrates Redis Streams for persistent notification delivery from v4.3.0-beta.1 with the existing CMAB Redis cache support in master.
Also adds check if redis version is 5 or less. If less agent uses redis and pubsub, if 5 or greater it uses redis streams.
Features Added:
Changes:
Configuration:
Testing:
Both features coexist without conflicts - Redis Streams uses STREAM data type for messaging while CMAB cache uses STRING type for key-value storage.
Issues