Alert Dispatched event is not written while the server name is blank

Abierto Apto para principiantes
#572 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

Lee Alert.java en la línea 59 y AlertWorker.java alrededor de la línea 212, donde el issue indica que el valor de contexto nulo hace que falle la creación del evento. Sigue cómo ActionTask crea el evento «Alert Dispatched» y comprueba si hay pruebas relacionadas que cubran las alertas con un nombre de servidor sin establecer. Reproduce el caso de una instalación nueva y luego confirma que el evento se escribe sin una excepción cuando el nombre del servidor está vacío y que sigue incluyendo serverName cuando está establecido.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

While the server name is blank (Settings, Server, Server Name, empty on a fresh install), alerts are sent but no "Alert Dispatched" event is written, and nothing is logged.

On 4.7.0, a fresh engine on Derby with nothing added:

  1. A channel whose JavaScript Writer destination throws (throw new Error('boom');), and a second channel to receive an alert's Channel action.
  2. An alert on any error of any channel, with a Channel action to the second channel.
  3. Send one message to the first channel. The destination errors and the alert's action delivers to the second channel. No "Alert Dispatched" event is written, and the log shows only the destination's own error.
  4. Set a Server Name and send another message. The action delivers again, and this time the event is written, with serverName among its attributes.

Alert.createContext puts serverName into the alert's context (Alert.java:59), and it is null until a name is set. AlertWorker.ActionTask.call() sends the actions, then builds the event by calling entry.getValue().toString() on every context value (AlertWorker.java:212), which throws on the null. The task runs through actionExecutor.submit(...) and nothing reads the returned Future, so the exception is not logged. Skipping null values when building the event, or using String.valueOf, looks like the fix; not tested.

Co-authored with Claude Code.

Lenguaje dominante
Java
Estrellas
227
Forks
81
Merge medio
6 d 5 h
PR fusionados (30 d)
26

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenIntegrationEngine/engine

Todos los issues de OpenIntegrationEngine/engine

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.