Bug #17811
closedfix nasty random generation failure
Description
Generation of a technique in rudder-lang randomly failed for no obvious reason.
After investigation it appeared that this bug were exposed by a duplicate variable declaration located in the rudder-lang library.
The bug was hidden in a recursive function whose purpose was to generate the context tree (which is very important to register variables and their relative namespaces).
Duplicates weren't detected properly (recursion had flow flaws), and when they were (if the duplicate was the first entry of the context tree hashmap) it led to a crash.
Investigating this, I noticed another issue: namespaces weren't push right, ie:
```
sys.arch.linux
sys.arch.windows
```
Would led to
Context { arch { windows } }
instead of:
Context { arch { linux, windows } }
Now program behaves properly:
- warns the user when a duplicate is declared
- properly generates the tree regardless of its elements order
- properly pushes nested content
- added tests unit
Updated by Gaëtan POBLON over 4 years ago
- Description updated (diff)
- Status changed from Pending technical review to In progress
Updated by Gaëtan POBLON over 4 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Gaëtan POBLON to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder/pull/3098
Updated by Anonymous over 4 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|16c9e27b838910afffcbe9de015280c19fc59e67.
Updated by Gaëtan POBLON over 4 years ago
- Fix check changed from To do to Checked
Updated by Vincent MEMBRÉ over 4 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 6.1.1 which was released today.