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: Better mechanism for attaching middleware #6365

Merged
merged 8 commits into from
Jan 23, 2025

Conversation

tofarr
Copy link
Collaborator

@tofarr tofarr commented Jan 20, 2025

Better mechanism for configuring middleware

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

Different environments will need different middleware. This PR moves the code for attaching middleware into the OpenhandsConfig so that it may be configured in an environment specific manner. This will also allow us to move SAAS specific middleware out of the OSS repo keeping the code cleaner and simpler.


Link of any specific issues this addresses


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:bd21768-nikolaik   --name openhands-app-bd21768   docker.all-hands.dev/all-hands-ai/openhands:bd21768

Different environments will need different middleware. This PR moves the code for attaching middleware into the OpenhandsConfig so that it may be configured in an environment specific manner. This will also allow us to move middleware specific to SAAS out of the OSS repo.
@tofarr tofarr marked this pull request as ready for review January 20, 2025 22:14
Copy link
Collaborator

@enyst enyst left a comment

Choose a reason for hiding this comment

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

We might want to restore the __version__ and other cool stuff you added the other day. 😅

Nice clean-up! We got away without one get_impl too. (just in time, we might add some get_impl in the runtime 😂, it is useful!)

@tofarr tofarr merged commit 5ba9a6d into main Jan 23, 2025
14 checks passed
@tofarr tofarr deleted the feat-better-middleware-config branch January 23, 2025 14:31
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