-
-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor return value of check_for_error to None for all servers #979
Conversation
Fix return value of check_for_error function to send false instead of None
@aleskxyz thanks for the quick look for the cause, but in most cases the condition gets quite an opposite result now: From if errors_occured: to if errors_occured is not None: there is an important difference, because in the first case it will only return if True, which extends to False in the second variant. I will have to check the consequences if done globally. Maybe as a fix it will be enough if done in Prometheus and Alertmanager. |
@HenriWahl |
OK, I will look for it tomorrow. |
@aleskxyz I checked it looks OK. Thanks for investigating! |
It's included now in latest release 3.13-20231031. |
@HenriWahl Nagstamon/Nagstamon/Servers/SnagView3.py Line 193 in a9f40f5
Nagstamon/Nagstamon/Servers/SnagView3.py Line 274 in a9f40f5
Nagstamon/Nagstamon/Servers/IcingaWeb2.py Line 168 in a9f40f5
Nagstamon/Nagstamon/Servers/IcingaWeb2.py Line 264 in a9f40f5
Nagstamon/Nagstamon/Servers/Monitos4x.py Line 201 in a9f40f5
Nagstamon/Nagstamon/Servers/Monitos4x.py Line 320 in a9f40f5
Nagstamon/Nagstamon/Servers/IcingaDBWeb.py Line 274 in a9f40f5
|
Well, the whole code needs some refactoring... |
check_for_error function returns None but some servers are expecting boolean.
I refactor all servers to check the return value explicitly is not None