Skip to content

Consolidate: fix for consolidate job's client name not being correctly shown#1474

Merged
arogge merged 9 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5484-consolidate-client-name
Jun 12, 2023
Merged

Consolidate: fix for consolidate job's client name not being correctly shown#1474
arogge merged 9 commits intobareos:masterfrom
alaaeddineelamri:dev/alaaeddineelamri/master/s5484-consolidate-client-name

Conversation

@alaaeddineelamri
Copy link
Contributor

@alaaeddineelamri alaaeddineelamri commented May 19, 2023

Thank you for contributing to the Bareos Project!

When doing a consolidation job of multiple jobs on of different clients, the original Client of the Consolidate job is overridden to that of the client of the last job being treated.

This PR fixes the issue.

As a small side improvement, this PR introduces the Boy Scout Rule to the developer documentation and adds a link to it in the PR template.

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
  • Check backport line
  • 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
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 force-pushed the dev/alaaeddineelamri/master/s5484-consolidate-client-name branch 6 times, most recently from fa40f39 to 221edcb Compare May 23, 2023 09:20
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review May 24, 2023 07:02
@alaaeddineelamri alaaeddineelamri marked this pull request as draft May 24, 2023 07:06
@alaaeddineelamri alaaeddineelamri marked this pull request as ready for review May 24, 2023 07:26
@sebsura sebsura self-assigned this May 30, 2023
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5484-consolidate-client-name branch 2 times, most recently from bcae8bc to a3d5e0b Compare May 31, 2023 08:16
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5484-consolidate-client-name branch from a3d5e0b to e5c7cea Compare June 2, 2023 09:05
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.

Looks fine to me. You need to apply bareos-check-sources once though.

@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5484-consolidate-client-name branch 2 times, most recently from 11bd3ed to b4f2ace Compare June 5, 2023 09:46
@alaaeddineelamri alaaeddineelamri force-pushed the dev/alaaeddineelamri/master/s5484-consolidate-client-name branch from b4f2ace to 783027e Compare June 9, 2023 09:12
Alaa Eddine Elamri added 8 commits June 12, 2023 08:57
when getting the client of the different jobs that need to be 
consolidated, the `clientid` of the `job` record of the original
consolidation job gets overridden by that of the jobs being 
consolidated. At the end of the operation, the name of the client of 
the last job being treated persists as the original Consolidate job 
client.

Other data also gets overridden, so the current fix saves the resource
and job record members of the OG Consolidation jcr before starting 
the loop and brings them back during cleanup
and move ConsolidateCleanup call to job.cc
@arogge arogge force-pushed the dev/alaaeddineelamri/master/s5484-consolidate-client-name branch from 975e04b to 8bd921d Compare June 12, 2023 06:57
@arogge arogge merged commit b423d2d into bareos:master Jun 12, 2023
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