Skip to content

Inherit RunScript elements between JobDef resources#2097

Merged
BareosBot merged 3 commits intobareos:masterfrom
jschewebbn:jps/jobdef-inherit-runscript
Feb 3, 2025
Merged

Inherit RunScript elements between JobDef resources#2097
BareosBot merged 3 commits intobareos:masterfrom
jschewebbn:jps/jobdef-inherit-runscript

Conversation

@jschewebbn
Copy link
Contributor

@jschewebbn jschewebbn commented Jan 2, 2025

This change allows RunScript elements to be inherited between JobDef resources in the same way that they are inherited to Job resources from JobDef resources.

See the discussion at
#2013

Thank you for contributing to the Bareos Project!

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

@sebsura sebsura self-assigned this Jan 6, 2025
@sebsura sebsura self-requested a review January 6, 2025 13:39
@sebsura sebsura added this to the 25.0.0 milestone Jan 6, 2025
@sebsura
Copy link
Contributor

sebsura commented Jan 7, 2025

Do you want to add yourself to the authors file ?

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.

Could also you update the copyright date in this file ?

I would also like to have some kind of test for this.
Either a simple systemtest that where you can check the successful inheritance in the joblog (see examples in systemtests/tests) or a unit test like addresses_and_ports_config.cc (in core/src/tests).

You can load a config in a unit test by using DirectorPrepareResources.
You can then use GetResWithName to get the jobdef resource and check if it sucessfully inherited the runscript from a different jobdef.

Let me know if you need help for this.

@sebsura sebsura force-pushed the jps/jobdef-inherit-runscript branch 2 times, most recently from 876bfd8 to e14b987 Compare January 27, 2025 10:54
jschewebbn and others added 3 commits February 3, 2025 11:17
This change allows RunScript elements to be inherited between JobDef
resources in the same way that they are inherited to Job resources
from JobDef resources.

See the discussion at
bareos#2013
@BareosBot BareosBot force-pushed the jps/jobdef-inherit-runscript branch from deb69f6 to d758d2f Compare February 3, 2025 11:17
@BareosBot BareosBot merged commit 6ed3b37 into bareos:master Feb 3, 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.

3 participants