Prevent double monkey-patching experimental storage#1109
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1109 +/- ##
==========================================
- Coverage 81.76% 81.75% -0.01%
==========================================
Files 142 142
Lines 15612 15612
==========================================
- Hits 12765 12764 -1
- Misses 2847 2848 +1
Continue to review full report at Codecov.
|
includes tests for double patching and for unpatching
|
Tests weren't quite as bad as I feared, once I sat down to write them. This is ready for review and comment. I will leave it open for at least 48 hours, merging no earlier than Thu 28 Jul 00:00 GMT (Wed 27 Jul 19:00 my local). |
sroet
left a comment
There was a problem hiding this comment.
A couple comments, nothing mayor, so feel free to ignore if you have a different opinion
|
All my comments have been handled (all of them where due to me misremembering how python does things). This LGTM, feel free to merge |
It was possible to double monkey-patch for the experimental storage. This caused many headaches downstream (e.g., OPS CLI) because that meant that something downstream had to track state of whether OPS had been monkey-patched. It also might be the problem behind #1108. This PR makes it so that monkey-patching is idempotent.
Marked WIP because it still needs tests (which will be slightly a pain), but this is the implementation I'm planning on.