#7313·kubeedge

edgecontroller: Rule status never updates because updateRuleStatus patches without the status key

Author: omlahoreCreated Sep 19, 2026Updated Sep 19, 2026

I tried updateRuleStatus with a unit test against the fake crd client, and after one SUCCESS result the patch goes out but status.successMessages is still 0. It marshals the RuleStatus on its own and sends that as a merge patch against the Rule (upstream.go#L387-L392), so the body is {"successMessages":1,"failMessages":0,"errors":null} with no "status" key. Those top-level fields get dropped, and the controller still logs "UpdateRulestatus successfully!".

#2920 reported the status never updating back in 2021, but it was closed as stale. Wrapping the body as {"status": ...} should be enough, since the Rule CRD doesn't enable the status subresource.