Closed Bug 639838 Opened 13 years ago Closed 13 years ago

Setup preproduction release master

Categories

(Release Engineering :: General, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rail, Assigned: rail)

References

Details

(Whiteboard: [releases][preproduction])

Attachments

(3 files, 9 obsolete files)

      No description provided.
Blocks: 639851
No longer blocks: 639851
Depends on: 639851
Attachment #517779 - Attachment is obsolete: true
Attachment #519355 - Flags: review?(catlee)
Attachment #519355 - Flags: review?(bhearsum)
Notice checks for sr.get('clonePath') and releaseConfig.get('l10nRepoClonePath') added to make test-masters.sh happy. 

I'm going to use production release configs for pre-production release. Pre-production release config bumper will add missing variables and bump the configs.
Attachment #519356 - Flags: review?(catlee)
Attachment #519356 - Flags: review?(bhearsum)
Ben suggested to get rid of "if staging" logic and move it to configs.
Attachment #519355 - Flags: review?(catlee)
Attachment #519355 - Flags: review?(bhearsum)
Attachment #519356 - Flags: review?(catlee)
Attachment #519356 - Flags: review?(bhearsum)
Attachment #519355 - Attachment is obsolete: true
Attachment #519356 - Attachment is obsolete: true
Attached patch tools (obsolete) — Splinter Review
Attachment #519646 - Flags: feedback?(catlee)
Attachment #519646 - Flags: feedback?(bhearsum)
Attached patch buildbotcustom (obsolete) — Splinter Review
Attachment #519647 - Flags: feedback?(catlee)
Attachment #519647 - Flags: feedback?(bhearsum)
Attached patch configs (obsolete) — Splinter Review
Attachment #519648 - Flags: feedback?(catlee)
Attachment #519648 - Flags: feedback?(bhearsum)
Some notes:

* staging_release-*.py files will be linked to release-*.py in master dirs
* getParentDirAndFile (any better name?) resolves the links
* preproduction bits are not added yet
Comment on attachment 519647 [details] [diff] [review]
buildbotcustom

I like you method for getting the right config file. Any idea how to deal with it in a client side script? I don't think we have to deal with that yet, but it would be good to know for when we do.

Looks fine to me overall.
Attachment #519647 - Flags: feedback?(bhearsum) → feedback+
Comment on attachment 519646 [details] [diff] [review]
tools

Can we rename getParentDirandFile to getAbspath? Can you write tests for it?
Attachment #519646 - Flags: feedback?(bhearsum) → feedback+
Comment on attachment 519648 [details] [diff] [review]
configs

I think messagePrefix, commitPatcherConfig, and enable_repo_setup belong in the release configs rather than the branch ones. Looks fine otherwise
Attachment #519648 - Flags: feedback?(bhearsum) → feedback+
Comment on attachment 519646 [details] [diff] [review]
tools

>diff --git a/lib/python/build/paths.py b/lib/python/build/paths.py
>index 3e6c760..fc57c76 100644
>--- a/lib/python/build/paths.py
>+++ b/lib/python/build/paths.py
>@@ -1,3 +1,6 @@
>+from os import path, getcwd
>+
>+
> def getLatestDir(product, branch, platform, nightlyDir="nightly",
>                  protocol=None, server=None):
>     if protocol:
>@@ -21,3 +24,19 @@ def getMUSnippetDir(brandName, oldVersion, oldBuildNumber, version,
>     return '%s-%s-build%s-%s-build%s-MU' % (brandName, oldVersion,
>                                             oldBuildNumber, version,
>                                             buildNumber)
>+
>+
>+def getParentDirAndFile(file_name, dir=None):
>+    if not dir:
>+        dir = getcwd()
>+    real_path = path.join(dir, file_name)
>+    # readlink until we hit real path
>+    while True:
>+        try:
>+            real_path = os.readlink(real_path)
>+        except OSError:
>+            break

would os.path.realpath work better here?

>+
>+    real_file_name = path.basename(real_path)
>+    parent_dir = path.split(path.dirname(real_path))[-1]
>+    return path.join(parent_dir, real_file_name)
Comment on attachment 519646 [details] [diff] [review]
tools

also, some comments about what getParentDirAndFile is supposed to be doing would be handy
Comment on attachment 519648 [details] [diff] [review]
configs

I don't see the point of getParentDirAndFile, but other than that it looks good.
Attachment #519648 - Flags: feedback?(catlee) → feedback+
Attachment #519647 - Flags: feedback?(catlee) → feedback+
> would os.path.realpath work better here?

Yeah, I've switched to it already.

(In reply to comment #14)
> I don't see the point of getParentDirAndFile, but other than that it looks
> good.

The main point is to resolve localconfig.py and pass the real name to slave scritps. Additionally I'm going to symlink staging release config file so that they look like production ones. By using getParentDirAndFile (changed to getRealpath) you'll get their real name to be passed as a property to some builders.

For example, if we have
/buids/buildbot/builder_master1/master/localconfig.py
 which points to
/buids/buildbot/builder_master1/configs/mozilla/production_config.py
(or ../configs/mozilla/production_config.py)
getRealpath will return "mozilla/production_config.py", so you can pass it to consumer functions and builders. The same applies for release configs.
Attachment #519646 - Flags: feedback?(catlee)
Attached patch tools (obsolete) — Splinter Review
* function renamed to getRealpath
* getRealpath simplified by using os.path.realpath
* added tests
Attachment #519646 - Attachment is obsolete: true
Attachment #520635 - Flags: review?(bhearsum)
Attached patch buildbotcustom (obsolete) — Splinter Review
message_tag, enable_repo_setup, commitPatcherConfig variables are pulled from branch config, but could be overridden by release config. I chose this method to not bloat release configs and simplify release config file manipulation for pre-production. I can move them to release configs if you prefer.
Attachment #519647 - Attachment is obsolete: true
Attachment #520637 - Flags: review?(bhearsum)
Attached patch configs (obsolete) — Splinter Review
* added mozilla/preproduction_release_master_localconfig.py config
* updated setup-master.py for the new masters
* preprod-release-master is not printed by setup-master.py -l -8 to make test-masters.sh happy. preprod-release-master doesn't pass checkconfig w/o bumped configs (config bumper also adds some staging specific variables to production configs after bumping the version).
Attachment #519648 - Attachment is obsolete: true
Attachment #520638 - Flags: review?(bhearsum)
I tested these patches in staging:

1. branch config file name dumped from misc.py and release.py. Staging setup returns "mozilla/staging_config.py", fresh set up production master returns "mozilla/production_config.py".

2. Message tag. Worked as expected.

3. repo_setup + release_downloader builders are visible only in staging and preproduction.

4. commitPatcherConfig is True in production and False in staging/preproduction.

It's not required to change anything for production masters, all symlinks stay the same. For staging masters we need to add 4 symlinks (staging_firefox*.py -> firefox*.py).
Comment on attachment 520635 [details] [diff] [review]
tools

Please note that getcwd() is the default for 'cwd' in the docstring. Looks fine otherwise!
Attachment #520635 - Flags: review?(bhearsum) → review+
Comment on attachment 520637 [details] [diff] [review]
buildbotcustom

I really don't like those three variables in the branch configs at all, even if they're overrideable. I think we *do* need a place to set smart defaults for release configs, but I don't think branch configs are the right place. Until we have that, please put them in the release configs directly.
Attachment #520637 - Flags: review?(bhearsum) → review-
I filed bug 643471 on getting a place to set release config defaults.
Attachment #520638 - Flags: review?(bhearsum)
Attached patch toolsSplinter Review
Fixed docstring. Carrying over r=bhearsum.
Attachment #520635 - Attachment is obsolete: true
Attachment #520683 - Flags: review+
Attached patch buildbotcustomSplinter Review
Release configs used.
Attachment #520637 - Attachment is obsolete: true
Attachment #520684 - Flags: review?(bhearsum)
Attached patch configsSplinter Review
Added releaseConfig['messagePrefix'], releaseConfig['commitPatcherConfig'], releaseConfig['enable_repo_setup'] release config variables.
Attachment #520638 - Attachment is obsolete: true
Attachment #520687 - Flags: review?(bhearsum)
Attachment #520684 - Flags: review?(bhearsum) → review+
Attachment #520687 - Flags: review?(bhearsum) → review+
I've updated symlinks on staging masters to reflect changes pushed.

for master in builder_master1 builder_master2 builder_master3 builder_master4 \
    bhearsum/build catlee/master rail ; do
    cd $master
    for v in 1.9.1 1.9.2 2.0 central; do
        rm -v release-firefox-mozilla-$v.py
        ln -sv staging_release-firefox-mozilla-$v.py \
            release-firefox-mozilla-$v.py
    done
    cd -
done

Production masters don't require any changes after merging to production branches.
It's up, running and being recreated from time to time by preproduction master (every 3 days atm).
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: