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

ingres: webhook: use hyper instead of the ad-hoc http implementation #17

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hnez
Copy link
Collaborator

@hnez hnez commented Aug 28, 2024

In the future we will likely want to do more things via HTTP, namely serving prometheus metrics, providing a status page (#8) or allowing the jobs inside of the machines to upload artifacts.

Growing a custom web server to do all of these things would be possible, but not really a reasonable thing to do.

Instead use the hyper crate as a HTTP server implementation for the webhook endpoint.

Using hyper as a server crate has the benefit of already being in our dependencies via the octocrab crate.

As far as I can tell this is however the only benefit of hyper (in our low-traffic usecase at least).
The interface seems to be designed by a committee of drunk lawyers that are paid by the number of crates they split their completely bonkers traits into, as a result of this it is about as ergononic as a designer chair.

The documentation is strewn all over the place between all these crates and the hyper doc writers have, in all their wisdom, included #[doc(hidden)]s in their documentation, making it even less navigable. Maybe what's hidden is proprietary knowledge that they can bill extra for.

I hated any minute working with hyper so far.
We are in for a good time.

…tion

In the future we will likely want to do more things via HTTP,
namely serving prometheus metrics, providing a status page or
allowing the jobs inside of the machines to upload artifacts.

Growing a custom web server to do all of these things would be
possible, but not really a reasonable thing to do.

Instead use the hyper crate as a HTTP server implementation for the
webhook endpoint.

Using hyper as a server crate has the benefit of already being in our
dependencies via the octocrab crate.

As far as I can tell this is however the only benefit of hyper
(in our low-traffic usecase at least).
The interface seems to be designed by a committee of drunk lawyers that
are paid by the number of crates they split their completely bonkers
traits into, as a result of this it is about as ergononic as a designer
chair.

The documentation is strewn all over the place between all these crates
and the hyper doc writers have, in all their wisdom,
included `#[doc(hidden)]`s in their documentation, making it even less
navigable. Maybe what's hidden is proprietary knowledge that they can
bill extra for.

I hated any minute working with hyper so far.
We are in for a good time.
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.

1 participant