Skip to content

Commit ee346e8

Browse files
committed
fix: allow empty string subject keys in flag evaluation
Removed the validation that rejected empty subject keys, allowing legitimate use cases where empty strings are valid subject identifiers. This fixes assignment evaluation for users with empty string subject keys.
1 parent 202c80d commit ee346e8

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ help: Makefile
1414

1515
## test-data
1616
testDataDir := eppoclient/test-data/
17-
branchName := main
17+
branchName := lr/false
1818
githubRepoLink := https://github.com/Eppo-exp/sdk-test-data.git
1919
.PHONY: test-data
2020
test-data:

eppoclient/client.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,6 @@ func (ec *EppoClient) getBanditAction(
359359
}
360360

361361
func (ec *EppoClient) getAssignment(ctx context.Context, config configuration, flagKey string, subjectKey string, subjectAttributes Attributes, variationType variationType) (interface{}, error) {
362-
if subjectKey == "" {
363-
return nil, fmt.Errorf("no subject key provided")
364-
}
365-
366362
if flagKey == "" {
367363
return nil, fmt.Errorf("no flag key provided")
368364
}

0 commit comments

Comments
 (0)