Failed post-commit callback reports committed changes as reverted and drops events
Los mantenedores suelen responder en 1 día
@pheus ya está trabajando en esto.
Desde el 6/11/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Plugin Version
v0.0.1
NetBox Version
v4.7.1
Python Version
3.12
Steps to Reproduce
- Create a Script Project, then upload and activate a Script File containing:
from django.db import transaction from extras.models import Tag from netbox_scripts import Script def fail(): raise RuntimeError('the cache write failed after the commit') class CommitThenFail(Script): def run(self, data, commit): Tag.objects.create( name='kept-by-commit', slug='kept-by-commit', ) transaction.on_commit(fail) return 'done' - Optionally, configure an Event Rule for newly created Tags to observe event delivery.
- Run the Script with Commit changes enabled.
- Open the Job result and check the Tags list.
Expected Behavior
The Job reports the commit callback's exception but does not claim that the database changes were reverted, since they were already committed.
The created Tag remains, and its object-change event is processed normally so that matching Event Rules can run.
Observed Behavior
The Tag kept-by-commit exists, but the Job is marked as Failed and its log incorrectly reports:
Database changes have been reverted because the run did not finish.
The exception handler also clears the pending object-change events. As a result, matching Event Rules and webhooks are not triggered.
This happens because Django runs transaction.on_commit() callbacks after committing the transaction. An exception raised by a callback registered with the default robust=False propagates into the Script runner, which handles it as though the transaction had been rolled back.
- Lenguaje dominante
- Python
- Estrellas
- 8
- Forks
- 0
- Merge medio
- 11 h 22 min
- PR fusionados (30 d)
- 40
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de netbox-community/netbox-scripts
-
app: scripts Bucket: Improve status: backlog type: documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
netbox-community/netbox-scripts#80 ·
Los mantenedores suelen responder en 1 día
-
app: scripts Bucket: KTLO severity: low status: backlog type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
netbox-community/netbox-scripts#76 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Raise the minimum NetBox version to v4.7.5Posiblemente ocupada @pheus la tomó hace 1 día. Abiertoapp: scripts Bucket: KTLO status: backlog type: housekeeping
netbox-community/netbox-scripts#123 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
A committed run is reported as unfinished when its events cannot be queuedPosiblemente ocupada @pheus la tomó hace 1 día. Abiertoapp: scripts Bucket: KTLO severity: low status: accepted type: bug
netbox-community/netbox-scripts#122 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Migration does not identify which permissions need recreatingPosiblemente ocupada @pheus la tomó hace 1 día. Abiertoapp: scripts Bucket: KTLO severity: low status: accepted type: bug
netbox-community/netbox-scripts#120 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de netbox-community/netbox-scripts
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
[Bug] vllm-sr config migrate drops providers.models[].deploymentPosiblemente ocupada @Bevisy la tomó hoy. Abiertoneeds-acceptance wg/developer-experience-ecosystem
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
vllm-project/semantic-router#5996 ·
Los mantenedores suelen responder en 2 días
-
bugfix low-priority plugin:abstract plugin:leyline small-effort source:discussion
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
athola/claude-night-market#1132 ·
-
Add support for Sinhala languageAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
WeblateOrg/language-data#2773 ·
Los mantenedores suelen responder en 1 día
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Abiertokind/bug priority/medium qa_automation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yugabyte/yugabyte-db#37324 ·
Los mantenedores suelen responder en 1 día