Closed Bug 1191074 Opened 9 years ago Closed 9 years ago

Avoid duplicate past-update lines in patcher configs

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nthomas, Unassigned)

Details

Attachments

(1 file)

Often we have problems bumping patcher configs when something unusual happens with updates. The symptom is an error like:

Traceback (most recent call last):
  File "tools/scripts/updates/create-update-verify-configs.py", line 107, in <module>
    pc = PatcherConfig(open(options.config).read())
  File "/builds/slave/rel-m-rel-firefox_rel_upds-000/tools/lib/python/release/updates/patcher.py", line 44, in __init__
    self.readXml(cfg)
  File "/builds/slave/rel-m-rel-firefox_rel_upds-000/tools/lib/python/release/updates/patcher.py", line 202, in readXml
    self.addPastUpdate(self.parsePastUpdate(list(node.arguments)))
  File "/builds/slave/rel-m-rel-firefox_rel_upds-000/tools/lib/python/release/updates/patcher.py", line 165, in addPastUpdate
    raise PatcherConfigError("Found multiple past-updates with duplicate to/from versions: %s" % value)
release.updates.patcher.PatcherConfigError: Found multiple past-updates with duplicate to/from versions: ['38.0.5', '39.0', ['betatest', 'releasetest', 'release']]

The code doing the bumping can test avoid this problem, it just needs to test what's already there. It lives at http://hg.mozilla.org/build/tools/file/default/release/patcher-config-bump.pl#l212

We could either look at the existing past-update lines, or possibly not do that block if 'from' isn't changing.
IIRC we don't use those anywhere except the assertions. Maybe we can get rid of them?
Do you mean modify http://mxr.mozilla.org/build/source/tools/lib/python/release/updates/patcher.py#162 so that it just skips dupes rather than assert ? Or just cast it as a set in the first place ?
I think we can get rid of it everywhere. We have the <partials> section to generate partial update verification bits, and for every <release> section we can generate complete update verification bits.
This checks for an existing past-update line before adding another. There's probably a long-standing edge case if we do weird things with from (eg it jumps releases) and end up without a past-update line. So I agree it would be good to redo all of this, but in the meantime this is a bandaid.
Attachment #8662861 - Flags: review?(rail)
Attachment #8662861 - Flags: review?(rail) → review+
Comment on attachment 8662861 [details] [diff] [review]
[tools] Be smarter about adding past-update lines

http://hg.mozilla.org/build/tools/rev/a9ac9c190d0e for 42.0b1
Attachment #8662861 - Flags: checked-in+
Looks like this won't get tested until 42.0b2.
When bumping the patcher config for 42.0b2:
WARNING: we already have a past-update for 41.0b9, not adding another
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
woot!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: