Skip to content

Handle unrecognized probes and detectors in report digest generation#1663

Open
precognitivem0nk wants to merge 1 commit intoNVIDIA:mainfrom
precognitivem0nk:fix/report-digest-crash-1024
Open

Handle unrecognized probes and detectors in report digest generation#1663
precognitivem0nk wants to merge 1 commit intoNVIDIA:mainfrom
precognitivem0nk:fix/report-digest-crash-1024

Conversation

@precognitivem0nk
Copy link
Copy Markdown

Fixes #1024
The three PluginCache.plugin_info() call sites in report_digest.py crash with a ValueError when a report references a probe or detector that no longer exists in the current codebase (e.g. due to a rename between versions).
This PR wraps each call in try/except, logs a warning, and continues report generation with placeholder values instead of crashing.
Changes:

_init_populate_result_db (line ~131): falls back to empty tags, grouping the probe under "other"
_get_probe_info (line ~255): uses the classpath as description, empty tags, and None tier
_get_probe_detector_details (line ~305): uses the detector name as its description

Tested with a JSONL file referencing a nonexistent probe class. Before the fix it crashed with ValueError. After the fix it generates a valid HTML report and logs a warning.

Signed-off-by: precognitivem0nk <rextedgorman@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

DCO Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by just posting a Pull Request Comment same as the below format.


I have read the DCO Document and I hereby sign the DCO


You can retrigger this bot by commenting recheck in this Pull Request

@precognitivem0nk
Copy link
Copy Markdown
Author

I have read the DCO Document and I hereby sign the DCO

Copy link
Copy Markdown
Collaborator

@jmartin-tech jmartin-tech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking a look at this.

I would suggest that digest_report is not meant to be used in with reports from different versions at this time. The actual format for report.jsonl files is evolving rapidly between releases. While guards and warning are useful if the report cannot be processed accurately for a report from an older version the utility should simply report that it is not compatible and refuse to produce an html file. Creating an html report that results an incomplete or inaccurate view is generally discouraged.

In short I think this PR should likely redirect some, instead of suppressing the errors it should produce more clear indicators that the errors mean the report is not compatible wit the version being utilized. This may also benefit from adding a version compatibility check early in the process, the version check may need to be very strict until the project reaches a 1.0.0 release.

Since the methods impacted are used both during initial run digesting of the report and for post processing when utilizing as a utility this needs to be accounted for carefully as well.

@leondz may want to weigh in on this was well since he filed the original issue.

@precognitivem0nk
Copy link
Copy Markdown
Author

precognitivem0nk commented Apr 1, 2026 via email

@leondz
Copy link
Copy Markdown
Collaborator

leondz commented Apr 1, 2026

tagging related PR #1523

@jmartin-tech
Copy link
Copy Markdown
Collaborator

I would think the latter is acceptable, raising an exception with details when the data is not compatible and then catching that and reporting it would be acceptable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reporting: enable logging & skipping of unrecognised probes, detectors in digest generation

3 participants