Set ctx ns before publish
Fixes #1497 This sets the namespace on the context when deleting a namespace so that the publish event does not fail. Use the same namespace as you are deleting for the context. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
9f28040426
commit
14c36cca60
@ -187,7 +187,8 @@ func (s *Service) Delete(ctx context.Context, req *api.DeleteNamespaceRequest) (
|
||||
}); err != nil {
|
||||
return &empty.Empty{}, err
|
||||
}
|
||||
|
||||
// set the namespace in the context before publishing the event
|
||||
ctx = namespaces.WithNamespace(ctx, req.Name)
|
||||
if err := s.publisher.Publish(ctx, "/namespaces/delete", &eventsapi.NamespaceDelete{
|
||||
Name: req.Name,
|
||||
}); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user