Closed Bug 1333531 Opened 3 years ago Closed 3 years ago

chunkify.chunkify breaks if less locales are in all-locales than chunks in decision task

Categories

(Release Engineering :: General, defect)

defect
Not set

Tracking

(firefox53 fixed, firefox54 fixed)

RESOLVED FIXED
Tracking Status
firefox53 --- fixed
firefox54 --- fixed

People

(Reporter: Pike, Assigned: Callek)

Details

Attachments

(1 file)

chunkify.chunkify is rather opinionated about whether it should be able to create less chunks.

Right now, the try decision tasks breaks if you adjust the all-locales file to just a few locales. It should just create less chunks, probably.

https://dxr.mozilla.org/mozilla-central/search?q=chunkify+ext%3Apy&redirect=false also indicates that split_evenly isn't used outside of chunkify.py. Might be OK to adjust that code to be more tailored to the actual use? And avoid recursion? I'm old-school like that.

Callek asked to be assigned to this on irc, doing so.
Can you add a unit test that would fail? The code is under https://github.com/bhearsum/chunkify
There's actually a doctest in https://github.com/bhearsum/chunkify/blob/master/chunkify/__init__.py#L20 testing that this fails.
Comment on attachment 8831278 [details]
Bug 1333531 - chunkify.chunkify breaks if less locales are in all-locales than chunks in decision task.

https://reviewboard.mozilla.org/r/107840/#review109052
Attachment #8831278 - Flags: review?(aki) → review+
Pushed by Callek@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/263f02e651d9
chunkify.chunkify breaks if less locales are in all-locales than chunks in decision task. r=aki
https://hg.mozilla.org/mozilla-central/rev/263f02e651d9
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Comment on attachment 8831278 [details]
Bug 1333531 - chunkify.chunkify breaks if less locales are in all-locales than chunks in decision task.

Approval Request Comment
This patch has baked on mozilla-central. It is merely a regression from manual steps suggested to push to try and vet some l10n codepaths. It fixes a break where the decision task of the push if the locales list goes below the threshold of l10n chunks.

This patch forces the chunks to never be larger than the number of locales to repack.

Only really relevant for try pushes from this gecko train.
Attachment #8831278 - Flags: approval-mozilla-aurora?
Comment on attachment 8831278 [details]
Bug 1333531 - chunkify.chunkify breaks if less locales are in all-locales than chunks in decision task.

Take this to make life easier. Aurora53+.
Attachment #8831278 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.