Actions
Bug #24226
closedrudderc canonifies already canonified condition expression resulting in loss of logic operators such as ) and |
Pull Request:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
I hate Rudder for that
User visibility:
First impressions of Rudder
Effort required:
Small
Priority:
196
Name check:
To do
Fix check:
Checked
Regression:
No
Description
See the following yaml as example:
id: os_condition_logic_or_ name: 'OS condition logic OR ' version: '1.0' category: ncf_techniques items: - id: 74537fd1-bbb7-460e-bf2c-dcfc341c2fe0 name: logic with or condition: ubuntu_22_04|centos_8 method: file_present params: path: /tmp/os-condition-or - id: 8421d610-ebc6-4a2f-b3de-f04fb101e944 name: for ubuntu 22.04.03 condition: ubuntu_22_04 method: file_present params: path: /tmp/os-condition-only-ubuntu22 - id: b63fc018-b2d8-4f4b-8535-b4143e760779 name: for centos 8 condition: centos_8 method: file_present params: path: /tmp/os-condition-only-centos8
The first section will never be executed as the generated cfengine code is the following:
bundle agent call_os_condition_logic_or__74537fd1_bbb7_460e_bf2c_dcfc341c2fe0(c_name, c_key, report_id, args, class_prefix, method_call_condition, path) { methods: "74537fd1-bbb7-460e-bf2c-dcfc341c2fe0_${report_data.directive_id}" usebundle => _method_reporting_context_v4("${c_name}", "${c_key}", "${report_id}"); "74537fd1-bbb7-460e-bf2c-dcfc341c2fe0_${report_data.directive_id}" usebundle => file_present("${path}"), if => canonify("${method_call_condition}");
Where `method_call_condition` is `"ubuntu_22_04|centos_8"` which must NOT be canonified again.
Files
Actions