Bug 16514

Summary: RRS: milestone percentages are wrong for maintenance plans with more than one layer branch
Product: [Yocto Project Subprojects] Recipe Reporting System (RRS) Reporter: Tim Orling <tim.orling>
Component: Recipe Reporting System (RRS)Assignee: Tim Orling <tim.orling>
Status: IN PROGRESS REVIEW --- QA Contact:
Severity: normal    
Priority: Medium    
Version: unspecified   
Target Milestone: 6.2 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Tim Orling 2026-11-15 03:39:18 UTC
_get_milestone_statistics() in rrs/views.py sums the upstream statistics
of each layer branch in a maintenance plan, but two of the counts use
"= +" instead of "+=":

  milestone_statistics['up_to_date'] = +t_updated
  milestone_statistics['not_updated'] = +t_not_updated

So the "up-to-date" and "not updated" counts are only those of the last
layer branch, while the total and the other two counts are summed. Plans
with a single layer branch (OE-Core) are not affected.

On a test instance, meta-openembedded 6.2 showed "1% up-to-date (22), 0%
not updated (7)", which are meta-filesystems' numbers alone. Summed over
its five layer branches it is 1517 up to date (73%) and 420 not updated
(20%) out of 2092.

This has been there since 7606664 ("rrs: link maintenance/upstream
history to layerbranch", 2018).
Comment 1 Tim Orling 2026-11-15 03:54:50 UTC
Patch sent to yocto-patches, under review (patchwork 104086):
https://lore.kernel.org/all/20261115034653.77988-2-tim.orling@konsulko.com/

Tested on layers.moto-timo.net: meta-openembedded 6.2 now shows 73% up-to-date (1518) and 20% not updated (420), instead of 1% (22) and 0% (7).