-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix checks processing for multiple connectors #351
Fix checks processing for multiple connectors #351
Conversation
- Set Initial ready value to false so we don't report ready when no checks are run - Reduce all progressive check event results into single list of checks instead of only processing the first result - refactor non-progressive check readiness accumulation to report unready if no checks are run or any connector responds with empty list of checks
ENG-503 Servox CLI check command does not process all checks
While testing the HPAPlus connector (ENG-466) I ran across an issue where the opsani_dev checks were not showing up in the output as well as all checks being reported as passing which prevented envoy-proxy from being injected into the target application Example output of this behavior is attached:
After digging into the check code, I think I've found the source of the issue here: Line 1331 in 53078f3
What happens is the logic is only processing check results for the first event result in the list of results without processing any subsequent results in that list which means its only processing the checks for a single connector before considering all checks to have passed. I have a proposed fix which I will push for testing shortly after this ticket is created |
shadowing from redundant generated ckeck ids
IDs from the kubernetes checks
- add "kubernetes" to kubernetes test check IDs - add "opsani_dev" to opsani dev test check IDs - undo timeout changes to xfaling test test_rollout_check_annotations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if I got it right, the changes are:
- Multiple checks work now
- Curly brackets no longer kill logger, solved using the escaped_name
- Naming convention changes in the connectors
Question:
- Does the
if results
have the side effects ofiter
ornext
on theresults
generator? Or is the truthyness check blissfully devoid of side effects? - Why use functools when you could do
sum([b.value for b in results])
?
Corrections:
Checks from multiple connectors work now
The check functions have been renamed to avoid duplicate IDs but there is no enforcement of a naming convention WRT to avoiding duplicate IDs yet (Task has been added to the backlog for this) Answers:
You may need to elaborate more on what you mean by the side effects but I think the answer is that the truthyness check of the results list is devoid of side effects. The
Mainly for styling reasons. @blakewatters established a precedent for avoiding comprehensions in favor of |
re Blake using map(reduce(lambda)), I think he's the only one... It goes against most Python style guides iirc. I think, unless he shows up himself to deny, this is a Life of Brian moment. |
checks are run
instead of only processing the first result
unready if no checks are run or any connector responds with empty list
of checks
due to curly braces in the check names
check methods to produce unique check IDs