Closed Bug 827306 Opened 11 years ago Closed 11 years ago

ensure that non-release build dirs are the same length as release build dirs

Categories

(Release Engineering :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: bhearsum)

References

Details

Attachments

(2 files, 3 obsolete files)

bug 827305 tracks an issue where we hit the maximum path length problem on Windows during a release, but not during dep builds. This happened because the release build dir is 8 characters longer than the dep build dir ("tb-c-esr17-w32" vs "tb-rel-c-esr17-w32-bld"). Aki suggested that we could avoid hitting this problem at release time by ensuring that both directories are the same length (probably should make sure the nightly build dir is the same length, too). Ideally we'd do this by shortening the release build dir, not by lengthening the dep build one.
Depends on: 831989
Depends on: 827304
I just realized that we could potentially bust at merge time if, for example, the aurora build dir name is longer than the mozilla-central build dir name. Maybe we should make all build directories for the same type of build the same length?
OK, here's a concrete proposal:
* Figure out the maximum build directory length that we need.
* Change reallyShort (and probably rename it) to give names between a min and max size (configurable, but defaulting to what we want for dep/nightly builds).
* Any directories that are shorter than desired after substitution will be padded at the end with 'z' characters until they reach the desired length.
* Any builders that can't be shortened enough will raise exceptions, which will cause errors at checkconfig/reconfig time.
Flags: needinfo?(aki)
We could simplify the logic if we:

a) prepend release dirs with rel- (already done)
b) prepend dep and nightly dirs with something the same length or longer (depend- and nightly- or dep- and ntl- or something).

But yeah, m-c should be the same length as m-a as m-b as m-r, so that's a good approach as well.
Flags: needinfo?(aki)
I'll take care of this after the dependent bug is fixed.
Assignee: nobody → bhearsum
This patch is a no-op change that does a few things:
* Renames reallyShort to normalizeName (because that's what it will do in the next patch)
* Adds a few tests
* Refactors the code to use regexes. I think it's much more readable this way.

I dumped out all the builder names before and after this patch and all of them are exactly the same.
Attachment #708302 - Flags: review?(catlee)
Attached patch changed directories (obsolete) — Splinter Review
A couple of notes from Callek via e-mail:
* IIRC we break clobberer when we change build directories but leave buildernames alone, so we'll need to plan to fix that.
* Current patch doesn't take into account prefix (tb-) for the length calc, I commented in bug on this one though.
Attached patch address some comments/bugs (obsolete) — Splinter Review
* Add a delimeter between the actually build dir and the padding
* Use 0 as the padding char because it's a bit less ugly.
* Take prefix into account before padding
Attachment #708326 - Attachment is obsolete: true
Attachment #708329 - Attachment is obsolete: true
Attachment #708326 - Flags: review?(catlee)
Attachment #708581 - Flags: review?(catlee)
Attachment #708302 - Flags: review?(catlee) → review+
Attachment #708302 - Flags: checked-in+
First patch is in production.
Attachment #708581 - Flags: review?(catlee) → review+
12:25 < catlee-lunch> bhearsum: did you see that we need to add an import/reload of buildbotcustom.common?
12:25 < bhearsum> nope
12:25 < bhearsum> scary
12:27 < catlee-lunch> yeah, busted the reconfigs last night
12:27 < bhearsum> sorry about that :(
12:28 < bhearsum> so i need to add that as part of my next patch to that file, right?
12:28 < catlee-lunch> hmm
12:28 -!- catlee-lunch is now known as catlee
12:28 < catlee> process/factory.py reloads it
12:28 < catlee> but misc.py imports it first
12:29 < catlee> evil
12:29 < bhearsum> oh boy
12:29 < bhearsum> i'm going to have to touch reload order, aren't i?
12:29 -!- sfink [chatzilla@2557E599.66715431.D25A875A.IP] has joined #releng
Attached patch fix reloadingSplinter Review
AFAICT we should be reloading in misc.py, because that's where we reload other things that are imported by it and factory.py (eg, misc_scheduler).
Attachment #708581 - Attachment is obsolete: true
Attachment #709193 - Flags: review?(catlee)
Attachment #709193 - Flags: review?(catlee) → review+
Attachment #709193 - Flags: checked-in+
Rough landing here -- it turns out that slavebuilddir is a shared reference. Meaning, updating it during a reconfig affects live builds. Eg, https://tbpl.mozilla.org/php/getParsedLog.php?id=19637638&tree=Try&full=1 had its build directory updated after compiling, which meant some subsequent steps failed because dependent files weren't in the new directory.
Other than the builds in progress failing, this seems to have landed fine.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
(In reply to Ben Hearsum [:bhearsum] from comment #14)
> Rough landing here -- it turns out that slavebuilddir is a shared reference.
> Meaning, updating it during a reconfig affects live builds. Eg,
> https://tbpl.mozilla.org/php/getParsedLog.php?id=19637638&tree=Try&full=1
> had its build directory updated after compiling, which meant some subsequent
> steps failed because dependent files weren't in the new directory.

We hit more of these today during a reconfig. Turns out that not all masters had been reconfiged yesterday, according to the twistd.log's that I looked at. I'm going to make sure that everything is actually reconfiged with this change at this point.
bug 840547 was filed to track the build-dir-changes-at-reconfig issue.
bug 840556 tracks a follow-up issue about not all of the expected builders getting padding.
Blocks: 840951
Depends on: 861733
Product: mozilla.org → Release Engineering
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: