Actions
Bug #23240
closedWindows technique generated function name is incoherent with the generated directives
Status:
Released
Priority:
1 (highest)
Assignee:
Category:
rudderc
Target version:
Pull Request:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
I hate Rudder for that
User visibility:
First impressions of Rudder
Effort required:
Very Small
Priority:
179
Name check:
To do
Fix check:
To do
Regression:
No
Description
Since 8.0 the generation process produces for a windows technique named "Test windows":
- a technique folder named "test_windows"
- the technique.ps1 file as a powershell function named "Test-Windows"
- the directives calling this technique try to call a "TestWindows" function
It results in errors like such in the agent and no reports:
PS C:\Program Files\Rudder\policy> rudder agent run Rudder agent 7.3.5.1901893715 Node uuid: 458a5afc-1171-4464-aa63-16bdf34ea696 Start execution with config [20230809-084248-a53f2fbb] Mode State Technique Component Key Message Enforce control Common start 20230809-084248-a53f2fbb Start execution Enforce result_success dsc-common Reporting configuration NXLog File C:\Program Files (x86)\nxlog\conf\nxlog.conf does not exists Enforce result_na dsc-common Service status nxlog Not applicable Enforce result_success dsc-common System variables data Defined Rudder properties, inventory variables and parameters. Enforce result_success dsc-common Agent tasks Rudder-Agent The Rudder-Agent task was already correctly setup. Enforce result_success dsc-common Agent tasks Rudder-Inventory The Rudder-Inventory task was already correctly setup. Enforce result_success dsc-common Log system for reports None All reports were successfully sent Enforce result_success dsc-common Prerun check $env:PATH Rudder presence in $env:PATH was correct TestWindows : The term 'TestWindows' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Program Files\Rudder\policy\rudder-directives.ps1:27 char:3 + TestWindows -ReportId '0bfbf8af-89dc-4c67-805a-07c9c416aed0@@b8fdad ... + ~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (TestWindows:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Enforce control Common end 20230809-084248-a53f2fbb End execution ## Summary ##################################################################### execution time: 0.98s ################################################################################I feel like there are 2 issues here:
- the generation process is incoherent in its naming
- the agent should catch such errors at the directive level
Actions