Project

General

Profile

Actions

Bug #20540

closed

Unexpected reports when using nested blocks

Added by Félix DALLIDET about 2 years ago. Updated about 2 years ago.

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

Description

Some specific cases of nested block are breaking the compliance computation.
I was using some complex nested block logic to organize one of my technique, and ended up with a lot (~85%) of unexpected reports. The strange thing here is that the reports seems correct,
they were the same due to the nature of the reporting, but where all marked as unexpected whenever I had more than 4 of them similar.

The minimal study case that I was able to identify is attached to this ticket, it implies:
  • A parent block
  • at least 4 children blocks with the same method, with the same component key (resource parameter in rudder language).

I was working from a rudderlang source, generating a json and importing it via the API. It seems like if I export the technique after having it imported this way, then import the newly exported json, the technique is correct and does not generate any unexpected reports anymore.

To import the rd file, I used the following steps:

/opt/rudder/bin/rudderc technique read -i "technique.rd" 
curl --silent -k --header "X-API-Token: $(cat /var/rudder/run/api-token)" --header "Content-type: application/json" --request PUT https://localhost/rudder/api/latest/techniques --data "@technique.json" 


Files

technique.rd (1018 Bytes) technique.rd Félix DALLIDET, 2022-01-07 15:46
technique.json (4.28 KB) technique.json json produced by rudderc compilation Félix DALLIDET, 2022-01-07 15:52
CIS_rhel7_setup_filesystem.json (4.12 KB) CIS_rhel7_setup_filesystem.json json exported from the interface Félix DALLIDET, 2022-01-07 15:52
missing_report.png (179 KB) missing_report.png Félix DALLIDET, 2022-01-07 15:55
Actions

Also available in: Atom PDF