Skip to content

dird: cats: adapt purge command to delete jobs with specific jobstatus and/or from specific pool#1349

Merged
joergsteffens merged 11 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5201-purge-failed-jobs
Mar 24, 2023
Merged

dird: cats: adapt purge command to delete jobs with specific jobstatus and/or from specific pool#1349
joergsteffens merged 11 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5201-purge-failed-jobs

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Jan 4, 2023

Thank you for contributing to the Bareos Project!

Description

This PR adds the ability for the purge command to delete jobs with a specific jobstatus and/or from specific pool.
The command used to only do so for specific volumes or clients.

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
  • Commit descriptions are understandable and well formatted
  • Check backport line
  • Is the PR title usable as CHANGELOG entry?
  • Separate commit for CHANGELOG.md ("update CHANGELOG.md"). The PR number is correct.
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
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

@alaaeddineelamri alaaeddineelamri changed the title dird: cats: adapt purgecommand to delete jobs with specific jobstatus and/or from specific pool dird: cats: adapt purge command to delete jobs with specific jobstatus and/or from specific pool Jan 4, 2023
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5201-purge-failed-jobs branch 2 times, most recently from b0777a0 to 3cf3905 Compare January 9, 2023 09:16
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5201-purge-failed-jobs branch from 3cf3905 to 94842fb Compare January 20, 2023 10:46
@joergsteffens
Copy link
Member

I also did some modifications directly in commits. Unfortunately, I'd not have the permission to modify this PR directly (I though, did is the default?). Instead I pushed my suggestions to https://github.com/joergsteffens/bareos/tree/dev/joergs/master/s5201-purge-failed-jobs

Copy link
Member

@joergsteffens joergsteffens left a comment

Choose a reason for hiding this comment

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

Nearly done, but pr-tool complains:

 ✗  Commit checks failed:
	f874336d4 refactor: systemtest: updated systemtest: body contains line longer 72 chars
	aa771a59e refactor: ua_purge.cc: remove bailouts, rename and reorder variables: headline too long
 ✗  bareos-check-sources --since=421f8eb125967d7faac63cf9acf0eddff16d2244 reported:
	Plugin 'compress c block comments' would modify 'core/src/cats/sql.cc'
	Plugin 'fix copyright year' would modify 'core/src/cats/sql.cc'
	Plugin 'fix copyright year' would modify 'core/src/cats/sql.h'

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5201-purge-failed-jobs branch from 2dd2535 to 443ea4a Compare March 20, 2023 09:07
* remove bailout
* rename and reorder variables
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5201-purge-failed-jobs branch from 443ea4a to 03efdeb Compare March 20, 2023 09:17
Alaa Eddine Elamri and others added 6 commits March 23, 2023 13:11
* removed debug level to reduce log clutter, as required messages show
 up in joblog messages
* updated expect grep to show what was found instead of expected 
value, and updated testrunner to use it
* renamed log files
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5201-purge-failed-jobs branch from 03efdeb to d12e8b1 Compare March 23, 2023 12:12
@joergsteffens joergsteffens merged commit 89ac151 into bareos:master Mar 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