-
Notifications
You must be signed in to change notification settings - Fork 262
Conversation
Codecov Report
@@ Coverage Diff @@
## master #426 +/- ##
==========================================
- Coverage 62.75% 62.67% -0.09%
==========================================
Files 72 72
Lines 4446 4455 +9
==========================================
+ Hits 2790 2792 +2
- Misses 1327 1331 +4
- Partials 329 332 +3
Continue to review full report at Codecov.
|
pkg/broker/server/sse.go
Outdated
return false | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clever to do the check here.
Would you mind put this code in a function? Something like if !checkPath(key, event.topic) { return false }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/notfyTopic/notifyTopic/g
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, moved to function!
@YujiOshima Thank you for catching and fixing this bug and adding tests. Once you move the check to a function I will merge it in. I still think a better way is to intercept the subscribe call and reject a topic that doesn't conform to the spec of the Event plugin. This way, we don't have to do this check at every outbound event publish. It's also better UX since the client knows it tried to subscribe to an incorrect topic. One place this might work, would be to add checks as an interceptor to the ServerHTTP handler. This would be the place: https://github.com/docker/infrakit/blob/master/pkg/rpc/server/server.go#L132 Here we have references to all the I will file that as a TO-DO.... |
Signed-off-by: Yuji Oshima <yuji.oshima0x3fd@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Change subnet to workaround DNS server collision
fix #425
Signed-off-by: Yuji Oshima yuji.oshima0x3fd@gmail.com