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

[WPB-1220] servantify proxy internal #4296

Merged
merged 8 commits into from
Oct 18, 2024
Merged

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-debt Changes intended at mitigating risks 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
@@ -33,12 +34,17 @@ import Network.Wai.Routing.Route (Routes, prepare)
-- This middleware requires your servers 'Routes' because it does some normalization
-- (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?

@fisx fisx requested a review from supersven October 18, 2024 09:15
@fisx fisx merged commit 0290140 into develop Oct 18, 2024
10 checks passed
@fisx fisx deleted the WPB-1220-servantify-proxy-internal branch October 18, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: technical-debt Changes intended at mitigating risks 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