Closed trevorshannon closed 1 year ago
I could not determine if manpage.rst is auto-generated, so I did not edit that file in case it is.
I could not determine if manpage.rst is auto-generated, so I did not edit that file in case it is.
Please do edit it and then run update-manpages.sh
and check in the results (the manpages are generated from the ReStructuredText files).
Looks good so far. Need to fix CI (unrelated to this PR).
Please rebase against master so that the CI tests can run though (see #733).
Thanks for taking a look. I made the edit to manpage.rst and ran bash update-manpages.sh
. There are more edits than I expected to the man pages, so perhaps the source and output were out of sync? I've never used sphinx; maybe there is also some sphinx user setting that's different between our two setups. I'm happy to change anything if needed.
Thanks for taking a look. I made the edit to manpage.rst and ran
bash update-manpages.sh
. There are more edits than I expected to the man pages, so perhaps the source and output were out of sync? I've never used sphinx; maybe there is also some sphinx user setting that's different between our two setups. I'm happy to change anything if needed.
Yeah you're right. If you don't mind, maybe just update the sources in docs/
and not yet re-generate the manpages (I can do that as part of the next release) (basically remove the changes in share/man/
from 436b4dec7b7986c796c49ef8c075e06f817ffb8e). Would that work for you (git rebase
+ edit
the commit and remove the share/man
changes)? I think after that change, if I haven't missed something, this is ready to be merged.
No problem, please take a look!
This is feature will be convenient for me, so I figured I'd make a PR in case you want to merge it in. It generally adds flexibility to the db garbage collection while preserving existing behavior.
In summary:
--gc-cache
to retain that number of latest snapshots instead of always retaining only the most recent 1 snapshot.--gc-cache
is equivalent to--gc-cache 1
I didn't see any existing tests for
storage.py
so I just did some tests on the command line. I was not able to test with a redis db, but if required, I'm sure I could figure out how to get it set up.Here are the test results.
First, the jobs:
The first job has some history whereas the second job is brand new:
Running with
--gc-cache 2
retains the 2 most recent snapshots for job 1 and does nothing for job 2:Populate the snapshot history a bit for both jobs, resulting in 4 snapshots for job 1 and 2 snapshots for job 2...
... and run with no retain limit argument (i.e.
--gc-cache
), which preserves the old behavior of keeping the latest 1 snapshot:Invalid retain limit args are rejected: