PrivateStorageio / ZKAPAuthorizer

a Tahoe-LAFS storage-system plugin which authorizes storage operations based on privacy-respecting tokens
10 stars 7 forks source link

expose recovery capability from setup endpoint even for CONFLICT case #414

Closed exarkun closed 2 years ago

exarkun commented 2 years ago

If a replica is already set up then be sure to return it in the CONFLICT error response if a client tries to set up replication again.

Also improve the OpenAPI spec by deleting the stuff that no longer exists, update the design doc to reflect the websocket-based API, and make a few mypy improvements in the area of the changing code.

Fixes #413

codecov[bot] commented 2 years ago

Codecov Report

Merging #414 (2f8d991) into main (148f92f) will decrease coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #414      +/-   ##
==========================================
- Coverage   96.27%   96.25%   -0.02%     
==========================================
  Files          63       63              
  Lines        7511     7525      +14     
  Branches     1013     1012       -1     
==========================================
+ Hits         7231     7243      +12     
- Misses        208      209       +1     
- Partials       72       73       +1     
Impacted Files Coverage Δ
src/_zkapauthorizer/controller.py 93.11% <100.00%> (+0.02%) :arrow_up:
src/_zkapauthorizer/recover.py 97.65% <100.00%> (ø)
src/_zkapauthorizer/replicate.py 95.62% <100.00%> (+0.04%) :arrow_up:
src/_zkapauthorizer/resource.py 99.25% <100.00%> (+0.01%) :arrow_up:
src/_zkapauthorizer/tests/test_client_resource.py 98.00% <100.00%> (ø)
src/_zkapauthorizer/tests/test_recover.py 99.09% <100.00%> (+0.01%) :arrow_up:
src/_zkapauthorizer/tests/strategies.py 96.47% <0.00%> (-0.71%) :arrow_down:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more