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

Runtime Engine #404

Merged
merged 94 commits into from
Oct 31, 2023
Merged

Runtime Engine #404

merged 94 commits into from
Oct 31, 2023

Conversation

josephjclark
Copy link
Collaborator

@josephjclark josephjclark commented Oct 18, 2023

This branch is tracking changes needed to update and integrate the multi-threaded runtime engine

The audit trail on this isn't going to be terribly good because I'm just keeping my head down and making it all work.

An interesting thing about the new engine design is that there's a core engine component, which exposes all of its internals in a large ish API (well, sort of), versus the API component, which wraps the engine, sets defaults and obfuscates parts of the API that no-one should be tampering with.

The idea is that clients/wrappers of the engine will instantiate the API and use its limited surface basically to a) run workflows (we call them workflows or plans here) and b) listen to events emitted during execution.

For unit tests, or for custom deployments or advanced users, you can use the engine directly. This lets us do things like use a mock worker environment, override autoinstall and compile rules.

This PR should close #393 and everything in it. Apart from the logs thing, which is going to be ongoing.

Reasons

For now, I am returning to attempt:complete with an "OK" reason

Any critical/crash errors along the way will return to attempt:complete with a "FAIL" reason.

This needs a lot more work, it's just where I am right now.

This is way easeier for testing and understanding
I think I've finally worked out hte api/context/state stuff - now it's just a context object, itself an event emitter, which tracks state
@josephjclark

This comment was marked as resolved.

@josephjclark
Copy link
Collaborator Author

Ach a late point of confusion has crept up, I think I need to deal with this next week because my head is spinning.

Should the engine accept resolvers in its constructor (one set of resolvers works for all credentials and dataclips), or should they be passed to each execute call?

At the moment they are passed on execute, but suddenly that seems strange to me (actually, I think I've accidentally been supporting both APIs all week and the point is I need to consolidate on just one)

@josephjclark

This comment was marked as resolved.

@josephjclark josephjclark marked this pull request as ready for review October 31, 2023 15:55
@josephjclark josephjclark merged commit c4a8b84 into ws-worker Oct 31, 2023
1 check passed
@josephjclark josephjclark deleted the engine branch October 31, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant