Closed seanmonstar closed 1 week ago
I currently make fairly extensive use of:
Body::wrap_stream(tokio_stream::wrappers::ReceiverStream::new(rx))
Will that still work with the new code?
It'd be pretty straight forward to add such a constructor to dropshot::Body
.
@seanmonstar this is looking great. I would like @davepacheco to take a pass before we merge it, but, @davepacheco, feel free to interpret that with whatever degree of rigor you consider appropriate.
Sorry I'm late to this one. I haven't had a chance to look yet. If there are breaking changes here, as it sounds like there are, then I'd like to get the changelog update in this PR. Our general approach is to provide super clear instructions for people to understand how to know if they're affected by a breaking change and exactly what changes to make, as concretely as we can. There are some examples here, from release 0.9.0.
@ahl also mentioned a design doc? That might help review?
I forgot to add: for breaking changes, I usually like to do a test update of one or more of our important consumers. We've found a lot of issues by doing that. Have we converted any consumers? Ideally it'd be great to convert Omicron's consumers -- is that too much to ask?
@ahl also mentioned a design doc? That might help review?
I followed up with dave privately with the document. We'll want to make sure it's recorded in this PR once we have appropriate ownership and permissions.
I believe I've addressed all the feedback. I added some breaking changes notes to the changelog. Upgrading Omicron is currently out of scope for me.
I think the last items here are:
@seanmonstar it looks like Cargo.lock needs an upodate
@seanmonstar tests are failing
@seanmonstar looks like windows tests are hung?
Eyyyy! Passing tests! I'm working on merging this into omicron and its vassal repos; on vacation right now, but hope to shake out any kinks in a week or so.
WOOT
This defines a
dropshot::Body
type that is used for both requests and responses, in place of the now-gonehyper::Body
.Most of the changes are just renames. The interesting files (at least) are:
body.rs
: This contains the new multi-purposeBody
type. It has a few constructors to make things nice. Otherwise, it's not that complex, but could be tweaked or optimized with more usage and/or measurements.server.rs
: hyper got rid of theAccept
trait. So now an accept loop is in this file manually. It also changed how graceful shutdown is coordinated, with a less-magical helper. It allows for adding a "graceful period timeout" if you eventually want.