Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling of faulty reports #12842

Closed
candlerb opened this issue Jun 8, 2023 · 0 comments · Fixed by #12997
Closed

Improve handling of faulty reports #12842

candlerb opened this issue Jun 8, 2023 · 0 comments · Fixed by #12997
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@candlerb
Copy link
Contributor

candlerb commented Jun 8, 2023

NetBox version

v3.5.3

Python version

3.8

Steps to Reproduce

  1. Create a file has a python syntax error in it
  2. Upload it as a 'report'
  3. Now browse to /extras/reports/

Expected Behavior

The invalid report to be shown as such, and to be able at least to delete it via the GUI.

Note, however, if this were to hide the error message, it would then become very difficult to debug. See #12766 for the behaviour of Custom Scripts.

Observed Behavior

A Server Error is generated. Unfortunately, this then means it's impossible to delete the report via the web interface, as you can't even get a list of reports. Furthermore, if you simply rm the file from the reports directory, you get another Server Error ("File Not Found"). See #12841 for example.

Workaround

At the CLI:

cd /opt/netbox/netbox/reports
mv broken_report.py broken_report.py.xxx
touch broken_report.py

A zero-byte report is considered valid, and then can be deleted from within the GUI.

@candlerb candlerb added the type: bug A confirmed report of unexpected behavior in the application label Jun 8, 2023
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Jun 14, 2023
@jeremystretch jeremystretch added the severity: medium Results in substantial degraded or broken functionality for specfic workflows label Jun 23, 2023
@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jun 25, 2023
@abhi1693 abhi1693 self-assigned this Jun 25, 2023
abhi1693 added a commit that referenced this issue Jun 25, 2023
abhi1693 added a commit that referenced this issue Jun 25, 2023
jeremystretch pushed a commit that referenced this issue Jun 29, 2023
* fixes syntax error on reports #12842

* remove the extra filter #12842
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants