Project

General

Profile

Actions

Bug #21202

open

reporting is broken when using iterator

Added by Nicolas CHARLES almost 2 years ago. Updated about 14 hours ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Web - Compliance & node report
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I hate Rudder for that
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Priority:
58
Name check:
To do
Fix check:
To do
Regression:

Description

I'm using an iterator to check that packages are installed, and the reporting is broken.
Output of the agent shows the last element of the list for each

A| compliant     sc_nario_1                Package present           vlock              Presence of package acct in latest available version  was correct
A| compliant     sc_nario_1                Package present           vlock              Presence of package aide-common in latest available version  was correct
A| compliant     sc_nario_1                Package present           vlock              Presence of package debsums in latest available version  was correct
A| compliant     sc_nario_1                Package present           vlock              Presence of package gnupg2 in latest available version  was correct
A| compliant     sc_nario_1                Package present           vlock              Presence of package haveged in latest available version  was correct
A| compliant     sc_nario_1                Package present           vlock              Presence of package needrestart in latest available version  was correct
A| compliant     sc_nario_1                Package present           vlock              Presence of package unattended-upgrades in latest available version  was correct
2022-06-01T10:41:04+00:00  warning: Should install repo type package: update-notifier-common, but only warning promised
A| non-compliant sc_nario_1                Package present           vlock              If you tried to install a virtual package, please use in place the concrete package you want to install.
2022-06-01T10:41:04+00:00 Presence of package update-notifier-common in latest available version  was not correct
2022-06-01T10:41:04+00:00  warning: Should install repo type package: vlock, but only warning promised
A| non-compliant sc_nario_1                Package present           vlock              If you tried to install a virtual package, please use in place the concrete package you want to install.
2022-06-01T10:41:04+00:00 Presence of package vlock in latest available version  was not correct

In the rule page, the compliance by node display is broken

In the rule page, the compliance by directive display is broken

Note that in both case, the compliant percentage is correct

In the node page, the compliance display is invalid

technique is attached

The compliance of top level is ok, but not the compliance of the component itself

Compliance by api for node returns

"rules":[{"id":"d36ed31c-a697-469a-97a7-871ecb0cdc2c","name":"Test on node 1","compliance":88.24000000000001,"complianceDetails":{"auditCompliant":76.48,"auditNonCompliant":11.76,"auditNotApplicable":11.76},"directives":[{"id":"f030dec6-ba37-451b-9a04-82b45e92c88f","name":"Scénario 1","compliance":80.0,"complianceDetails":{"auditCompliant":80.0,"auditNonCompliant":20.0},"components":[{"name":"Package installation","compliance":80.0,"complianceDetails":{"auditCompliant":80.0,"auditNonCompliant":20.0},"components":[{"name":"Package present","compliance":77.78,"complianceDetails":{"auditCompliant":77.78,"auditNonCompliant":22.22},"values":[{"value":"vlock","reports":[{"status":"auditNonCompliant","message":"If you tried to install a virtual package, please use in place the concrete package you want to install.\nPresence of package vlock in latest available version  was not correct"},{"status":"auditNonCompliant","message":"If you tried to install a virtual package, please use in place the concrete package you want to install.\nPresence of package update-notifier-common in latest available version  was not correct"},{"status":"auditCompliant","message":"Presence of package unattended-upgrades in latest available version  was correct"},{"status":"auditCompliant","message":"Presence of package needrestart in latest available version  was correct"},{"status":"auditCompliant","message":"Presence of package haveged in latest available version  was correct"},{"status":"auditCompliant","message":"Presence of package gnupg2 in latest available version  was correct"},{"status":"auditCompliant","message":"Presence of package debsums in latest available version  was correct"},{"status":"auditCompliant","message":"Presence of package aide-common in latest available version  was correct"},{"status":"auditCompliant","message":"Presence of package acct in latest available version  was correct"}]}]}


Files

clipboard-202206011611-nv1dr.png (202 KB) clipboard-202206011611-nv1dr.png Nicolas CHARLES, 2022-06-01 14:23
clipboard-202206011612-k95p9.png (192 KB) clipboard-202206011612-k95p9.png Nicolas CHARLES, 2022-06-01 14:23
clipboard-202206011613-5wrai.png (231 KB) clipboard-202206011613-5wrai.png Nicolas CHARLES, 2022-06-01 14:24
sc_nario_1.json (1.93 KB) sc_nario_1.json Nicolas CHARLES, 2022-06-01 14:29
clipboard-202206011639-z2au9.png (252 KB) clipboard-202206011639-z2au9.png Nicolas CHARLES, 2022-06-01 14:53
clipboard-202206011640-tgnvk.png (267 KB) clipboard-202206011640-tgnvk.png Nicolas CHARLES, 2022-06-01 14:54

Related issues 2 (1 open1 closed)

Related to Rudder - Bug #20603: Reports on method using iterator are wrong in the cli outputReleasedFrançois ARMANDActions
Related to Rudder - Bug #16105: When we are using iterator in generic method condition only, the multiple reports are not correctly accumulated togetherNewActions
Actions #1

Updated by Nicolas CHARLES almost 2 years ago

Quick and dirty solution
replace


    "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => _method_reporting_context_v4("Package present", "${package_scenario1.present}","fe5f0d59-9ee9-49bb-8c25-36d0a509d994"),
                                                                              if => concat("any");
    "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => package_present("${package_scenario1.present}", "latest", "", ""),
                                                                             if => concat("any");

by

"fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => fe5f0d59-9ee9-49bb-8c25-36d0a509d994_method_1("Package present", "${package_scenario1.present}","fe5f0d59-9ee9-49bb-8c25-36d0a509d994","${package_scenario1.present}", "latest", "", "" );

where

bundle agent fe5f0d59-9ee9-49bb-8c25-36d0a509d994_method_1(a, b, c ,d, e, f ,g) {
methods:
    "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => _method_reporting_context_v4("${a}", "${b}","${c}"),
                                                                              if => concat("any");
    "fe5f0d59-9ee9-49bb-8c25-36d0a509d994_${report_data.directive_id}" usebundle => package_present("${d}", "${e}", "${f}", "${g}"),
                                                                              if => concat("any");

Actions #3

Updated by Alexis Mousset almost 2 years ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Infrequent - complex configurations | third party integrations
  • Priority changed from 0 to 22
Actions #4

Updated by Nicolas CHARLES almost 2 years ago

  • Related to Bug #20603: Reports on method using iterator are wrong in the cli output added
Actions #5

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 7.1.2 to 7.1.3
Actions #6

Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 7.1.3 to 7.1.4
  • Priority changed from 22 to 21
Actions #7

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.1.4 to 7.1.5
  • Priority changed from 21 to 68
Actions #8

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.1.5 to 7.1.6
  • Priority changed from 68 to 67
Actions #9

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.1.6 to 7.1.7
Actions #10

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.1.7 to 7.1.8
  • Priority changed from 67 to 66
Actions #11

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.1.8 to 7.1.9
  • Priority changed from 66 to 64
Actions #12

Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 7.1.9 to 7.1.10
Actions #13

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.1.10 to 1016
  • Priority changed from 64 to 62
Actions #14

Updated by Alexis Mousset about 1 year ago

  • Target version changed from 1016 to 7.2.5
  • Priority changed from 62 to 61
Actions #15

Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 7.2.5 to 7.2.6
  • Priority changed from 61 to 60
Actions #16

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 7.2.6 to 7.2.7
  • Priority changed from 60 to 59
Actions #17

Updated by Vincent MEMBRÉ 12 months ago

  • Target version changed from 7.2.7 to 7.2.8
  • Priority changed from 59 to 58
Actions #18

Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 7.2.8 to 7.2.9
Actions #19

Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 7.2.9 to 7.2.10
Actions #20

Updated by Alexis Mousset 9 months ago

  • Target version changed from 7.2.10 to 7.2.11
Actions #21

Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 7.2.11 to 1046
Actions #22

Updated by Alexis Mousset 7 months ago

  • Target version changed from 1046 to 7.3.8
Actions #23

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.8 to 7.3.9
Actions #24

Updated by Vincent MEMBRÉ 6 months ago

  • Target version changed from 7.3.9 to 7.3.10
Actions #25

Updated by François ARMAND 5 months ago

  • Related to Bug #16105: When we are using iterator in generic method condition only, the multiple reports are not correctly accumulated together added
Actions #26

Updated by Vincent MEMBRÉ 4 months ago

  • Target version changed from 7.3.10 to 7.3.11
Actions #27

Updated by Vincent MEMBRÉ 3 months ago

  • Target version changed from 7.3.11 to 7.3.12
Actions #28

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 7.3.12 to 7.3.13
Actions #29

Updated by Vincent MEMBRÉ about 2 months ago

  • Target version changed from 7.3.13 to 7.3.14
Actions #30

Updated by Vincent MEMBRÉ about 14 hours ago

  • Target version changed from 7.3.14 to 7.3.15
Actions

Also available in: Atom PDF