Bug 1512188 - Revert to "gecko" for vcs naming; r=tomprince
☠☠ backed out by f3fead0d1dc7 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Tue, 11 Dec 2018 19:50:56 +0000
changeset 450126 0b3259dc10bd817dfb5037b0810d67c841ef20fb
parent 450125 d0eb311b3c8f1251462257207cfa9f2a0408238f
child 450127 1f56f1e581e2b6cf5f4855d1fa171408b225a1ca
push id35190
push userccoroiu@mozilla.com
push dateWed, 12 Dec 2018 05:10:47 +0000
treeherdermozilla-central@5bcbe5232a26 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstomprince
bugs1512188
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1512188 - Revert to "gecko" for vcs naming; r=tomprince For historical consistency and consistency with index paths. "env_prefix" is no longer used after this change, so it has been removed. Differential Revision: https://phabricator.services.mozilla.com/D13876
taskcluster/docker/image_builder/build-image.sh
taskcluster/scripts/run-task
taskcluster/taskgraph/transforms/job/hazard.py
taskcluster/taskgraph/transforms/job/mozharness.py
taskcluster/taskgraph/transforms/job/mozharness_test.py
taskcluster/taskgraph/transforms/job/run_task.py
taskcluster/taskgraph/transforms/job/spidermonkey.py
taskcluster/taskgraph/transforms/job/toolchain.py
taskcluster/taskgraph/transforms/task.py
--- a/taskcluster/docker/image_builder/build-image.sh
+++ b/taskcluster/docker/image_builder/build-image.sh
@@ -33,18 +33,18 @@ if [ -n "$DOCKER_IMAGE_PARENT" ]; then
     LOAD_COMMAND="\
       /builds/worker/checkouts/gecko/mach taskcluster-load-image \
       --task-id \"$DOCKER_IMAGE_PARENT_TASK\" \
       -t \"$DOCKER_IMAGE_PARENT\" && "
 fi
 
 # Build image
 run-task \
-  --firefox-checkout "/builds/worker/checkouts/gecko" \
-  --firefox-sparse-profile build/sparse-profiles/docker-image \
+  --gecko-checkout "/builds/worker/checkouts/gecko" \
+  --gecko-sparse-profile build/sparse-profiles/docker-image \
   -- \
   sh -x -c "$LOAD_COMMAND \
   /builds/worker/checkouts/gecko/mach taskcluster-build-image \
   -t \"$IMAGE_NAME:$HASH\" \
   \"$IMAGE_NAME\""
 
 # Create artifact folder (note that this must occur after run-task)
 mkdir -p /builds/worker/workspace/artifacts
--- a/taskcluster/scripts/run-task
+++ b/taskcluster/scripts/run-task
@@ -509,24 +509,24 @@ def add_vcs_arguments(parser, project, n
 
     parser.add_argument('--%s-checkout' % project,
                         help='Directory where %s checkout should be created' %
                              name)
     parser.add_argument('--%s-sparse-profile' % project,
                         help='Path to sparse profile for %s checkout' % name)
 
 
-def collect_vcs_options(args, project, env_prefix=None):
+def collect_vcs_options(args, project):
     checkout = getattr(args, '%s_checkout' % project)
     sparse_profile = getattr(args, '%s_sparse_profile' % project)
 
     if not checkout:
         return None
 
-    env_prefix = env_prefix or project.upper()
+    env_prefix = project.upper()
 
     base_repo = os.environ.get('%s_BASE_REPOSITORY' % env_prefix)
     head_repo = os.environ.get('%s_HEAD_REPOSITORY' % env_prefix)
     revision = os.environ.get('%s_HEAD_REV' % env_prefix)
     branch = os.environ.get('%s_HEAD_REF' % env_prefix)
 
     store_path = os.environ['HG_STORE_PATH']
 
@@ -548,19 +548,18 @@ def collect_vcs_options(args, project, e
         'sparse-profile': sparse_profile,
         'base-repo': base_repo,
         'head-repo': head_repo,
         'revision': revision,
         'branch': branch,
     }
 
 
-def vcs_checkout_from_args(args, project, env_prefix=None,
-                           prevent_symbolic_revisions=True):
-    options = collect_vcs_options(args, project, env_prefix=env_prefix)
+def vcs_checkout_from_args(args, project, prevent_symbolic_revisions=True):
+    options = collect_vcs_options(args, project)
 
     if not options:
         return
 
     os.environ['%s_HEAD_REV' % options['env-prefix']] = vcs_checkout(
         options['head-repo'],
         options['checkout'],
         options['store-path'],
@@ -585,17 +584,17 @@ def main(args):
     except ValueError:
         our_args = args
         task_args = []
 
     parser = argparse.ArgumentParser()
     parser.add_argument('--user', default='worker', help='user to run as')
     parser.add_argument('--group', default='worker', help='group to run as')
 
-    add_vcs_arguments(parser, 'firefox', 'Firefox')
+    add_vcs_arguments(parser, 'gecko', 'Firefox')
     add_vcs_arguments(parser, 'comm', 'Comm')
 
     parser.add_argument('--fetch-hgfingerprint', action='store_true',
                         help='Fetch the latest hgfingerprint from the secrets store, '
                         'using the taskclsuerProxy')
 
     args = parser.parse_args(our_args)
 
@@ -723,34 +722,34 @@ def main(args):
             os.makedirs(store_path)
         except OSError as e:
             if e.errno != errno.EEXIST:
                 raise
 
         if running_as_root:
             os.chown(store_path, uid, gid)
 
-    prepare_checkout_dir(args.firefox_checkout)
-    if args.firefox_checkout or args.comm_checkout:
+    prepare_checkout_dir(args.gecko_checkout)
+    if args.gecko_checkout or args.comm_checkout:
         prepare_hg_store_path()
 
     if IS_POSIX and running_as_root:
         # Drop permissions to requested user.
         # This code is modeled after what `sudo` was observed to do in a Docker
         # container. We do not bother calling setrlimit() because containers have
         # their own limits.
         print_line(b'setup', b'running as %s:%s\n' % (
             args.user.encode('utf-8'), args.group.encode('utf-8')))
 
         os.setgroups(gids)
         os.umask(0o22)
         os.setresgid(gid, gid, gid)
         os.setresuid(uid, uid, uid)
 
-    vcs_checkout_from_args(args, 'firefox', env_prefix='GECKO')
+    vcs_checkout_from_args(args, 'gecko')
     vcs_checkout_from_args(args, 'comm')
 
     try:
         if 'GECKO_PATH' in os.environ:
             os.environ['GECKO_PATH'] = os.path.abspath(os.environ['GECKO_PATH'])
 
         if 'MOZ_FETCHES' in os.environ:
             fetch_artifacts()
--- a/taskcluster/taskgraph/transforms/job/hazard.py
+++ b/taskcluster/taskgraph/transforms/job/hazard.py
@@ -64,12 +64,12 @@ def docker_worker_hazard(config, job, ta
         env['MOZCONFIG'] = run['mozconfig']
 
     # build-haz-linux.sh needs this otherwise it assumes the checkout is in
     # the workspace.
     env['GECKO_DIR'] = '{workdir}/checkouts/gecko'.format(**run)
 
     worker['command'] = [
         '{workdir}/bin/run-task'.format(**run),
-        '--firefox-checkout', '{workdir}/checkouts/gecko'.format(**run),
+        '--gecko-checkout', '{workdir}/checkouts/gecko'.format(**run),
         '--',
         '/bin/bash', '-c', run['command']
     ]
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -214,17 +214,17 @@ def mozharness_on_docker_worker_setup(co
 
     # Retry if mozharness returns TBPL_RETRY
     worker['retry-exit-status'] = [4]
 
     docker_worker_setup_secrets(config, job, taskdesc)
 
     command = [
         '{workdir}/bin/run-task'.format(**run),
-        '--firefox-checkout', env['GECKO_PATH'],
+        '--gecko-checkout', env['GECKO_PATH'],
     ]
     if run['comm-checkout']:
         command.append('--comm-checkout={workdir}/workspace/build/src/comm'.format(**run))
 
     command += [
         '--',
         '{workdir}/workspace/build/src/{script}'.format(
             workdir=run['workdir'],
--- a/taskcluster/taskgraph/transforms/job/mozharness_test.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py
@@ -135,17 +135,17 @@ def mozharness_test_on_docker(config, jo
 
     # Support vcs checkouts regardless of whether the task runs from
     # source or not in case it is needed on an interactive loaner.
     support_vcs_checkout(config, job, taskdesc)
 
     # If we have a source checkout, run mozharness from it instead of
     # downloading a zip file with the same content.
     if test['checkout']:
-        command.extend(['--firefox-checkout', '{workdir}/checkouts/gecko'.format(**run)])
+        command.extend(['--gecko-checkout', '{workdir}/checkouts/gecko'.format(**run)])
         env['MOZHARNESS_PATH'] = '{workdir}/checkouts/gecko/testing/mozharness'.format(**run)
     else:
         env['MOZHARNESS_URL'] = {'task-reference': mozharness_url}
 
     command.extend([
         '--',
         '{workdir}/bin/test-linux.sh'.format(**run),
     ])
--- a/taskcluster/taskgraph/transforms/job/run_task.py
+++ b/taskcluster/taskgraph/transforms/job/run_task.py
@@ -41,20 +41,20 @@ run_task_schema = Schema({
 })
 
 
 def common_setup(config, job, taskdesc, command, geckodir):
     run = job['run']
     if run['checkout']:
         support_vcs_checkout(config, job, taskdesc,
                              sparse=bool(run['sparse-profile']))
-        command.append('--firefox-checkout={}'.format(geckodir))
+        command.append('--gecko-checkout={}'.format(geckodir))
 
     if run['sparse-profile']:
-        command.append('--firefox-sparse-profile=build/sparse-profiles/%s' %
+        command.append('--firefox-gecko-profile=build/sparse-profiles/%s' %
                        run['sparse-profile'])
 
     taskdesc['worker'].setdefault('env', {})['MOZ_SCM_LEVEL'] = config.params['level']
 
 
 worker_defaults = {
     'cache-dotcache': False,
     'checkout': True,
--- a/taskcluster/taskgraph/transforms/job/spidermonkey.py
+++ b/taskcluster/taskgraph/transforms/job/spidermonkey.py
@@ -68,17 +68,17 @@ def docker_worker_spidermonkey(config, j
         script = "build-sm-package.sh"
     elif run['using'] == 'spidermonkey-mozjs-crate':
         script = "build-sm-mozjs-crate.sh"
     elif run['using'] == 'spidermonkey-rust-bindings':
         script = "build-sm-rust-bindings.sh"
 
     worker['command'] = [
         '{workdir}/bin/run-task'.format(**run),
-        '--firefox-checkout', '{workdir}/workspace/build/src'.format(**run),
+        '--gecko-checkout', '{workdir}/workspace/build/src'.format(**run),
         '--',
         '/bin/bash',
         '-c',
         'cd {workdir} && workspace/build/src/taskcluster/scripts/builder/{script}'.format(
             workdir=run['workdir'], script=script)
     ]
 
 
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -147,22 +147,22 @@ def docker_worker_toolchain(config, job,
         wrapper = ''
 
     args = run.get('arguments', '')
     if args:
         args = ' ' + shell_quote(*args)
 
     sparse_profile = []
     if run.get('sparse-profile'):
-        sparse_profile = ['--firefox-sparse-profile=build/sparse-profiles/{}'
+        sparse_profile = ['--gecko-sparse-profile=build/sparse-profiles/{}'
                           .format(run['sparse-profile'])]
 
     worker['command'] = [
         '{workdir}/bin/run-task'.format(**run),
-        '--firefox-checkout={}'.format(gecko_path),
+        '--gecko-checkout={}'.format(gecko_path),
     ] + sparse_profile + [
         '--',
         'bash',
         '-c',
         'cd {} && '
         '{}workspace/build/src/taskcluster/scripts/misc/{}{}'.format(
             run['workdir'], wrapper, run['script'], args)
     ]
--- a/taskcluster/taskgraph/transforms/task.py
+++ b/taskcluster/taskgraph/transforms/task.py
@@ -1919,20 +1919,20 @@ def check_run_task_caches(config, tasks)
         if run_task:
             for arg in command[1:]:
                 if not isinstance(arg, basestring):
                     continue
 
                 if arg == '--':
                     break
 
-                if arg.startswith('--firefox-sparse-profile'):
+                if arg.startswith('--gecko-sparse-profile'):
                     if '=' not in arg:
                         raise Exception(
-                            '{} is specifying `--firefox-sparse-profile` to run-task '
+                            '{} is specifying `--gecko-sparse-profile` to run-task '
                             'as two arguments. Unable to determine if the sparse '
                             'profile exists.'.format(
                                 task['label']))
                     _, sparse_profile = arg.split('=', 1)
                     if not os.path.exists(os.path.join(GECKO, sparse_profile)):
                         raise Exception(
                             '{} is using non-existant sparse profile {}.'.format(
                                 task['label'], sparse_profile))