fix: event as list[AlertDTO] not included in the condition#2966
Merged
talboren merged 2 commits intokeephq:mainfrom Jan 3, 2025
Merged
fix: event as list[AlertDTO] not included in the condition#2966talboren merged 2 commits intokeephq:mainfrom
talboren merged 2 commits intokeephq:mainfrom
Conversation
|
@00041275 is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
Member
|
Thought we took care of it! Thank you. |
Member
|
@00041275 may I ask you to create an issue for this PR too? |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Contributor
Author
|
created #2974 |
Contributor
|
🚂 Well done @00041275! Two PRs merged already! 🎉🥳 With your second PR, you're on a roll, and your contributions are already making a difference. 🌟 |
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.
close #2974
📑 Description
in one of the conditions of the process_event function there is a flaw in processing event as a list. 2 months ago there was no such problem, but now when I upgraded the version of keep I found that zabbix provider started getting an error. while studying the issue (2 days) I finally understood what was the problem. The point is that in one of the conditions there is an attempt to convert dict into some formatted model, but the check condition checks list as well, without even trying to understand what is inside. The base_provider function requires implementing _format_alert, where event=dict. This means that you cannot pass list, or even list[alertDTO]. The change ensures that the _format_alert call is excluded if it is not dict.
base_provider
✅ Checks