From e74feb328698de284e8b504c029596908eef432c Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Tue, 4 Aug 2020 17:59:27 +0000 Subject: [PATCH] No bug: [taskgraph] Remove unused scriptengine-autophone worker support; r=bc DONTBUILD Differential Revision: https://phabricator.services.mozilla.com/D84046 --- taskcluster/ci/config.yml | 5 - .../transforms/job/mozharness_test.py | 95 ------------------- taskcluster/taskgraph/transforms/task.py | 52 ---------- 3 files changed, 152 deletions(-) diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml index 3824a1d2a5f9..7608bee5f51e 100644 --- a/taskcluster/ci/config.yml +++ b/taskcluster/ci/config.yml @@ -537,11 +537,6 @@ workers: implementation: treescript os: scriptworker worker-type: '{trust-domain}-1-tree-dev' - t-ap.*: - provisioner: proj-autophone - implementation: script-engine-autophone - os: linux - worker-type: 'gecko-{alias}' t-bitbar-gw.*: provisioner: proj-autophone implementation: generic-worker diff --git a/taskcluster/taskgraph/transforms/job/mozharness_test.py b/taskcluster/taskgraph/transforms/job/mozharness_test.py index be7d7e9bc300..0cea3576ab7f 100644 --- a/taskcluster/taskgraph/transforms/job/mozharness_test.py +++ b/taskcluster/taskgraph/transforms/job/mozharness_test.py @@ -413,98 +413,3 @@ def mozharness_test_on_generic_worker(config, job, taskdesc): if is_bitbar: job['run']['run-as-root'] = True configure_taskdesc_for_run(config, job, taskdesc, worker['implementation']) - - -@run_job_using('script-engine-autophone', 'mozharness-test', schema=mozharness_test_run_schema) -def mozharness_test_on_script_engine_autophone(config, job, taskdesc): - test = taskdesc['run']['test'] - mozharness = test['mozharness'] - worker = taskdesc['worker'] - is_talos = test['suite'] == 'talos' or test['suite'] == 'raptor' - if worker['os'] != 'linux': - raise Exception('os: {} not supported on script-engine-autophone'.format(worker['os'])) - - installer = installer_url(taskdesc) - mozharness_url = get_artifact_url('', - 'public/build/mozharness.zip') - - artifacts = [ - # (artifact name prefix, in-image path) - ("public/test/", "/builds/worker/artifacts"), - ("public/logs/", "/builds/worker/workspace/build/logs"), - ("public/test_info/", "/builds/worker/workspace/build/blobber_upload_dir"), - ] - - worker['artifacts'] = [{ - 'name': prefix, - 'path': path, - 'type': 'directory', - } for (prefix, path) in artifacts] - - if test['reboot']: - worker['reboot'] = test['reboot'] - - worker['env'] = env = { - 'GECKO_HEAD_REPOSITORY': config.params['head_repository'], - 'GECKO_HEAD_REV': config.params['head_rev'], - 'MOZHARNESS_CONFIG': ' '.join(mozharness['config']), - 'MOZHARNESS_SCRIPT': mozharness['script'], - 'MOZHARNESS_URL': {'task-reference': mozharness_url}, - 'MOZILLA_BUILD_URL': {'task-reference': installer}, - "MOZ_NO_REMOTE": '1', - "XPCOM_DEBUG_BREAK": 'warn', - "NO_FAIL_ON_TEST_ERRORS": '1', - "MOZ_HIDE_RESULTS_TABLE": '1', - "MOZ_NODE_PATH": "/usr/local/bin/node", - 'WORKING_DIR': '/builds/worker', - 'WORKSPACE': '/builds/worker/workspace', - 'TASKCLUSTER_WORKER_TYPE': job['worker-type'], - } - - # for fetch tasks on mobile - if 'env' in job['worker'] and 'MOZ_FETCHES' in job['worker']['env']: - env['MOZ_FETCHES'] = job['worker']['env']['MOZ_FETCHES'] - env['MOZ_FETCHES_DIR'] = job['worker']['env']['MOZ_FETCHES_DIR'] - - # talos tests don't need Xvfb - if is_talos: - env['NEED_XVFB'] = 'false' - - extra_config = { - 'installer_url': installer, - 'test_packages_url': test_packages_url(taskdesc), - } - env['EXTRA_MOZHARNESS_CONFIG'] = { - 'task-reference': six.ensure_text(json.dumps(extra_config, sort_keys=True)) - } - - # Bug 1634554 - pass in decision task artifact URL to mozharness for WPT. - # Bug 1645974 - test-verify-wpt and test-coverage-wpt need artifact URL. - if ('web-platform-tests' in test['suite'] or - re.match('test-(coverage|verify)-wpt', test['suite'])): - env['TESTS_BY_MANIFEST_URL'] = { - 'artifact-reference': ''} - - script = 'test-linux.sh' - worker['context'] = config.params.file_url( - 'taskcluster/scripts/tester/{}'.format(script), - ) - - command = worker['command'] = ["./{}".format(script)] - if mozharness.get('include-blob-upload-branch'): - command.append('--blob-upload-branch=' + config.params['project']) - command.extend(mozharness.get('extra-options', [])) - - if test.get('test-manifests'): - env['MOZHARNESS_TEST_PATHS'] = six.ensure_text( - json.dumps({test['suite']: test['test-manifests']}, sort_keys=True)) - - # TODO: remove the need for run['chunked'] - elif mozharness.get('chunked') or test['chunks'] > 1: - command.append('--total-chunk={}'.format(test['chunks'])) - command.append('--this-chunk={}'.format(test['this-chunk'])) - - if 'download-symbols' in mozharness: - download_symbols = mozharness['download-symbols'] - download_symbols = {True: 'true', False: 'false'}.get(download_symbols, download_symbols) - command.append('--download-symbols=' + download_symbols) diff --git a/taskcluster/taskgraph/transforms/task.py b/taskcluster/taskgraph/transforms/task.py index f1edc1098909..7e7582fa40ea 100644 --- a/taskcluster/taskgraph/transforms/task.py +++ b/taskcluster/taskgraph/transforms/task.py @@ -1340,58 +1340,6 @@ def build_dummy_payload(config, task, task_def): task_def['payload'] = {} -@payload_builder('script-engine-autophone', schema={ - Required('os'): Any('macosx', 'linux'), - - # A link for an executable to download - Optional('context'): text_type, - - # Tells the worker whether machine should reboot - # after the task is finished. - Optional('reboot'): - Any(False, 'always', 'never', 'on-exception', 'on-failure'), - - # the command to run - Optional('command'): [taskref_or_string], - - # environment variables - Optional('env'): {text_type: taskref_or_string}, - - # artifacts to extract from the task image after completion - Optional('artifacts'): [{ - # type of artifact -- simple file, or recursive directory - Required('type'): Any('file', 'directory'), - - # task image path from which to read artifact - Required('path'): text_type, - - # name of the produced artifact (root of the names for - # type=directory) - Required('name'): text_type, - }], -}) -def build_script_engine_autophone_payload(config, task, task_def): - worker = task['worker'] - artifacts = map(lambda artifact: { - 'name': artifact['name'], - 'path': artifact['path'], - 'type': artifact['type'], - 'expires': task_def['expires'], - }, worker.get('artifacts', [])) - - task_def['payload'] = { - 'context': worker['context'], - 'command': worker['command'], - 'env': worker['env'], - 'artifacts': artifacts, - } - if worker.get('reboot'): - task_def['payload'] = worker['reboot'] - - if task.get('use-sccache'): - raise Exception('use-sccache not supported in taskcluster-worker') - - transforms = TransformSequence()