Actions
Bug #19867
closedBlock definition right after a variable definition break the compiler
Pull Request:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
14
Name check:
To do
Fix check:
To do
Regression:
Description
In a rudderlang technique, the following is correct:
CIS_rhel7_setup_filesystem state configured() { let bench = "CIS_RHEL7" if any => @index = "1.1.1.1" @component = "Ensure mounting of cramfs filesystems is disabled" { condition("${bench}_1_1_1_1").from_variable_existence("node.properties[${bench}][1.1.1.1]") if CIS_RHEL7_1_1_1_1_false => { command("lsmod | grep -q cramfs").execution_result("1", "") command("modprobe -n -v cramfs | grep -qE 'install (/bin/true|/bin/false)'").execution_result("1", "") } }
But the same without newline after the variable definition does throw a syntax error:
CIS_rhel7_setup_filesystem state configured() { let bench = "CIS_RHEL7" if any => @index = "1.1.1.1" @component = "Ensure mounting of cramfs filesystems is disabled" { condition("${bench}_1_1_1_1").from_variable_existence("node.properties[${bench}][1.1.1.1]") if CIS_RHEL7_1_1_1_1_false => { command("lsmod | grep -q cramfs").execution_result("1", "") command("modprobe -n -v cramfs | grep -qE 'install (/bin/true|/bin/false)'").execution_result("1", "") } }
And the error, which does fail on other part of the technique for no reasons:
An error occurred, could not create content from 'technique.rd': 'CIS_kernel_module': 'name' metadata is mandatory ; 'CIS_kernel_module': 'description' metadata is mandatory ; 'CIS_kernel_module': 'version' metadata is mandatory ; 'CIS_kernel_module': 'category' metadata is mandatory ; 'CIS_kernel_module': 'parameters' metadata is mandatory An error occurred, could not create content: Command was "/opt/rudder/bin/rudderc" "technique" "read" "-i" "technique.rd"
The behaviour does not seem to be fully reproductible. If I recompile right after the error, it works... Could be a cache issue?
Updated by François ARMAND over 3 years ago
- Target version changed from 7.0.0~beta1 to 899
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 899 to 7.0.0~beta3
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 7.0.0~beta3 to 7.0.0~rc1
Updated by Vincent MEMBRÉ about 3 years ago
- Target version changed from 7.0.0~rc1 to 7.0.0~rc2
- Priority changed from 32 to 31
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 7.0.0~rc2 to 7.0.0~rc3
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 7.0.0~rc3 to 7.0.0
- Priority changed from 31 to 30
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 7.0.0 to 7.0.1
Updated by Vincent MEMBRÉ almost 3 years ago
- Target version changed from 7.0.1 to 7.0.2
Updated by Vincent MEMBRÉ over 2 years ago
- Target version changed from 7.0.2 to 7.0.3
- Priority changed from 30 to 29
Updated by Alexis Mousset over 2 years ago
- Target version changed from 7.0.3 to 7.2.0~beta1
- Priority changed from 29 to 14
Updated by Alexis Mousset over 2 years ago
- Status changed from New to Rejected
Closing for now as the language is on hold.
Actions