Add IT_PING to real-time event schema validation#12
Open
gianlaferla wants to merge 2 commits intomainfrom
Open
Add IT_PING to real-time event schema validation#12gianlaferla wants to merge 2 commits intomainfrom
gianlaferla wants to merge 2 commits intomainfrom
Conversation
The IT_PING message type was missing from the list of recognized
notification types in the schema validator. When event schema
validation is enabled on the crm-integration-consumer, IT_PING
messages cause a fatal error ("invalid payload type it_ping")
which crashes the consumer pods and triggers a poison-pill
redelivery loop across all replicas.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests cover valid payloads (both uppercase and lowercase type), missing required fields, and invalid field types using the real embedded schema via NewClient(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
it_pingto the list of recognized notification types in the schema validatorping_id,user_id,timestamp,originProblem
When
ENABLE_EVENT_SCHEMA_VALIDATIONis enabled oncrm-integration-consumer, IT_PING messages are rejected with"invalid payload type it_ping"because the type is not ingetNotificationTypes(). This error is fatal (log.Fatalf) and crashes the consumer pod. Since the message is not acked before the crash, RabbitMQ redelivers it to the next pod — creating a poison-pill loop that crashes all consumer replicas.Impact observed in production (eu2):
Test plan
go test ./pkg/validator/...passes🤖 Generated with Claude Code