Reports: Status is "Completed" even if the Report contains failure messages #8414

Closed
opened 2025-12-29 20:36:25 +01:00 by adam · 0 comments
Owner

Originally created by @AHo-27 on GitHub (Aug 3, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.5.7

Python version

3.9

Steps to Reproduce

  1. Create a Report which logs a failure,
    Example report file 'report_status_test.py':
from extras.reports import Report

class TestReportStatus(Report):
    description = "test report status"

    def test_report_status(self):
        self.log_info(None, "info")
        self.log_success(None, "check passed")
        self.log_failure(None, "check failed")
  1. Add the report module to netbox
  2. Go the "Reports" and run the Report
  3. Check the Report Status/Results

Expected Behavior

If a Report contains failure messages, I would expect the Report status to be "Failed". (as it was the case with older Netbox versions)

Observed Behavior

The Report status is "Completed" instead of "Failed"
At first sight it looks to the user as if the report is successful.
grafik

Originally created by @AHo-27 on GitHub (Aug 3, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.5.7 ### Python version 3.9 ### Steps to Reproduce 1. Create a Report which logs a failure, Example report file 'report_status_test.py': ``` from extras.reports import Report class TestReportStatus(Report): description = "test report status" def test_report_status(self): self.log_info(None, "info") self.log_success(None, "check passed") self.log_failure(None, "check failed") ``` 2. Add the report module to netbox 3. Go the "Reports" and run the Report 4. Check the Report Status/Results ### Expected Behavior If a Report contains failure messages, I would expect the Report status to be "Failed". (as it was the case with older Netbox versions) ### Observed Behavior The Report status is "Completed" instead of "Failed" At first sight it looks to the user as if the report is successful. ![grafik](https://github.com/netbox-community/netbox/assets/123580173/faba50dc-1106-4dc1-96ee-956cd5f420cc)
adam added the type: bugstatus: accepted labels 2025-12-29 20:36:25 +01:00
adam closed this issue 2025-12-29 20:36:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8414