User story #7006
closedParameter validation in Rudder should accept rudder variables ( ${ } )
Description
The fileds with regexp validation are validating exactly the text we pass. However, they do not accept the ${ }, which could contain proper value. It simply prevent us from using variablles altogether
Updated by Vincent MEMBRÉ over 9 years ago
- Target version changed from 2.11.13 to 2.11.14
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.11.14 to 2.11.15
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.11.15 to 2.11.16
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.11.16 to 2.11.17
Updated by Vincent MEMBRÉ about 9 years ago
- Target version changed from 2.11.17 to 2.11.18
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.11.18 to 2.11.19
Updated by Vincent MEMBRÉ almost 9 years ago
- Target version changed from 2.11.19 to 2.11.20
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.20 to 2.11.21
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.21 to 2.11.22
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.22 to 2.11.23
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.23 to 2.11.24
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 2.11.24 to 308
Updated by Vincent MEMBRÉ over 8 years ago
- Target version changed from 308 to 3.1.14
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.14 to 3.1.15
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.15 to 3.1.16
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.16 to 3.1.17
Updated by Vincent MEMBRÉ about 8 years ago
- Target version changed from 3.1.17 to 3.1.18
Updated by Vincent MEMBRÉ almost 8 years ago
- Target version changed from 3.1.18 to 3.1.19
Updated by Benoît PECCATTE almost 8 years ago
- Tracker changed from Bug to User story
- Subject changed from Regex validation in Rudder does not accept rudder variables ( ${ } ) to Regex validation in Rudder should accept rudder variables ( ${ } )
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.20 to 3.1.21
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.21 to 3.1.22
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.22 to 3.1.23
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.23 to 3.1.24
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 3.1.24 to 3.1.25
Updated by Benoît PECCATTE about 7 years ago
- Target version changed from 3.1.25 to 4.1.9
Updated by Vincent MEMBRÉ about 7 years ago
- Target version changed from 4.1.9 to 4.1.10
Updated by Benoît PECCATTE almost 7 years ago
- Target version changed from 4.1.10 to Ideas (not version specific)
Updated by Nicolas CHARLES almost 5 years ago
- Related to Bug #16725: Directive 'Processes' Number of processes cannot be a property added
Updated by François ARMAND almost 5 years ago
We should just accept parameter variable, always. Of course they can break afterward, but here we are preventing valid, common usage. Validation (client side validation) should always be just an advice.
We can't either really try to wait for generation and fail there, because some variables can be only defined on agent.
So, I would say:
1/ authorize parameter in regex check
2/ if possible, for variable whose value is known at generation, add back the regex check post expansion.
Another question: how does it works for "can not be empty" variable? Of course, technicaly "${something}" is not the empty string, but its expansion may be. Do we check post expansion correctly? If not, we should (and the regex case is even more inconsistant)
Updated by François ARMAND almost 5 years ago
- Suggestion strength set to Want - This would make my life a lot easier but I can manage without
- User visibility set to Getting started - demo | first install | Technique editor and level 1 Techniques
- Effort required set to Very Small
Updated by Alexis Mousset over 4 years ago
- Target version changed from Ideas (not version specific) to 6.1.0~beta2
- Suggestion strength changed from Want - This would make my life a lot easier but I can manage without to Require - I need this to use Rudder as I intend
Let's do this in 6.1, now we have properties everywhere.
Updated by François ARMAND over 4 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND over 4 years ago
- Related to Bug #11449: Allow variable as directive parameters in regexp validated inputs added
Updated by François ARMAND over 4 years ago
- Subject changed from Regex validation in Rudder should accept rudder variables ( ${ } ) to Parameter validation in Rudder should accept rudder variables ( ${ } )
Updated by François ARMAND over 4 years ago
Actually, boolean can't be an interpolated variable, because we translate them into checkbox in the UI, and checkbox need to know if it's true
or false
to display correctly. We could use a special widget that let user enter a value, but it becomes complicated and will be for an other time (I'm not even sure we want to go that way).
Updated by François ARMAND over 4 years ago
Work in progess here: https://github.com/fanf/rudder/commit/d9e7d1e66207b37f8137f7062a6d35c49fff2e7a
Updated by François ARMAND over 4 years ago
Work in progess here: https://github.com/fanf/rudder/commit/a1f2620e898be82f36a51753d35ad84c547f556e
Updated by François ARMAND over 4 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Vincent MEMBRÉ
- Pull Request set to https://github.com/Normation/rudder/pull/2942
Updated by François ARMAND over 4 years ago
So, to sum, we will be able to have parameter where regex or int are awaited (and string of course), but not boolean because boolean need to be known when the directive is configured to display the checkbox state (and there's no way to enter the property in all cases).
We kept the old behavior, so any ${...}
is authorized (to allow cfengine/etc node side expansion), but if the variable is a rudder one (ie: ${rudder.*}
or ${node.properties[...]}
we DO check that the variable is ok (is defined for rudder ones, is well formed for node properties - we can't check for existence, of course, since we are in a directive, not in nodes).
The corresponding PR also change a technical backend point: the parser lib used to parse properties was switched to a new one: "fastparse".
Updated by Vincent MEMBRÉ over 4 years ago
- Target version changed from 6.1.0~beta2 to 6.1.0~beta3
Updated by François ARMAND over 4 years ago
- Related to Bug #17334: Property name aren't limited to ascii added
Updated by François ARMAND over 4 years ago
- Status changed from Pending technical review to Pending release
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.1.0~beta3 which was released today.
Updated by François ARMAND over 4 years ago
- Fix check changed from To do to Checked
Updated by François ARMAND over 4 years ago
- Related to Bug #17842: it's impossible to use parameters in technique editor when there are constraints as it doesn't match the regex added