Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions control-operator/internal/controller/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,16 @@ func (c *OccClient) ConsumeIfReady(ctx context.Context) bool {
c.log.V(1).Info("connection is in different state than ready", "conn state", connState.String())
return false
}
clientCtx, clientCancel := context.WithCancel(context.Background())
// clientCtx, clientCancel := context.WithCancel(context.Background())
_, clientCancel := context.WithCancel(context.Background())
c.cancel = &clientCancel

go c.ConsumeEventStream(clientCtx)
go c.ConsumeStateStream(clientCtx)
// TODO: Streams are not used anywhere now so we turn them off until they are fixed/useful
// they are not useful for now because any Transition call imediately returns final
// status. So for now we don't need them. Of course the problem is that if something
// changes inside OCC container we have no way how to detect it now.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand what is broken at the moment. Don't we want to log spontaneous changes in the controlled task, even if we don't react to them?

// go c.ConsumeEventStream(clientCtx)
// go c.ConsumeStateStream(clientCtx)
return true
}

Expand Down
Loading