Skip to content

Adapt Python DIR and SD plugin Baseclasses to the modernized Python plugin API#923

Merged
pstorz merged 3 commits intomasterfrom
dev/sduehr/master/fix-python-dir-sd-plugin
Sep 30, 2021
Merged

Adapt Python DIR and SD plugin Baseclasses to the modernized Python plugin API#923
pstorz merged 3 commits intomasterfrom
dev/sduehr/master/fix-python-dir-sd-plugin

Conversation

@sduehr
Copy link
Member

@sduehr sduehr commented Sep 14, 2021

This PR adapts the Python DIR and SD plugin Baseclasses to the modernized Python plugin API, see
https://docs.bareos.org/TasksAndConcepts/Plugins.html#modernization-of-the-python-plugin-api

It also contains a fix for the DIR plugin, where DebugMessage after certain events caused
a plugin_ctx is unset runtime error.

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

@sduehr sduehr changed the title Dev/sduehr/master/fix python dir sd plugin fix python dir sd plugin Sep 15, 2021
@sduehr sduehr changed the title fix python dir sd plugin Fix python dir sd plugin Sep 15, 2021
@pstorz pstorz changed the title Fix python dir sd plugin Adapt Python DIR and SD plugin Baseclasses to the modernized Python plugin API Sep 23, 2021
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.

Good work.

Only two comments:

  • If the asterisk imports cannot be avoided
  • the CHANGELOG.md entry is missing

@sduehr sduehr requested a review from pstorz September 23, 2021 16:39
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.

Thanks you for the explanation regarding the * imports.

What about the CHANGELOG.md entry?

@sduehr sduehr force-pushed the dev/sduehr/master/fix-python-dir-sd-plugin branch from 29d9a45 to 15ba100 Compare September 27, 2021 10:24
@sduehr sduehr requested a review from pstorz September 27, 2021 10:25
@sduehr
Copy link
Member Author

sduehr commented Sep 27, 2021

Added CHANGELOG.md entry.

sduehr and others added 3 commits September 30, 2021 13:01
Adapted the director and storagedaemon python plugin baseclasses to the
modernized python plugin interface.

Also changed the systemtests so that they use the baseclasses.
For the python director plugin, plugin_context must not be declared
thread_local in bareosdir.h, otherwise DebugMessage will throw the
plugin_ctx is unset runtime error after the bDirEventJobRun and
bDirEventJobEnd events.
@pstorz pstorz force-pushed the dev/sduehr/master/fix-python-dir-sd-plugin branch from 15ba100 to 4f5394b Compare September 30, 2021 11:02
@pstorz pstorz merged commit fb7fb1d into master Sep 30, 2021
@pstorz pstorz deleted the dev/sduehr/master/fix-python-dir-sd-plugin branch September 30, 2021 11:02
pstorz added a commit that referenced this pull request Oct 19, 2021
…ir-sd-plugin

Adapt Python DIR and SD plugin Baseclasses to the modernized Python plugin API (backport of PR #923)
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.

2 participants