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

feat(runtime): Add prototype Runloop runtime impl #4598

Merged
merged 19 commits into from
Nov 9, 2024

Conversation

ross-rl
Copy link
Contributor

@ross-rl ross-rl commented Oct 28, 2024

End-user friendly description of the problem this fixes or functionality that this introduces
Add Runloop runtime implementation on top of EventStreamRuntime

  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

Give a summary of what the PR does, explaining any non-trivial design decisions
This PR adds a Runloop runtime implementation, primarily utilizing EventStreamRuntime and its associated communication mechanisms

This runtime:

  • creates a runloop Devbox will use a pre-built openhands sandbox image built against dockerfile.j2
  • creates a url / tunnel to the Devbox
  • delegates application level interface methods (run_action) to EventStreamRuntime

Also included is a polling based LogBuffer


Link of any specific issues this addresses

plugins,
env_vars,
status_message_callback,
attach_to_existing,
Copy link
Collaborator

@rbren rbren Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to make better use of this var--we use it pretty aggressively now. We create several Runtime objects within a session, and they all need to get access to the same runtime.

Can we track the runtime on runloop by sid, so that we can retrieve it if available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yes - so essentially, if attach_to_existing, we should look up by sid and first try to use the existing sandbox. is that the correct understanding? if so, I will get that in

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup exactly!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great - do you know if any tests cover this flow? i didn't see at first glance

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm no I don't think we actually have integration tests here! We definitely should...

@ross-rl
Copy link
Contributor Author

ross-rl commented Oct 31, 2024

update to include:

  • if attach_to_existing, fetch running devboxes and attempt to find matching devbox by sid
  • use helper for startup command
  • close some objects in close

Copy link
Collaborator

@rbren rbren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be working well!

@rbren rbren merged commit 67c8915 into All-Hands-AI:main Nov 9, 2024
12 checks passed
@diwu-sf
Copy link
Contributor

diwu-sf commented Nov 11, 2024

@ross-rl how do I sign up for Runloop? I tried to sign in with Github but it says signup not allowed.
Right now we're planning to spin our own Kubernetes for host our sandboxes, but would like to give Runloop a try.

@ross-rl
Copy link
Contributor Author

ross-rl commented Nov 11, 2024

hey @diwu-sf ! sorry for the confusion, we're currently in closed beta. Reach out here https://www.runloop.ai/hello or just e-mail me directly ( [email protected]) and we can get you set up with an account and show you around runloop

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.

3 participants