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

dird: enable default options in fileset config when no options are explicitly specified #1357

Conversation

alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Jan 17, 2023

Description

When a fileset configuration does not include an options section, the default values would not be applied. Defaults would only apply when the config parser finds an options section.

This PR makes sure default options are set even when no options section is specified.

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)

General
  • PR name is meaningful
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
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
  • bareos-check-sources --since-merge does not report any problems
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

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5318-enable-default-options-fileset branch from a2f79ad to a5a6190 Compare February 20, 2023 13:03
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

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

This is a very nice and elegant solution for the problem. What I am missing is a test that prooves that the value values are correctly set even if a fileset has no options block. That can probably be added quickly to a gtest.

Best regards,

Philipp

@pstorz pstorz force-pushed the dev/alaaeddineelamri/master/s5318-enable-default-options-fileset branch from a5a6190 to e2abf46 Compare March 2, 2023 17:40
@pstorz pstorz force-pushed the dev/alaaeddineelamri/master/s5318-enable-default-options-fileset branch from 60b4b88 to eebf74e Compare March 2, 2023 17:42
@pstorz pstorz merged commit f321325 into bareos:master Mar 2, 2023
@pstorz pstorz deleted the dev/alaaeddineelamri/master/s5318-enable-default-options-fileset branch March 2, 2023 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants