-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Deployment Type
Self-hosted
NetBox Version
v4.1.2
Python Version
3.11
Steps to Reproduce
Create a script that logs a failure. Run the script with commit=False
from extras.scripts import Script
class LogFailure(Script):
description = "Log one failure"
def test_error_behavior(self):
self.log_failure("This is a test failure, not a script failure")
Expected Behavior
The script will log one 'Failure' line, rollback database changes, and complete
Observed Behavior
The script logs appropriate, but adds an additional failure, as show below, before rolling back DB changes
An exception occurred: AbortTransaction:
Traceback (most recent call last):
File "/opt/netbox/netbox/extras/jobs.py", line 47, in run_script
raise AbortTransaction()
utilities.exceptions.AbortTransaction
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application