[FSSDK-12877] Upgrade go-sdk to v2.5.0 and update ProjectConfig test mock#464
Merged
Merged
Conversation
…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>
This was referenced Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade the agent to go-sdk v2.5.0 (local holdouts release) and update the test mock so it still satisfies the
config.ProjectConfiginterface.Why
go-sdk v2.5.0 changed the
config.ProjectConfiginterface: it removedGetHoldoutsForFlag(featureKey)and added:GetGlobalHoldouts() []entities.HoldoutGetHoldoutsForRule(ruleID string) []entities.HoldoutThe agent's
TestProjectConfig(pkg/optimizely/optimizelytest/config.go) is a hand-written implementation of that interface, so without this change it no longer satisfiesconfig.ProjectConfigand the build/tests fail to compile.Changes
go.mod/go.sum:github.com/optimizely/go-sdk/v2v2.4.0→v2.5.0.pkg/optimizely/optimizelytest/config.go: replaceGetHoldoutsForFlagwithGetGlobalHoldoutsandGetHoldoutsForRule(return empty lists, matching the existing mock convention).Verification
go build ./...✅go test ./...✅ (only pre-existingpkg/syncer/pubsubfailures, which require a local Redis — unrelated to this change)test_decide_holdouts.py/test_decide_holdouts_simple.py, ODP, track, overrides, UPS, config, CMAB.Notes
https://optimizely-ext.atlassian.net/browse/FSSDK-12877