Skip to content

plugins: Fix typo in postgresql plugin#2066

Merged
BareosBot merged 2 commits intobareos:masterfrom
AlexanderS:fix-fd-postgres-syntax-error
Dec 16, 2024
Merged

plugins: Fix typo in postgresql plugin#2066
BareosBot merged 2 commits intobareos:masterfrom
AlexanderS:fix-fd-postgres-syntax-error

Conversation

@AlexanderS
Copy link
Contributor

@AlexanderS AlexanderS commented Dec 14, 2024

This is a typo introduced in 0901b6f. The parentheses are only used to group the string concatenation and should not contain a comma. The error results in this error message:

Fatal error: bareosfd: Traceback (most recent call last):
File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 94, in restore_object_data
return bareos_fd_plugin_object.restore_object_data(rop)
File "/usr/lib/bareos/plugins/bareos-fd-postgresql.py", line 1546, in restore_object_data
bareosfd.DebugMessage(
TypeError: BareosDebugMessage() argument 2 must be str or None, not tuple

and a failed backup job.

Thank you for contributing to the Bareos Project!

Please check

  • Short description and the purpose of this PR is present above this paragraph

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
  • Required backport PRs have been created
  • Correct milestone is set
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

@AlexanderS
Copy link
Contributor Author

This was introduced in #2004 and should probably be also included in #2049.

@AlexanderS
Copy link
Contributor Author

I do not have access to the failing build in jenkins, but I doubt that the failure is related to this change.

@pstorz
Copy link
Member

pstorz commented Dec 15, 2024

I do not have access to the failing build in jenkins, but I doubt that the failure is related to this change.

Hello Alexander,

you are right, the error is not caused by your change. I just triggered a new build and test run.

Thank you for your contribution.

Copy link
Contributor

@bruno-at-bareos bruno-at-bareos left a comment

Choose a reason for hiding this comment

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

Thanks for pointing the trouble, and proposing the fix.

@bruno-at-bareos bruno-at-bareos force-pushed the fix-fd-postgres-syntax-error branch from 261932d to 0a0e99a Compare December 16, 2024 10:32
@bruno-at-bareos bruno-at-bareos added this to the 24.0.0 milestone Dec 16, 2024
This is a typo introduced in 0901b6f
The parentheses are only used to group the string concatenation and
should not contain a comma. The error results in this error message:

> Fatal error: bareosfd: Traceback (most recent call last):
>  File "/usr/lib/bareos/plugins/BareosFdWrapper.py", line 94, in
>    restore_object_data
>    return bareos_fd_plugin_object.restore_object_data(rop)
>  File "/usr/lib/bareos/plugins/bareos-fd-postgresql.py", line 1546,
>   in restore_object_data
>    bareosfd.DebugMessage(
> TypeError: BareosDebugMessage() argument 2 must be str or None, not
>  tuple

and a failed backup job.
@arogge arogge force-pushed the fix-fd-postgres-syntax-error branch from 0a0e99a to 6ede7ed Compare December 16, 2024 13:04
@BareosBot BareosBot merged commit 6e381b1 into bareos:master Dec 16, 2024
@AlexanderS AlexanderS deleted the fix-fd-postgres-syntax-error branch December 17, 2024 14:40
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.

4 participants