Closed Bug 1011796 Opened 6 years ago Closed 6 years ago
mozharness gecko migration merge day script
We may require separate aurora + beta steps at some point.
This review can definitely wait til you're not on pto. This is a single script and 4 config files. gecko_migration.py can handle all 4 types of migrations: beta_to_release, aurora_to_beta, central_to_aurora, and staging_beta_migration. This is handled by "migration_behavior" which specifies which workflow to use after tagging and merging. This also fixes a couple other bugs: the debugsetparents method tries to preserve old tags, and we now touch the CLOBBER file per bug 1003634. This handles the release migration in bug 1011794, but not the release l10n migration.
Attachment #8447385 - Flags: review?(rail)
Comment on attachment 8447385 [details] [diff] [review] mergeday.diff Review of attachment 8447385 [details] [diff] [review]: ----------------------------------------------------------------- What can possibly go wrong?! :) ::: scripts/merge_day/gecko_migration.py @@ +80,5 @@ > + if self.config['migration_behavior'] not in VALID_MIGRATION_BEHAVIORS: > + message += "%s must be one of %s!\n" % (self.config['migration_behavior'], VALID_MIGRATION_BEHAVIORS) > + if self.config['migration_behavior'] == 'beta_to_release': > + if self.config.get("require_remove_locales") and not self.config.get("remove_locales") and 'migrate' in self.actions: > + message += "You must specify --remove-locale!\n" I like this! :) @@ +207,5 @@ > + # I don't know how to do this elegantly. > + # I'm reverting .hgtags to old_head, then appending the new tags > + # from new_head to .hgtags, and hoping nothing goes wrong. > + # I'd rather not write patch files from scratch, so this seems > + # like a slightly more complex but less objectionable method? Yeah, sounds hacky. :( @@ +216,5 @@ > + subprocess.list2cmdline(hg + ['diff', '-r', old_head, '.hgtags', '-U9', '>', patch_file]), > + cwd=cwd > + ) > + self.run_command( > + 'patch -R -p1 < %s' % patch_file, ["patch", "-R", "-i", patch_file] should work too. No need to go through shell in this case. @@ +227,5 @@ > + self.fatal("Can't append to .hgtags!") > + for line in tag_diff.splitlines(): > + if not line.startswith('+'): > + continue > + line = line.replace('+', '') Ooooh. Sounds like this has to be double checked manually when we run this script. @@ +271,5 @@ > + for line in contents.splitlines(): > + if line.startswith("#") or line == '': > + new_contents += "%s\n" % line > + new_contents += "Merge day clobber" > + self.write_to_file(clobber_file, new_contents) Nice!
Attachment #8447385 - Flags: review?(rail) → review+
Comment on attachment 8447385 [details] [diff] [review] mergeday.diff https://hg.mozilla.org/build/mozharness/rev/411aed63044e
Attachment #8447385 - Flags: checked-in+
Todo: docs, remove old scripts once we've used this script on merge day.
Summary: mozharness mozilla-beta + mozilla-aurora merge day script → mozharness gecko migration merge day script
Doc updates here: https://wiki.mozilla.org/index.php?title=ReleaseEngineering/Merge_Duty/Steps&diff=995616&oldid=995606 Going to resolve this.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.