dird: fix odd-even weeks parsing bug in schedule#1210
Conversation
pstorz
left a comment
There was a problem hiding this comment.
Good that you found the problem :However, the test you added does not check anything.
The test needs to really test that the functionality being tested works as expected.
6a99f56 to
c65a572
Compare
c65a572 to
b485e8b
Compare
bruno-at-bareos
left a comment
There was a problem hiding this comment.
I let some comment into the code. Basically I think it will be more coherent to use the same schedule name as state into the documentation. This can be applied also to the test name.
About the change in itself, I would prefer that all the code we have for modulo keep its similarity.
...rc/tests/configs/bareos-configparser-tests/bareos-dir.d/schedule/WeeklyCycleAfterBackup.conf
Show resolved
Hide resolved
4121194 to
974cde4
Compare
974cde4 to
375b569
Compare
bruno-at-bareos
left a comment
There was a problem hiding this comment.
I approve this changes, it even fix the 3rd example we have in the documentation.
Schedule {
Name = "On the 3rd week in a 5-week-cycle"
Run = w03/w05 at 23:10
}
Before this PR we obtain
Schedule {
Name = "On the 3rd week in a 5-week-cycle"
Run = w02,w07,w12,w17,w22,w27,w32,w37,w42,w47,w52 at 23:10
}
With this PR we start on week 3 then 8 (3+5) etc...
Schedule {
Name = "On the 3rd week in a 5-week-cycle"
Run = w03,w08,w13,w18,w23,w28,w33,w38,w43,w48,w53 at 23:10
}
|
@pstorz when its build and you redone a quick review, I believe we are ok. |
375b569 to
6bc39ab
Compare
6bc39ab to
3e11fc5
Compare
bruno-at-bareos
left a comment
There was a problem hiding this comment.
Nice improvements.
Description
There is a bug where the config parser is not performing as expected when it comes to scheduling odd/even weeks
config files
parsed schedule
the odd and even weeks are flipped
If you have any questions or problems, please give a comment in the PR.
Helpful documentation and best practices
Checklist for the reviewer of the PR (will be processed by the Bareos team)
General
[ ] If backport: add original PR number and target branch at top of this file: Backport of PR#000 to bareos-2xSource code quality
bareos-check-sources --since-mergedoes not report any problemsgit statusshould not report modifications in the source tree after building and testingTests