Skip to content

contrib: add pure python statefile parser#1789

Merged
BareosBot merged 2 commits intobareos:masterfrom
arogge:dev/arogge/master/statefile-parser
Jul 1, 2024
Merged

contrib: add pure python statefile parser#1789
BareosBot merged 2 commits intobareos:masterfrom
arogge:dev/arogge/master/statefile-parser

Conversation

@arogge
Copy link
Member

@arogge arogge commented Apr 23, 2024

This PR adds a python module to read Bareos filedaemon statefiles.

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
    Required backport PRs have been created
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

@bruno-at-bareos
Copy link
Contributor

Should we anticipate the usage of that decoding for also bareos-sd ?

@bruno-at-bareos bruno-at-bareos requested a review from sebsura April 24, 2024 09:10
@arogge
Copy link
Member Author

arogge commented Apr 24, 2024

I haven't tested it, but maybe it just works?
The problem with the SD statefile parsing is that looking the last 10 jobs of an SD is usually a lot less useful (just because so much more jobs are running there).

Copy link
Contributor

@sebsura sebsura left a comment

Choose a reason for hiding this comment

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

Great work. I found a bug and added some suggestions as well.

@bruno-at-bareos
Copy link
Contributor

I haven't tested it, but maybe it just works? The problem with the SD statefile parsing is that looking the last 10 jobs of an SD is usually a lot less useful (just because so much more jobs are running there).

It just work when the state file in not empty. So good enough for contrib code.

@sebsura
Copy link
Contributor

sebsura commented May 14, 2024

We should probably write at least one systemtest for this. Nothing major. A simple backup + read state file and check for consistency should be enough.

@arogge
Copy link
Member Author

arogge commented Jun 6, 2024

We should probably write at least one systemtest for this. Nothing major. A simple backup + read state file and check for consistency should be enough.

But if we do that, then this isn't example-code for contrib anymore. Then we should clean it up, make sure it is portable and put it into the scripts directory.

Copy link
Contributor

@sebsura sebsura 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!

@arogge arogge added this to the 24.0.0 milestone Jun 25, 2024
@bruno-at-bareos bruno-at-bareos force-pushed the dev/arogge/master/statefile-parser branch from 201cafe to 14777a6 Compare July 1, 2024 12:40
@BareosBot BareosBot merged commit cd3d71b into bareos:master Jul 1, 2024
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.

4 participants