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

Aberta Para iniciantes
#572 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
78/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
java

Direção de pesquisa

Leia Alert.java na linha 59 e AlertWorker.java por volta da linha 212, onde o issue diz que o valor de contexto nulo faz a criação do evento falhar. Acompanhe como ActionTask cria o evento “Alert Dispatched” e verifique se há testes relacionados que cubram alertas com o nome do servidor não definido. Reproduza o caso de uma instalação nova e, em seguida, confirme que o evento é gravado sem exceção quando o nome do servidor está em branco e que ainda inclui serverName quando ele está definido.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
Java
Estrelas
227
Forks
81
Merge médio
6d 5h
PRs com merge (30d)
26

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de OpenIntegrationEngine/engine

Todas as issues de OpenIntegrationEngine/engine

Issues semelhantes

Mais issues de Java

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.