Skip to content

[FSSDK-12877] Upgrade go-sdk to v2.5.0 and update ProjectConfig test mock#464

Merged
Mat001 merged 1 commit into
masterfrom
mpirnovar-agent-local-holdouts-fix-fssdk-12877
Jul 14, 2026
Merged

[FSSDK-12877] Upgrade go-sdk to v2.5.0 and update ProjectConfig test mock#464
Mat001 merged 1 commit into
masterfrom
mpirnovar-agent-local-holdouts-fix-fssdk-12877

Conversation

@Mat001

@Mat001 Mat001 commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade the agent to go-sdk v2.5.0 (local holdouts release) and update the test mock so it still satisfies the config.ProjectConfig interface.

Why

go-sdk v2.5.0 changed the config.ProjectConfig interface: it removed GetHoldoutsForFlag(featureKey) and added:

  • GetGlobalHoldouts() []entities.Holdout
  • GetHoldoutsForRule(ruleID string) []entities.Holdout

The agent's TestProjectConfig (pkg/optimizely/optimizelytest/config.go) is a hand-written implementation of that interface, so without this change it no longer satisfies config.ProjectConfig and the build/tests fail to compile.

Changes

  • go.mod / go.sum: github.com/optimizely/go-sdk/v2 v2.4.0v2.5.0.
  • pkg/optimizely/optimizelytest/config.go: replace GetHoldoutsForFlag with GetGlobalHoldouts and GetHoldoutsForRule (return empty lists, matching the existing mock convention).

Verification

  • go build ./...
  • go test ./... ✅ (only pre-existing pkg/syncer/pubsub failures, which require a local Redis — unrelated to this change)
  • Acceptance suite against real Optimizely projects: 89 passed, 5 deselected, including test_decide_holdouts.py / test_decide_holdouts_simple.py, ODP, track, overrides, UPS, config, CMAB.

Notes

  • This is the only code change required for the agent to work with go-sdk v2.5.0.
  • Supersedes the version bump Dependabot would otherwise open on Monday (go.mod is already at v2.5.0 here).

https://optimizely-ext.atlassian.net/browse/FSSDK-12877

…mock

go-sdk v2.5.0 (local holdouts) replaced the ProjectConfig interface
method GetHoldoutsForFlag with GetGlobalHoldouts and GetHoldoutsForRule.
Update TestProjectConfig to implement the new methods so the mock keeps
satisfying config.ProjectConfig; without this the build fails to compile.

Verified: go build ./..., unit tests, and the full acceptance suite
(89 passed against real Optimizely projects, incl. holdout tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Mat001 Mat001 self-assigned this Jul 14, 2026

@pvcraven pvcraven left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good.

@Mat001 Mat001 merged commit bc5fb95 into master Jul 14, 2026
12 checks passed
@Mat001 Mat001 deleted the mpirnovar-agent-local-holdouts-fix-fssdk-12877 branch July 14, 2026 19:00
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