-
Notifications
You must be signed in to change notification settings - Fork 24
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
Manually parse JSON input #8
Conversation
Hey @nlordell - I think this recent PR bumping the version of fastapi may be the cause of issue here: I wonder if this is a bug on the Actually it looks like they are already at version 0.77.1 (here we use 0.62.2) so it might be worth updating all the way. |
Note that in SemVer versioning standard, breaking changes are allowed from
|
Whatever you want to call it, it shouldn't have broken this, but it did. Oh wait. You mean anything starting with 0. Can just be broken any time? In that case I should probably have published Dune API with a way lower version number. |
Yes. |
bb3f330
to
3109626
Compare
edit: I tried configuring the route parameters so that it accepts bodies without I also found where the issue was introduced: Note that it has since been fixed here: This means that this PR shouldn't be needed if we upgrade the Regarding:
We probably need to setup sufficient CI in order to validate that this continues to work as requirement versions get bumped. Also, have you considered using a different library (Flask comes to mind) that has a slightly more stable API? |
Also created this PR in the services repo which would make this no longer necessary: cowprotocol/services#201 |
It looks like the driver is not setting reasonable
content-type
headers for requests to external solvers. This leads to issues withfastapi
which doesn't "parse" (not sure if this is the correct term) the JSON body into theBatchAuctionModel
class.To work around this, manually parse the JSON into a batch auction model.
This PR is currently a draft as I'm exploring other options to make this work.