P3 service chaining#3591
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
itowlson
left a comment
There was a problem hiding this comment.
Thanks! It would be great to add a test - Rajat had one in his branch I think, or based on the existing service chaining tests. (But we can retrofit that if you need to get back to other priorities.)
bd0c76b to
1ed6d2f
Compare
| /// An HTTP executor. | ||
| pub(crate) trait HttpExecutor { | ||
| fn execute<F: RuntimeFactors>( | ||
| &self, | ||
| instance_builder: TriggerInstanceBuilder<F>, | ||
| route_match: &RouteMatch<'_, '_>, | ||
| req: Request<Body>, | ||
| client_addr: SocketAddr, | ||
| ) -> impl Future<Output = anyhow::Result<Response<Body>>>; | ||
| } |
There was a problem hiding this comment.
Drive-by refactor removing this useless trait but it was difficult to extract from the rest of the work.
|
This one is still a draft because I haven't tested it at all. |
|
Okay I added tests, the one @rajatjindal wrote for P3-P2 chaining and a new one for P3-P3 chaining. But unfortunately this has been lurking long enough to be overtaken by Joel's P3 update, and I don't understand his changes well enough to resolve the conflicts. @lann or @dicej could one of you see if you can rebase it successfully please? Thanks! |
c42ef1e to
2443c86
Compare
|
Okay I think I wriggled my way through the rebase. It seems to work but it did touch some stuff that I don't understand well. So if folks could give it an extremely suspicious review then I would be very grateful. If I have mucked things up and we need to revert, the original working Lann code from before the rebase is at https://github.com/itowlson/spin/tree/p3-service-chaining-before-rebase. |
|
|
||
| wit_bindgen::generate!({ | ||
| path: "../../../../wit", | ||
| world: "wasi:http/service@0.3.0-rc-2026-03-15", |
There was a problem hiding this comment.
Nit: consider using wasi:http/service@0.3.0 here and in internal-http-p3-front. No need to use the RC for new code except where we're specifically testing that the RC still works.
|
Oh no I won't because the HTTP trigger has conflicts again WHEE |
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
2443c86 to
5fb767a
Compare
|
Thanks @itowlson |
Fixes #3586