uktrade / mobius3

Continuously sync folder to S3, using inotify under the hood
MIT License
50 stars 3 forks source link

build(deps): remove dependency on lowhaio and move to httpx #48

Closed michalc closed 1 year ago

michalc commented 1 year ago

The main reason for this is since lowhaio is suspected to hang, and deeming it not worth investigating or fixing. Even if we still get hanging for some reason, I suspect we would be in a better place, maintainability wise, to use a more standard http client.

This touches a lot of the code, including tests. To make coding (and review) as un-overwhelming as possible, each commit has a single (or at least few) aims, and keeps the tests passing. There are a few "cleanup" commits that aren't strictly necessary, but the main methodology of this PR is:

This also results in not using 0x20 encoding for resolving host names, so this isn't technically just an implementation detail change. While potentially this makes this a little bit less secure, it's not really that typical to be using this, a bit beyond the scope of what this level of code "should" care about I think, and it needs to be turned off when communicating with Docker containers anyway.

Logging will be a bit different, but hope the logging placed into httpx's event hooks will still make it not meaningfully harder to debug any issues.

DT-340