Open rossjones opened 5 months ago
[!IMPORTANT]
Auto Review Skipped
Auto reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yaml
file in this repository.To trigger a single review, invoke the
@coderabbitai review
command.
@rossjones I have implemented a fix for the NodeInfo overwrite bug here: https://github.com/bacalhau-project/bacalhau/pull/3785 It was a very large mechanical change to make and sadly touched a lot of files. If it looks good to you, could we land your change (this PR) after it to avoid conflicts? I suspect it will be easier to resolved conflicts from your change here than the other way around. However if you spot any significant issues with https://github.com/bacalhau-project/bacalhau/pull/3785 go ahead and merge this and I'll sort the conflicts on my end.
@frrist are you owning this PR now? what do we need to do to unblock it and merge it?
@wdbaruni yeah I can take this over.
When nodes are approved or rejected, or connected/disconnected, the system may want to respond to these events by creating new evaluations, or cancelling previous tasks.
This PR adds an event emitter which allows implementations of
NodeEventHandler
to receive events that are one of:all events are delivered in a goroutine, and so it is the recipients responsibility to handle the event quickly, or to create a new goroutine and return immediately.
Currently this PR delivers events to an event listener in the
manager
package which currently logs that it has received and event. In future, we will want to modify this behaviour to create new evaluations, or stop current executions based on the node info that is delivered with the event, the job types currently deployed, and the type of event. To enable this, the NodeEventListener is provided with a reference to the evaluation broker and the jobstore.