Skip to content

plugin-fd: allow fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks#1505

Merged
BareosBot merged 7 commits intobareos:masterfrom
arogge:dev/arogge/master/plugin-set-since-time
Aug 23, 2023
Merged

plugin-fd: allow fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks#1505
BareosBot merged 7 commits intobareos:masterfrom
arogge:dev/arogge/master/plugin-set-since-time

Conversation

@arogge
Copy link
Member

@arogge arogge commented Jul 10, 2023

This PR allows a plugin to configure effective since-time on the client side. A plugin can now also disable calls to CheckChanges() to avoid files being filtered out because of timestamps/accurate. For that a new plugin setting bVarCheckChanges was added.

This PR also removes non-working functionality from SetValue() and does some refactoring.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

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)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
    Check backport line
  • Required backport PRs have been created
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

@arogge arogge changed the title Allow python fd plugins to (re-)set the since-time Allow python fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks Jul 13, 2023
@arogge arogge changed the title Allow python fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks Allow fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks Jul 13, 2023
@sebsura sebsura changed the title Allow fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks plugin-fd: allow fd plugins to (re-)set since-time and disable/re-enable timestamp/accurate checks Aug 10, 2023
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

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

All in all it looks good. I found some minor issues though.

@arogge arogge force-pushed the dev/arogge/master/plugin-set-since-time branch from d406000 to a2ab828 Compare August 18, 2023 09:20
Copy link
Contributor

@sebsura sebsura 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. Ill approve once all the open conversations are addressed.

@arogge arogge force-pushed the dev/arogge/master/plugin-set-since-time branch from f85bbae to bd316ed Compare August 21, 2023 11:37
Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

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

Great work!

arogge and others added 7 commits August 23, 2023 12:48
This changeset enables a few things that were not possible before:

override save_time in save_pkt, allowing a plugin to reset the effective
since-time on a file-by-file basis.

using SetValue() in a python plugin you can now reset since-time, which
will also set or clear the incremental flag as needed.
This allows a python plugin to call `SetValue(bVarSinceTime, 0)` to
make sure the core will not decide to skip any of the files it provides.
This tests adds a plugin that backs up the same unchanged file in an
incremental job, to make sure this is actually possible if desired.
@BareosBot BareosBot force-pushed the dev/arogge/master/plugin-set-since-time branch from 2034e3c to 8fe4282 Compare August 23, 2023 12:48
@BareosBot BareosBot merged commit 24de795 into bareos:master Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants