Closed Bug 1366916 Opened 2 years ago Closed 2 years ago

version bumping dies during b9 -> b10 bumps

Categories

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

defect

Tracking

(firefox55 fixed)

RESOLVED FIXED
Tracking Status
firefox55 --- fixed

People

(Reporter: aki, Assigned: aki)

References

Details

Attachments

(1 file)

From https://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-beta-noarch/release-mozilla-beta-firefox_version_bump-bm73-build1-build4.txt.gz :

05:39:18     INFO - [mozharness: 2017-05-19 12:39:18.336358Z] Running bump_postrelease step.
05:39:18     INFO - Running main action method: bump_postrelease
05:39:18     INFO - Reading from file /builds/slave/rel-m-beta-fx_version_bump-000/build/mozilla-beta/browser/config/version_display.txt
05:39:18     INFO - Contents:
05:39:18     INFO -  54.0b9
05:39:18  WARNING - Version bumping skipped due to conflicting values
05:39:18     INFO - [mozharness: 2017-05-19 12:39:18.337676Z] Finished bump_postrelease step (success)

This is from https://hg.mozilla.org/releases/mozilla-beta/rev/b2d5406972e6 , which saves us a lot of headache, but does an alphabetical comparison rather than a numeric one.  54.0b9 > 54.0b10, since 9 > 1.

We should probably do a numeric comparison here, which may involve a smarter split than just splitting by '.'

We should also probably consider going orange or something if the bump fails.
`map(int, re.split('\.|b', VERSION))` appears to do what we want.  One caveat: it strips out the 'b' in a beta version.  So 54.0b1 > 54.0, which is wrong.  We need to detect alpha/beta versions and act appropriately.

>>> import re
>>> a = "54.0b9"
>>> b = "54.0b10"
>>> re.split('\.|b', a)
['54', '0', '9']
>>> re.split('\.|b', a) > re.split('\.|b', b)  # this is a list of *strings*
True
>>> map(int, re.split('\.|b', a))  # list of ints, as we want
[54, 0, 9]
>>> map(int, re.split('\.|b', b))
[54, 0, 10]
>>> map(int, re.split('\.|b', a)) > map(int, re.split('\.|b', b))
False
>>> from distutils.version import StrictVersion
>>> StrictVersion(a) > StrictVersion(b)
False
>>> StrictVersion(a) < StrictVersion(b)
True

This is probably what we want.
Attached patch fix_bump.diffSplinter Review
Attachment #8870218 - Flags: review?(mtabara)
Duplicate of this bug: 1354496
For the record, ship-it had to use a custom child class of LooseVersion[1]. ESR was causing issues back then.

[1] https://github.com/mozilla-releng/ship-it/pull/160/files#diff-f83f8d03a433676118af15e7221a5f2d
See Also: → 1348428
Assignee: nobody → aki
Priority: -- → P1
Comment on attachment 8870218 [details] [diff] [review]
fix_bump.diff

neat!
Attachment #8870218 - Flags: review?(mtabara) → review+
Landed on inbound, which means this should be fixed for 55.0b9->55.0b10.  I don't *think* we'll hit an issue going from 54.0b10->54.0b11, so we should be good.
https://hg.mozilla.org/mozilla-central/rev/043a52623b59
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.