Project

General

Profile

Actions

Bug #23341

closed

Rudderc transform some method parameter name in an incorrect manner

Added by Félix DALLIDET 9 months ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
rudderc
Target version:
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:
200
Name check:
To do
Fix check:
To do
Regression:
No

Description

A good example is "Report-If-Condition", its parameter name is generated by rudderc as "Report-Message" in the powershell file, when the cf bundle does define "report_Message".
I think that rudderc uses the function formatting to translates parameter names. It does work for single word param names.

    if ($localContext.Evaluate($class)) {
        $methodParams = @{
            Condition = "false" 
            Report-Message = "TODO" 

        }
        $call = Report-If-Condition @methodParams -PolicyMode $policyMode
        $methodContext = Compute-Method-Call @reportParams -MethodCall $call
        $localContext.merge($methodContext)

Report-Message is here interpreted as a function call by Powershell, it should instead be ReportMessage.

Actions #1

Updated by Félix DALLIDET 9 months ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
Actions #2

Updated by Félix DALLIDET 9 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/5001
Actions #3

Updated by Félix DALLIDET 9 months ago

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

Updated by Félix DALLIDET 9 months ago

  • Parent task deleted (#23273)
Actions #6

Updated by Vincent MEMBRÉ 8 months ago

  • Status changed from Pending release to Released
  • Priority changed from 100 to 200

This bug has been fixed in Rudder 8.0.0~beta1 which was released today.

Actions

Also available in: Atom PDF