Skip to content

pruning: prune jobs doesn't ask for jobtypes anymore, and prunes all jobtypes except Archives (A)#1215

Merged
pstorz merged 26 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5199-improve-prune-command
Sep 19, 2022
Merged

pruning: prune jobs doesn't ask for jobtypes anymore, and prunes all jobtypes except Archives (A)#1215
pstorz merged 26 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5199-improve-prune-command

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented Aug 9, 2022

Description

The prune jobs command asks for job types but it actually just prunes all types anwyay (except Archive and Consolidate).

This PR removes the job type choice and makes the prune jobs command prune all types except Archive (A), meaning that consolidate jobs now get pruned too.

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
  • [ ] If backport: add original PR number and target branch at top of this file: Backport of PR#000 to bareos-2x
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
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

@pstorz pstorz requested a review from bruno-at-bareos August 11, 2022 09:54
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch 6 times, most recently from ca357b9 to 6169d8e Compare August 17, 2022 14:54
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.

del ctx manipulation has to be avoided.
We should also check if the 1000 limit is needed (query length limit in libpq)

pstorz also want to add

394: =================================================================
394: ==1123923==ERROR: LeakSanitizer: detected memory leaks
394: 
394: Direct leak of 2640 byte(s) in 10 object(s) allocated from:
394:     #0 0x7f4a738ae91f in __interceptor_malloc (/lib64/libasan.so.6+0xae91f)
394:     #1 0x7f4a724f2fb1 in GetMemory(int) src/lib/mem_pool.cc:111
394: 
394: SUMMARY: AddressSanitizer: 2640 byte(s) leaked in 10 allocation(s).
394: Process 1123923 has exited.

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch 7 times, most recently from 82710fc to e8ac75e Compare August 19, 2022 16:43
@pstorz pstorz self-requested a review August 22, 2022 09:54
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.

See comments. Good work!

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch 2 times, most recently from 2e2209e to 8bc7c25 Compare August 23, 2022 13:37
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!

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch from 377754f to 0b4aede Compare August 31, 2022 05:50
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch from 0b4aede to 1d85e4f Compare September 8, 2022 07:31
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch from 1d85e4f to 26c3484 Compare September 12, 2022 09:43
@pstorz pstorz force-pushed the dev/alaaeddineelamri/master/s5199-improve-prune-command branch from 26c3484 to a0c366d Compare September 19, 2022 08:54
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. I cleaned up one commit comment and removed the introduction and revert of the foreach_alist_no_null_check macro.

If build passes we can merge.

@pstorz pstorz merged commit f391ac2 into bareos:master Sep 19, 2022
@pstorz pstorz deleted the dev/alaaeddineelamri/master/s5199-improve-prune-command branch September 19, 2022 10:37
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