openshift-online / maestro

Maestro Service Repo
Apache License 2.0
9 stars 17 forks source link

Allow multiple grpc source clients to CRUD resources to maestro and only one source client watches the resource at the same time #104

Closed skeeey closed 3 months ago

skeeey commented 4 months ago

For this issue, we may need to build a new grpc source manifestwork client without local cache, the related tasks

refer to https://github.com/open-cluster-management-io/ocm/issues/483

skeeey commented 4 months ago

/cc @qiujian16 @clyang82 @morvencao @machi1990

machi1990 commented 4 months ago

Thanks for opening this, I am super excited by having this. Am I to understand correctly that this new client won't depend on a Lister?

skeeey commented 4 months ago

yes, it will not need. a local Lister

machi1990 commented 4 months ago

👍 Perfect and thanks for the clarification.

machi1990 commented 3 months ago

Thank you @skeeey

I've tested the flow;

The ops CREATE,GET,LIST,DELETE,PATCH, WATCH all works.

I also tested full resync using .WithResyncEnabled(true) and I saw two different behaviour;

 go run cmd/example/watcher/main.go                                                                                        [12:25:48]
{"level":"info","ts":1718360752.690721,"logger":"fallback","caller":"protocol/protocol.go:112","msg":"subscribing events for: cs-example"}
{"level":"info","ts":1718360752.713562,"logger":"fallback","caller":"protocol/protocol.go:82","msg":"publishing event with id: 959ce9b3-2bce-4426-92ae-b58ce253ebb1"}
status update: %v 98ba1846-89d9-5e47-8ac8-c3f584cec1f9
status update: %v 07372a51-5077-5b68-9cac-ab695a952abe

I do not know what can account for this behaviour change, but as discussed in DM, It's desirable for full resync to be made resilient and reliable on client restart/reconnection. I'll be happy to review work on this area.

machi1990 commented 3 months ago

I've created a separate issue on that https://github.com/openshift-online/maestro/issues/131