Project

General

Profile

Actions

Bug #25429

closed

When a mandatory variable has not value but a default one is configured, use it

Added by François ARMAND 3 months ago. Updated about 2 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

For now, the "default" value in technique metadata is only use to set the first initial value on a directive field.

Sometime, for example during migration, a new mandatory variable is added to a technique and directive already exists.
When we set that variable with a default value, we still get a generation error because the default value is not use, because there wasn't a loop throught updating the directive which would allow to provide the directive with the value.

We want to change that and just use the default value if:
- the variable is mandatory,
- it has no value (or only empty value, which is the same in Rudder).

We won't change anything for an optional variable with a default value. In that case, it's still possible to use an empty value.

The effect of that change is that the technique creator can choose to avoid user to go all of their existing technique and update them and still ask for a mandatory value.
The current alternative is to mark the variable as optionnal and check in the cfengine/powershell code for the availability of a value, and use the default here (which is more involving and duplicate the work).

Actions #1

Updated by François ARMAND 3 months ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #2

Updated by François ARMAND 3 months 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/5863
Actions #3

Updated by Anonymous 2 months ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by François ARMAND 2 months ago

  • Fix check changed from To do to Checked
Actions #5

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.1.7 which was released today.

Actions

Also available in: Atom PDF