Skip to content
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

Add configuration for lease maintenance behavior #255

Merged
merged 17 commits into from
Dec 6, 2021

Conversation

exarkun
Copy link
Collaborator

@exarkun exarkun commented Nov 18, 2021

Fixes #169

Probably done but I'm going to integrate it w/ GridSync before saying so for sure.

Per discussion elsewhere, GridSync also/instead needs a different integration point for answering the question it has. So this is probably fine as-is (and maybe also not useful in the near term - but still maybe useful in the long term, and at least not harmful right now).

@codecov
Copy link

codecov bot commented Nov 18, 2021

Codecov Report

Merging #255 (96b752a) into main (fe9341a) will increase coverage by 0.09%.
The diff coverage is 97.29%.

❗ Current head 96b752a differs from pull request most recent head 5396725. Consider uploading reports for the commit 5396725 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #255      +/-   ##
==========================================
+ Coverage   94.40%   94.49%   +0.09%     
==========================================
  Files          49       50       +1     
  Lines        4144     4195      +51     
  Branches      532      537       +5     
==========================================
+ Hits         3912     3964      +52     
+ Misses        190      187       -3     
- Partials       42       44       +2     
Impacted Files Coverage Δ
src/_zkapauthorizer/tests/strategies.py 95.73% <83.33%> (-0.77%) ⬇️
src/_zkapauthorizer/_plugin.py 87.23% <100.00%> (+0.27%) ⬆️
src/_zkapauthorizer/config.py 100.00% <100.00%> (ø)
src/_zkapauthorizer/lease_maintenance.py 95.89% <100.00%> (+2.45%) ⬆️
...rc/_zkapauthorizer/tests/test_lease_maintenance.py 96.37% <100.00%> (+1.60%) ⬆️
src/_zkapauthorizer/tests/test_plugin.py 100.00% <100.00%> (ø)
src/_zkapauthorizer/tests/test_storage_server.py 43.96% <0.00%> (-1.08%) ⬇️
src/_zkapauthorizer/tests/test_model.py 92.44% <0.00%> (-0.45%) ⬇️
src/_zkapauthorizer/tests/test_storage_protocol.py 91.32% <0.00%> (+0.03%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe9341a...5396725. Read the comment docs.

docs/source/configuration.rst Outdated Show resolved Hide resolved
docs/source/configuration.rst Outdated Show resolved Hide resolved
avoids ambiguities and implementation problems of iso8601 duration strings

go back to aniso8601 dependency, since we no longer get anything distinctive
from isodate
@exarkun exarkun marked this pull request as ready for review November 30, 2021 15:15
Copy link
Contributor

@tomprince tomprince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. It would be nice if the config section to read from was not hard-coded in a leaf function, but that isn't blocking.

src/_zkapauthorizer/config.py Show resolved Hide resolved
Comment on lines +15 to +17
"""
Helpers for reading values from the Tahoe-LAFS configuration.
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we want to have separate modules for client and server config. Other than empty_config (which I guess is a test fixture), all the stuff here is client specific.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be, yea. Since this project started it has become clear that two different plugins may have made more sense than a single plugin with such a tightly coupled implementation. We could probably try to keep the pieces as separate as possible until a more definitive decoupling happens. I'll keep it in mind for future development.

@exarkun exarkun merged commit 4144607 into main Dec 6, 2021
@exarkun exarkun deleted the 169.lease-maint-from-config branch December 6, 2021 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Accept configuration controlling the lease crawler scheduling and other behavior
2 participants