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

Python plugins: add default module_path to search path #1038

Merged
merged 10 commits into from
Feb 7, 2022

Conversation

joergsteffens
Copy link
Member

@joergsteffens joergsteffens commented Dec 23, 2021

Currently all Python modules get installed to the plugin directory.
However, every plugin configuration requires the parameter module_path set to this value.

This PR adds the Python Plugin module path to the default search path, so that specifying the module_path is only unnecessary in non-standard installations.

OP#5043

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
  • Separate commit for this PR in the CHANGELOG.md, PR number referenced is same
  • Commit descriptions are understandable and well formatted
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
  • git status should not report modifications in the source tree after building and testing

@joergsteffens joergsteffens force-pushed the dev/joergs/master/default-plugin-path branch from 5e122ff to edcf6e4 Compare December 23, 2021 11:33
@joergsteffens joergsteffens force-pushed the dev/joergs/master/default-plugin-path branch 2 times, most recently from d153f3c to 1b0b509 Compare January 13, 2022 18:07
@joergsteffens joergsteffens marked this pull request as ready for review January 13, 2022 18:08
@joergsteffens joergsteffens force-pushed the dev/joergs/master/default-plugin-path branch from 1b0b509 to 99ed130 Compare January 20, 2022 13:07
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.

Checked first commit and the changes look good to me.
Good work!

@joergsteffens joergsteffens assigned sduehr and unassigned pstorz Jan 26, 2022
Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

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

Thanks a lot, only found some typos.

joergsteffens and others added 10 commits February 2, 2022 15:05
Use PYTHON_MODULE_PATH as default Python module search path for Python plugins.
Also use identical "PyLoadModule" function for all daemons.
Before all 3 python plugins did use there own version
of the PyLoadModule function.
Co-authored-by: sduehr <stephan.duehr@bareos.com>
Only keep general information about Python Plugins in the "Tasks and Concepts" chapter,
moving the implentation details to the Development Guide chapter.

Change the ordering in the Developement chapter to start with the current version of the Python Plugin:
* Python Plugins for Bareos >= 20
* Python Plugins for Bareos < 20
* Migrating Python Plugins to Bareos >= 20
Co-authored-by: sduehr <stephan.duehr@bareos.com>
@joergsteffens joergsteffens force-pushed the dev/joergs/master/default-plugin-path branch from 689a586 to 6e128f6 Compare February 2, 2022 14:21
@joergsteffens
Copy link
Member Author

@sduehr thank you for your suggestions. I've applied them and then rebased them on master, because of a merge conflict. It would be great, if you can review this PR again. Also 5 check-marks are not set. Do you request changes from my side?

@joergsteffens
Copy link
Member Author

joergsteffens commented Feb 2, 2022

@sduehr one additional thing to consider is if it is appropriate to update the Python plugins version numbers from 4 to 5. Currently for all 3 Python plugins is is defined as:

#define PLUGIN_DATE "May 2020"
#define PLUGIN_VERSION "4"

As discussed: not version change required.

Copy link
Member

@sduehr sduehr left a comment

Choose a reason for hiding this comment

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

Thanks a lot, looks good now.

@sduehr sduehr merged commit 42c4411 into master Feb 7, 2022
@joergsteffens joergsteffens deleted the dev/joergs/master/default-plugin-path branch March 10, 2022 10:10
pstorz pushed a commit to arogge/bareos that referenced this pull request Apr 26, 2022
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