-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support full sync when the work watcher creating or the work client reconnected #133
Conversation
make test DONE 84 tests in 31.515s go clean -testcache make test-integration DONE 20 tests in 24.751s |
/ok-to-test |
/ok-to-test |
Thanks @skeeey This specifically mentions when client is created. How about when a reconnect happens? |
52b815c
to
c19c4aa
Compare
@machi1990 thanks for reminding, we need handle the reconnect, I provided a
please take a look agian |
47f200f
to
cec4ac1
Compare
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.
Thanks @skeeey
I've three works for the given source mw-client-example
maestro=# select id,source from resources;
id | source
--------------------------------------+-------------------
80e73b12-017a-51ce-9b0e-0cde431aee03 | mw-client-example
798a279a-fb9c-51d7-ab63-20b5c19ab294 | mw-client-example
cb1a8c4b-544c-5ced-97a4-fa1ae882da42 | cs-example
ab8e5a4a-aecc-5e20-9b43-fbe66c077d0a | mw-client-example
(4 rows)
However, when I run the watch on start I receive only one modified event change for the last work
:client-a/ (sync✗) $ go run main.go [9:50:06]
{"level":"info","ts":1718956283.378795,"logger":"fallback","caller":"protocol/protocol.go:112","msg":"subscribing events for: mw-client-example"}
watched work (uid=ab8e5a4a-aecc-5e20-9b43-fbe66c077d0a) is modified
I suspect the queue is pop well ahead before the watching effectively starts on the client i.e the watcher has been registered;
go wait.Until(s.process, time.Second, ctx.Done()) |
m.sendWatchEvent(watch.Event{Type: watch.Modified, Object: work}) |
the |
As soon as the work is added
I believe this is the main issue |
Signed-off-by: Wei Liu <[email protected]>
lgtm I created #140 to ensure that the client will work when jwt is enabled on Maestro's server. This doesn't block my testing though. |
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
refer to #131