Merge pull request #35896 from thaJeztah/fix-namespace-filtering

Fix event filter filtering on "or"
Upstream-commit: 431d3d6756f69a84d23ef45186082be1ed93c151
Component: engine
This commit is contained in:
Lei Jitang
2018-01-02 12:04:32 +08:00
committed by GitHub

View File

@ -715,8 +715,9 @@ func (c *client) processEventStream(ctx context.Context) {
eventStream, err = c.remote.EventService().Subscribe(ctx, &eventsapi.SubscribeRequest{
Filters: []string{
"namespace==" + c.namespace,
"topic~=/tasks/",
// Filter on both namespace *and* topic. To create an "and" filter,
// this must be a single, comma-separated string
"namespace==" + c.namespace + ",topic~=|^/tasks/|",
},
}, grpc.FailFast(false))
if err != nil {