Skip to content
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

Worker: looking a bit fragile if execute throws #759

Open
josephjclark opened this issue Sep 5, 2024 · 0 comments
Open

Worker: looking a bit fragile if execute throws #759

josephjclark opened this issue Sep 5, 2024 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

The worker's top level execute function has a few places where it might potentially throw.

This would result in the worker crashing and all runs in progess getting lost.

This is obviously quite severe but it's not entirely clear what we should do. The worker has an obligation to try and finish all outstanding work and report back to lightnig.

For example: failure to join the run channel will result in an unhandled exception. At this point something is very wrong. I don't think we can report back to Lightning yet because we've not even been able to join the comms channel (or we were kicked out). So the run is probably lost at this point. We should probably kill the whole worker (but give existing runs a chance to finish)

There are probably a few other equally nefarious places where an error will result in the whole worker crashing. It's a very sensitive bit of code with a lot of asyncrhonicity and dependencies on other systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant