-
Notifications
You must be signed in to change notification settings - Fork 28
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
Record based on parameter hashing #78
base: develop
Are you sure you want to change the base?
Conversation
This changes the save/load behavior from incrementing on each call to hashing the parameters and body in the API request. So if the same request is sent and we recieve different parameters it should overwrite the previous response. The exception to this is if the api call is paginated, in which case we should increment the index counter rather then overwriting. Behavior on pagination vs incrementing still needs testing.
Codecov Report
@@ Coverage Diff @@
## develop #78 +/- ##
==========================================
Coverage ? 90.10%
==========================================
Files ? 4
Lines ? 293
Branches ? 0
==========================================
Hits ? 264
Misses ? 29
Partials ? 0
Continue to review full report at Codecov.
|
Just FYI, I might need to hard fork this soon. My use is fairly different from how this project is intended to be used, will see how it goes though. Wanted to at least open this PR in case other people find it useful. |
boto3 doesn't support this but we can short circuit in the hooks to get the same behavior.
So far it seems simply including it in the hash works so far. I believe this will break some cases, think it's worth it to just sort those out as they come up since this simplifies the code quite a bit.
Removing pagination support for now since this was buggy. The API's I've been testing so far don't use random markers so just including them in the hash work's out ok. Will see if I run into any issues here. |
Just realized I never removed the WIP label. I believe this is working.. I haven't used this in a bit though and don't have a need for it anymore. Mentioned this above but will leave this open in case it's useful to anyone, otherwise can just be closed. Edit: Well.. I guess works, without pagination. Or something like that. |
Summary
This changes the save/load behavior from incrementing on each call to hashing the parameters and body in the API request.
So if the same request is sent and we receive different parameters it should overwrite the previous response. The exception to this is if the api call is paginated, in which case we should increment the index counter rather then overwriting.
Related
TODO