You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: RPC event serialization error, dont send empty messages (#1871)
## This PR
- adds a test for the notification error that I encountered in
#1869
### Related Issues
None that I'm aware of
### Notes
vibe coding warning: I don't know go well enough to fix this, but I did
use TDD and also did a manual test to verify that my problem went away.
If any part of my solution is technicaly or doesn't fit in the codebase
for any reason: feel free to comment, I'll do my best to improve it.
### How to test
Running the test suite should be sufficient
Signed-off-by: Karel Vervaeke <karel@vervaeke.info>
Copy file name to clipboardExpand all lines: flagd/pkg/service/flag-evaluation/eventing.go
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,17 +41,23 @@ func (eventing *eventingConfiguration) Subscribe(ctx context.Context, id any, se
41
41
forresult:=rangewatcher {
42
42
newFlags:=make(map[string]model.Flag)
43
43
for_, flag:=rangeresult.Flags {
44
-
// we should be either selecting on a flag set here, or using the source-priority - duplicates are already handled, so we don't have to worry about overwrites
44
+
// we should be either selecting on a flag set here, or using the source-priority - duplicates are already handled, so we don't have to worry about overwrites
45
45
newFlags[flag.Key] =flag
46
46
}
47
47
48
48
// ignore the first notification (nil old flags), the watcher emits on initialization, but for RPC we don't care until there's a change
0 commit comments