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

Bump prost and tonic dependency to 0.13.1 and 0.12.1 respectively #1748

Merged
merged 5 commits into from
Jul 25, 2024

Conversation

tillrohrmann
Copy link
Contributor

This commit bumps the prost dependency to version 0.13.1 and tonic
to 0.12.1. We needed to keep a tonic 0.10 dependency in the restate-node
and restate-admin crates because the arrow-flight dependency uses it and
we need to convert from tonic_0_10::Status to tonic::Status.

This fixes #1745.

This PR is based on #1746.

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

LGTM

}

#[instrument(level = "info", skip_all, fields(server_name = %server_name, uds.path = tracing::field::Empty, net.host.addr = tracing::field::Empty, net.host.port = tracing::field::Empty))]
pub async fn run_hyper_server<S, B>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that I look at this, I think the admin server should use this same code to serve a server.

Perhaps how about you extract this in a separate small crate, like restate-hyper-util, where you have this serve function that serves on the task center?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can certainly share this functionality. I briefly looked at it but saw a difference with the ConnectInfo. That's why I didn't change it. Further refactoring I will leave as a follow-up.

Comment on lines 223 to 238
impl<F> hyper::rt::Executor<F> for TaskCenterExecutor
where
F: Future + 'static + Send,
F::Output: Send + 'static,
{
fn execute(&self, fut: F) {
// ignore shutdown error
let _ =
self.task_center
.spawn_child(TaskKind::RpcConnection, self.name, None, async move {
// ignore the future output
let _ = fut.await;
Ok(())
});
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Also this one makes sense to live in its own rust crate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Follow-up issue.

.include_headers(true)
.level(tracing::Level::ERROR);

let reflection_service_builder = tonic_reflection_0_10::server::Builder::configure()
let reflection_service_builder = tonic_reflection::server::Builder::configure()
Copy link
Contributor

Choose a reason for hiding this comment

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

beware that latest tonic_reflection was updated to grpc reflection v1 imports, perhaps double check if it still works with grpcurl/grpcui

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I haven't tried this one but I wouldn't be too worried because the metadata store and the node server are not really user facing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to work with my grpcurl version 1.8.9.

Comment on lines +89 to +92
let service = TowerToHyperService::new(
server_builder
.into_service()
.map_request(|req: Request<Incoming>| req.map(boxed)),
);
Copy link
Contributor

Choose a reason for hiding this comment

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

nice

This commit bumps the prost dependency to version 0.13.1 and tonic
to 0.12.1. We needed to keep a tonic 0.10 dependency in the restate-node
and restate-admin crates because the arrow-flight dependency uses it and
we need to convert from tonic_0_10::Status to tonic::Status.

This fixes restatedev#1745.
Since all components are now using http 1.0 we can directly pass on the
respective types.
@tillrohrmann
Copy link
Contributor Author

Thanks for the review @slinkydeveloper. Merging this PR now.

@tillrohrmann tillrohrmann merged commit b7b1c24 into restatedev:main Jul 25, 2024
6 checks passed
@tillrohrmann tillrohrmann deleted the issues/1745 branch July 25, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants