recompute_status: single responsibility principle (recompute, don't get)#693
Conversation
|
Thanks James, this PR helps clean up the logic nicely. Here are some logs to demonstrate the functinoality. Note - the command |
|
One thing would be good to look at, when targeting a |
|
I think it would also be useful to have an warning message when a target is not found |
|
TODO - make a user story of how we want execute along path to work |
PawelPlesniak
left a comment
There was a problem hiding this comment.
Awaiting comments from the US before merging
Description
Resolves #685.
The key point of this PR is to simplify
recompute_statusto do just that: recompute, not get. The reason this is important is that, sincerecompute_statusis a state-modifying RPC, it is subject to node exclusion policy, unlike the regularstatusRPC. Consequentlyrecompute_statusreturns an incomplete status tree, CF the one returned bystatus. Now, if status is required after recomputing, one must callstatusafter theirrecompute_statuscall.Note:
recompute_statusstill callsstatusinternally, but only on it's direct children and subject to child exclusion policy. This still reduces the number of redundantstatuscalls in a singlerecompute_statuscall, compared to before.Also a few other changes:
ignore_exclusion(ambiguous) ->include_excluded_nodesClientSideChildintoRESTAPIChildNodeentirelystatus,describe,describe_fsm,include,exclude...Type of change
Key checklist
python -m pytest)pre-commit run --all-files)Further checks
(Indicate issue here: # (issue))