Skip to content

Remove unnecessary loader/module split in Python modules for the FD#1602

Merged
BareosBot merged 11 commits intobareos:masterfrom
arogge:dev/arogge/master/merge-python-module-files
Nov 24, 2023
Merged

Remove unnecessary loader/module split in Python modules for the FD#1602
BareosBot merged 11 commits intobareos:masterfrom
arogge:dev/arogge/master/merge-python-module-files

Conversation

@arogge
Copy link
Member

@arogge arogge commented Nov 22, 2023

The title says it all: this PR merges the actual plugin-module into each plugin-loader, as we moved the job of almost everything in the loader to a decorator a few months ago.

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
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)

This patch makes the plugin compatible to PostgreSQL 10 again.
Just returning bRC_Error from load_bareos_plugin() is apparently not
enough to make Bareos fail the backup. Thus we emit an M_FATAL instead
of an M_ERROR to fast-fail the job.
This also fixes a subtle bug in the class decorator: as we weren't
returning the class, the class itself was not available under its name
which could lead to strange effects.
@arogge arogge force-pushed the dev/arogge/master/merge-python-module-files branch from 5f988c2 to 24598af Compare November 23, 2023 11:31
@sduehr sduehr changed the title Remove unneccessary loader/module split in Python modules for the FD Remove unnecessary loader/module split in Python modules for the FD Nov 23, 2023
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, looks good.
Documentation changes are not really required, but we should add some lines about the decorator to the developer guide in the future.

@arogge arogge marked this pull request as ready for review November 24, 2023 09:11
@BareosBot BareosBot merged commit eb042a0 into bareos:master Nov 24, 2023
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.

3 participants