Closed Bug 1366916 Opened 2 years ago Closed 2 years ago
version bumping dies during b9 -> b10 bumps
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.
Manually bumped: https://hg.mozilla.org/releases/mozilla-beta/rev/a6edfa473c7dde50edc14a85374eb400e5ada494 Updating ship-it...
`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.
For the record, ship-it had to use a custom child class of LooseVersion. ESR was causing issues back then.  https://github.com/mozilla-releng/ship-it/pull/160/files#diff-f83f8d03a433676118af15e7221a5f2d
See Also: → 1348428
Comment on attachment 8870218 [details] [diff] [review] fix_bump.diff neat!
Attachment #8870218 - Flags: review?(mtabara) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/043a52623b594840fe9a4059256a746cd5c98549 bug 1366916 - fix version bumping from b9 -> b10. r=mtabara
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.
You need to log in before you can comment on or make changes to this bug.