redhat-developer / intellij-common

4 stars 11 forks source link

ConfigWatcher is triggering multiple events for a single modification of a file #190

Closed adietish closed 1 year ago

adietish commented 1 year ago

See https://github.com/redhat-developer/intellij-kubernetes/issues/640 for more details on this. It seems to be a know defect on Linux/Windows.

adietish commented 1 year ago

@datho7561 found out that the sequence of events come in 3 cases:

@datho7561: here are three cases:

  • 1st event: the file is empty, 2nd event: then complete
  • 1st event: the file is incomplete, 2nd event: then complete
  • 1st event: the file is complete, 2nd event: then complete (again)
adietish commented 1 year ago

We therefore think that we need to prevent events from be propagated where the kube config file does not exist, is empty or is not valid yaml (incomplete file)

adietish commented 1 year ago

@datho7561: @olkornii is back ready to test things. I'll therefore make sure we have a fix that he can test.

adietish commented 1 year ago

192 was merged. Closing.