Closed Bug 1262647 Opened 8 years ago Closed 8 years ago

chunkify returns an empty list for the last chunk


(Release Engineering :: Release Automation: Other, defect)

Not set


(Not tracked)



(Reporter: rail, Assigned: jlund)




(1 file, 1 obsolete file)

Hit this in staging where tried to chunkify locales and got [] for the last chunk

chunkify([x for x in range(35)], 10, 10) is one of the examples
in staging we tried 35 locales with 10 chunks. But I don't think this is limited to a small subset of total locales against 10 chunks.

afaict we are missing locales after we run chunkify for a variety of total locales:

oddly, 89 locales with 10 chunks works and that is what we have been using in our betas in production.. :)
debugging the 35 locales 10 chunk case, it seems that chunkify does the right thing for the first few chunks..

it takes the 35locales/10chunks remainder (5) and distributes one locale on each of the first 5 chunks ('big_chunk's).

so it knows to put 4 locales in first 5 chunks, and 3 locales in the remaining. However, after the 6 chunk (one chunk greater than the first 5 big_chunks), things start to fall apart and we lose locales to holes in index/splicing.

my head hurts however trying to figure out why..
Assignee: nobody → jlund
Attached file recursive approach
jinx, I have something to show too! :)
Attachment #8738856 - Flags: review?(bhearsum)
Attachment #8738856 - Flags: review?(bhearsum)
Attachment #8738856 - Flags: review+
Attachment #8738856 - Flags: checked-in+
Attachment #8738841 - Attachment is obsolete: true
Attachment #8738841 - Flags: review?(bhearsum)
restarted releaserunner on bm83 and bm85
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.