The problem here is that checking of the from,to and step values are not validated in the config stage, it just checks that the input for each item is a valid number or a macro.
So at run time the checking of the from, to and step is done.
these checks are done so that there is no cases where an infinite amount of jobs are started.
So this requires that START and END is an inclusive group when the step is applied
examples:
1. FROM=10 and TO=0 can be valid if STEP=-1(-ive)
i.e Go in a negative direction.
2. FROM=100 and TO=110 can be valid if STEP=1 (+ive)
i.e Go in a negative direction.
Invalid cases
1. FROM=10 and TO=0 can be invalid if STEP=2 (+ive)
i.e would never reach the value of 0 as would hit maximum value first and have an exception at this point.
2. FROM=100 and TO=110 can be invalid if STEP=-1 (-ive)
i.e would never reach the value of 110 as would hit minimum value first and have an exception at this point.
The code that checks this just throws a Runtime Exception if these checks fail.
There is a possibility that the factory could be modified with an option to not trigger these projects if the validation of the stepping fails.
However that only covers one case, as it may also be required that the parameters are not used and not passed on in the
failing cases. i.e. return no parameters.
So I propose having an option that allows the three behaviours on stepping validation:
Fail the build - RuntimeExecption (default current behaviour)
Skip the triggering - DontTriggerException - no jobs triggered in this trigger(other project might be triggered is they have different configuration)
Do not add parameters - return no parameters - projects still triggered without counter factory values.
The problem here is that checking of the from,to and step values are not validated in the config stage, it just checks that the input for each item is a valid number or a macro.
So at run time the checking of the from, to and step is done.
these checks are done so that there is no cases where an infinite amount of jobs are started.
So this requires that START and END is an inclusive group when the step is applied
examples:
1. FROM=10 and TO=0 can be valid if STEP=-1(-ive)
i.e Go in a negative direction.
2. FROM=100 and TO=110 can be valid if STEP=1 (+ive)
i.e Go in a negative direction.
Invalid cases
1. FROM=10 and TO=0 can be invalid if STEP=2 (+ive)
i.e would never reach the value of 0 as would hit maximum value first and have an exception at this point.
2. FROM=100 and TO=110 can be invalid if STEP=-1 (-ive)
i.e would never reach the value of 110 as would hit minimum value first and have an exception at this point.
The code that checks this just throws a Runtime Exception if these checks fail.
There is a possibility that the factory could be modified with an option to not trigger these projects if the validation of the stepping fails.
However that only covers one case, as it may also be required that the parameters are not used and not passed on in the
failing cases. i.e. return no parameters.
So I propose having an option that allows the three behaviours on stepping validation:
Fail the build - RuntimeExecption (default current behaviour)
Skip the triggering - DontTriggerException - no jobs triggered in this trigger(other project might be triggered is they have different configuration)
Do not add parameters - return no parameters - projects still triggered without counter factory values.