-
Notifications
You must be signed in to change notification settings - Fork 9
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: put dataprocessor check under namespace #53
refactor: put dataprocessor check under namespace #53
Conversation
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 - assuming the people won't double back with the acronym
check_manager.add_target_eval( | ||
target_name=target_instances, | ||
status=CheckTaskStatus.success.value, | ||
value={"instances": len(all_instances)} | ||
) |
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.
Should this target (number of instances) be per-namespace?
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.
I actually have a question for all resource eval function:
when we enter
if not all_<resource>:
we will add a target eval for error. therefore I'm thinking in this case should we also have a matching of add target eval of success when all_is defined? that's the reason I added this
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.
The target eval for no resources
actually is skipped
for some resources (optional connectors like mqtt and data lake) and error for others (required resources like mq broker etc) - but those are added if there's no resource since... otherwise there's no evals or conditions :)
I guess if it's for "all_" checks (target: at least one resource in any namespace) then it makes sense to have it in the _all_
target.
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.
I see there's per-namespace instance count target_status
set based on instance count down on line 156, so that's failing a data processor -> [namespace]
target, but there really isn't an eval or a condition that says we need one resource in every namespace.
So right this check has target conditions / evals that look like:
- all
- conditions: ["len(instances)==1", "provisioningStatus"] (which, status should probably be per-namespace, len is fine here)
- eval: at least one dataprocessor instance in all namespaces
- namespace 1
- conditions: (same conditions as
_all_
, len and provisioningstatus) - no eval, but error status if conditions not met
- conditions: (same conditions as
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.
I don't think we need to finalize it in this PR, but let's make a point to come back to this discussion and make sure all our checks are consistent across DP, LNM, and MQ
…om/Elsie4ever/azure-edge-cli-extension into user/jiacju/bluefinupdatenamespace
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.
Have a few open questions that we should finalize at some point, but they're not blockers for this PR:
Issue: The original Alice-Spring quick start deployment template uses a different namespace for the custom location resource. This discrepancy causes Bluefin resources such as a pod in the original namespace and the rest of the Bluefin related resources in the custom location namespace. Consequently, the check fails because not all of the resources are in the same namespace.
This pr updated the bluefin check under namespaces to fix the issue: