Skip to content

[WPB-1220] servantify proxy internal#4296

Merged
fisx merged 8 commits intodevelopfrom
WPB-1220-servantify-proxy-internal
Oct 18, 2024
Merged

[WPB-1220] servantify proxy internal#4296
fisx merged 8 commits intodevelopfrom
WPB-1220-servantify-proxy-internal

Conversation

@fisx
Copy link
Contributor

@fisx fisx commented Oct 17, 2024

Servantifying the whole of proxy would have been less awkward, but there are some questions as to which services to support, and for each of them servantification is non-trivial.

On the bright side Proxy.Run doesn't need to be touched again for servantivication of the rest.

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@echoes-hq echoes-hq bot added the echoes: technical-roadmap/technical-debt More specific category, to highlight Technical Debt being tackled. label Oct 17, 2024
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Oct 17, 2024
@fisx fisx force-pushed the WPB-1220-servantify-proxy-internal branch from 2952ba0 to 786e0b2 Compare October 17, 2024 12:42
@fisx fisx marked this pull request as ready for review October 17, 2024 12:42
Also, allow for combined wai-routing + servant metrics.
@fisx fisx force-pushed the WPB-1220-servantify-proxy-internal branch from 786e0b2 to 3d024f5 Compare October 17, 2024 19:05
-- (e.g. removing params from calls)
waiPrometheusMiddleware :: (Monad m) => Routes a m b -> Wai.Middleware
waiPrometheusMiddleware routes =
waiPrometheusMiddleware routes = waiPrometheusMiddlewarePaths $ treeToPaths $ prepare routes
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit surprised by our lack of test coverage for proxy 🙄

Wouldn't this ticket have been a chance to make the beast testable and ensure we're not breaking anything? 🤔 (I may miss some details something, though.)

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 would argue "out of scope", this is only about internal end-points, and i only changed Run.hs because it seemed the most straight-forward way to do this at the time. it's tricky to test these without api keys for the resp. services. and the public routes really haven't changed in this PR, just wrapped a little.

but i agree to your point. hm, what to do?

Co-authored-by: Sven Tennie <sven.tennie@wire.com>
@fisx fisx requested a review from supersven October 18, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

echoes: technical-roadmap/technical-debt More specific category, to highlight Technical Debt being tackled. ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants