Skip to content

Conversation

@Mat001
Copy link
Contributor

@Mat001 Mat001 commented Nov 10, 2025

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:

  • 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.

Issues

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.
@Mat001 Mat001 self-assigned this Nov 10, 2025
@Mat001 Mat001 requested a review from jaeopt November 12, 2025 23:05
Copy link
Contributor

@jaeopt jaeopt left a 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.

@Mat001 Mat001 requested a review from jaeopt November 19, 2025 21:16
Copy link
Contributor

@jaeopt jaeopt left a 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.

@Mat001 Mat001 requested a review from jaeopt November 20, 2025 02:41
Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

LGTM

@Mat001 Mat001 merged commit e9ed0f2 into master Nov 20, 2025
13 checks passed
@Mat001 Mat001 deleted the mpirnovar-redisstreams-to-cmab-fssdk-12072 branch November 20, 2025 19:48
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