Skip to content

Improve status subscription#2444

Merged
BareosBot merged 7 commits intobareos:masterfrom
arogge:remove-status-subscription-views
Nov 21, 2025
Merged

Improve status subscription#2444
BareosBot merged 7 commits intobareos:masterfrom
arogge:remove-status-subscription-views

Conversation

@arogge
Copy link
Member

@arogge arogge commented Nov 18, 2025

  • use a WITH clause instead of the views for status subscription
  • remove the two subscription views
  • add support for new plugins added in Bareos 25
  • use bytesread (uncompressed value) instead of jobbytes (compressed value) to determine the amount of data backed up
  • create tests for all plugin strings that is checked for

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
  • 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

@arogge arogge added this to the 25.0.0 milestone Nov 18, 2025
@arogge arogge self-assigned this Nov 18, 2025
@arogge arogge requested a review from pstorz November 18, 2025 15:47
@arogge arogge changed the title Replace status subscription sql views Improve status subscription Nov 18, 2025
Comment on lines +55 to +66
WHEN f.filesettext ILIKE '%{%{%meta%=%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%mssqlvdi:%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-mariabackup%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-percona%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-postgres%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-ldap%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-vmware%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-ovirt%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-libcloud%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%Plugin%=%python%:module_name=bareos-fd-qumulo%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%File%=%' THEN NULL
WHEN f.filesettext ILIKE '%{%{%File%=%Plugin%=%' OR f.filesettext ILIKE '%{%{%Plugin%=%File%=%' THEN
Copy link
Member Author

Choose a reason for hiding this comment

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

this is missing barri, proxmox and hyper-v

@pstorz pstorz requested a review from sebsura November 20, 2025 07:40
@pstorz pstorz force-pushed the remove-status-subscription-views branch from 77c1329 to dd507e8 Compare November 20, 2025 07:43
@pstorz pstorz requested review from bruno-at-bareos and removed request for sebsura November 20, 2025 07:45
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.

Looks good!

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.

We might be interested to also test ndmp classification so we will have a 100% coverage by tests.

@pstorz pstorz force-pushed the remove-status-subscription-views branch from dd507e8 to 1a8d33b Compare November 21, 2025 09:37
@pstorz pstorz mentioned this pull request Nov 21, 2025
7 tasks
@pstorz pstorz dismissed bruno-at-bareos’s stale review November 21, 2025 09:47

Requested change was applied

@arogge arogge marked this pull request as draft November 21, 2025 09:59
@arogge arogge marked this pull request as ready for review November 21, 2025 10:51
arogge and others added 7 commits November 21, 2025 12:26
these used two views in the database previously. As it turned out,
changing these requires a schema upgrade. As this is largely unfeasible,
we use a WITH-clause in the query that declares the same relations the
views have.
This removes the need for the views in the database and thus allows to
change the underlying queries without a schema change.
* remove subscriptions views from sql create script
* drop subscription views in update script
add detection of new plugins:
* proxmox
* barri
* hyper-v
Instead of jobbytes (which is the compressed size) we use bytesread
where applicable (i.e. everything that is not NDMP) to get the real
size of the front-end data that has been backed up.
add new plugins to the case for the fileset detailed view for
unclassified content, as they are now classified.
@BareosBot BareosBot force-pushed the remove-status-subscription-views branch from 17dd969 to ff8b21d Compare November 21, 2025 12:26
@BareosBot BareosBot merged commit b252aa8 into bareos:master Nov 21, 2025
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