Closed Bug 1262647 Opened 8 years ago Closed 8 years ago

chunkify returns an empty list for the last chunk

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rail, Assigned: jlund)

References

Details

Attachments

(1 file, 1 obsolete file)

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

see https://gist.github.com/rail/74437aaa63835af095d1b4c3ba7d1f30
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: https://gist.github.com/lundjordan/db7dec7885b3d10b6cf9400c3b8268ae

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
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: