Actions
Bug #22535
closedMustache template is not capable to render technique parameters on windows nodes
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
I hate Rudder for that
User visibility:
Getting started - demo | first install | Technique editor and level 1 Techniques
Effort required:
Small
Priority:
157
Name check:
To do
Fix check:
Checked
Regression:
No
Description
The current windows technique generated by the webapp does not register the technique parameters as a global variable for the technique run, it should.
function Super-Technique-To-Test-Everything { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [string]$reportId, [parameter(Mandatory=$true)] [string]$techniqueName, [parameter(Mandatory=$true)] [string]$one_params, [parameter(Mandatory=$true)] [string]$two_params, [Rudder.PolicyMode]$policyMode ) BeginTechniqueCall -Name $techniqueName ..... EndTechniqueCall -Name $techniqueName }
Should be:
function Super-Technique-To-Test-Everything { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [string]$reportId, [parameter(Mandatory=$true)] [string]$techniqueName, [parameter(Mandatory=$true)] [string]$one_params, [parameter(Mandatory=$true)] [string]$two_params, [Rudder.PolicyMode]$policyMode ) $techniqueParams = @{ "one_params" = $one_params "two_params" = $two_params } BeginTechniqueCall -Name $techniqueName -Parameters $techniqueParams ..... EndTechniqueCall -Name $techniqueName
Where BeginTechniqueCall will have an additional code looking like this:
Add-PolicyRudderVar -Name $techniqueName -Value $techniqueParams
The Add-PolicyRudderVar is named Rudder-Var in 7.3+ and is present in the agent modules. But for 7.2 compatibility we will most likely have to backport it in ncf.
Actions