Skip to content

[FSSDK-11587] Implement CMAB config #439

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Mat001
Copy link
Contributor

@Mat001 Mat001 commented Jun 20, 2025

Summary

  • Added JSON-based configuration for CMAB functionality via environment variable OPTIMIZELY_CMAB, making the configuration approach consistent with UserProfileService and ODP segments cache
  • Implemented configuration path: OPTIMIZELY_CMAB
  • Updated tests to verify JSON configuration behavior and partial configuration scenarios
  • Added debug logging in tests to improve troubleshooting
  • Updated README with examples of the new JSON configuration format

Issues

FSSDK-11587

@Mat001 Mat001 self-assigned this Jun 20, 2025
@Mat001 Mat001 requested review from jaeopt and raju-opti June 20, 2025 18:51
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.

I have a few questions about the config contexts and need your help to catch up.

@Mat001 Mat001 requested a review from jaeopt June 20, 2025 22:30
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.

It looks good as is. I'd like to see how we use these configs (cache configs, especially) with go-sdks core.

config/config.go Outdated
@@ -141,18 +141,12 @@ func NewDefaultConfig() *AgentConfig {
},
},
CMAB: CMABConfig{
Enabled: false,
PredictionEndpoint: "https://prediction.cmab.optimizely.com",
PredictionEndpoint: "https://prediction.cmab.optimizely.com/predict/%s",
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering how we use these cmab configs with go-sdk cores. Planned in a separate PR?

config/config.go Outdated
RequestTimeout: 10 * time.Second,
Cache: map[string]interface{}{
"type": "memory",
"size": 1000,
"ttl": "30m",
"redis": map[string]interface{}{
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here - how we connect these memory/redis cache with go-sdk cores.

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.

2 participants