Remove modules and recipes that are not used. This is a general cleanup change removing modules and recipes that have not been used for over a year. Change-Id: I472d0aa53e229f6bd88576df23e9bfae744c2b78 Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/36380 Commit-Queue: Godofredo Contreras <godofredoc@google.com> Reviewed-by: Jenn Magder <magder@google.com> Reviewed-by: Zach Anderson <zra@google.com>
diff --git a/recipe_modules/fuchsia_util/__init__.py b/recipe_modules/fuchsia_util/__init__.py deleted file mode 100644 index 6557963..0000000 --- a/recipe_modules/fuchsia_util/__init__.py +++ /dev/null
@@ -1,13 +0,0 @@ -DEPS = [ - 'depot_tools/gsutil', - 'flutter/display_util', - 'flutter/repo_util', - 'fuchsia/cas_util', - 'recipe_engine/cipd', - 'recipe_engine/file', - 'recipe_engine/path', - 'recipe_engine/properties', - 'recipe_engine/raw_io', - 'recipe_engine/step', - 'recipe_engine/swarming', -]
diff --git a/recipe_modules/fuchsia_util/api.py b/recipe_modules/fuchsia_util/api.py deleted file mode 100644 index 5f805b9..0000000 --- a/recipe_modules/fuchsia_util/api.py +++ /dev/null
@@ -1,194 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from contextlib import contextmanager -from recipe_engine import recipe_api - -BUCKET_NAME = 'flutter_infra' -FUCHSIA_BUCKET_NAME = 'fuchsia' -FUCHSIA_SDK_CIPD = 'fuchsia/sdk/core/linux-amd64' -FUCHSIA_IMAGE_NAME = 'qemu-x64.tgz' -FUCHSIA_PACKAGES_ARCHIVE_NAME = 'qemu-x64.tar.gz' -FUCHSIA_TEST_SCRIPT_NAME = 'run_fuchsia_tests.sh' - -SSH_CONFIG = """ -Host * - CheckHostIP no - StrictHostKeyChecking no - ForwardAgent no - ForwardX11 no - GSSAPIDelegateCredentials no - UserKnownHostsFile /dev/null - User fuchsia - IdentitiesOnly yes - IdentityFile $FUCHSIA_PRIVATE_KEY - ControlPersist yes - ControlMaster auto - ControlPath /tmp/fuchsia--%r@%h:%p - ConnectTimeout 10 - ServerAliveInterval 1 - ServerAliveCountMax 10 - LogLevel ERROR -""" - - -class FuchsiaUtilsApi(recipe_api.RecipeApi): - """Provides utilities to execute fuchsia tests.""" - - @contextmanager - def make_temp_dir(self, label): - temp_dir = self.m.path.mkdtemp('tmp') - try: - yield temp_dir - finally: - self.m.file.rmtree('temp dir for %s' % label, temp_dir) - - def get_fuchsia_version(self, flutter_bin): - """Get the Fuchsia SDK version from the given Flutter SDK. - - Args: - flutter_bin: Path to Flutter bin with internal/fuchsia-linux.version. - - Returns: - String of the Fuchsia SDK version to pull artifacts from GCP. - """ - # Flutter SDK only stores the CIPD version, so CIPD must be queried to - # find the SDK version tag for this ref. - version_path = flutter_bin.join('internal', 'fuchsia-linux.version') - version = self.m.file.read_text('Read fuchsia cipd version', version_path) - fuchsia_cipd = self.m.cipd.describe(FUCHSIA_SDK_CIPD, version=version) - # There are multiple tags in a Fuchsia SDK CIPD description requiring - # a search through the tags tuple for the version tag. - for tag in fuchsia_cipd.tags: - if 'version:' in tag.tag: - return tag.tag.replace('version:', '') - raise recipe_api.InfraFailure('No version tag on Fuchsia SDK CIPD ref') - - def download_fuchsia_deps(self, flutter_bin, destination_path): - """Download dependencies to initialize Fuchsia bot. - - Args: - flutter_bin: Path to Flutter bin with internal/fuchsia-linux.version. - destination_path: Path to store the downloaded Fuchsia dependencies. - """ - with self.m.step.nest('Download Fuchsia Dependencies'): - fuchsia_version = self.get_fuchsia_version(flutter_bin) - self.m.gsutil.download( - FUCHSIA_BUCKET_NAME, - 'development/%s/images/%s' % (fuchsia_version, FUCHSIA_IMAGE_NAME), - destination_path, - name="download fuchsia system image") - self.m.gsutil.download( - FUCHSIA_BUCKET_NAME, - 'development/%s/packages/%s' % - (fuchsia_version, FUCHSIA_PACKAGES_ARCHIVE_NAME), - destination_path, - name="download fuchsia companion packages") - - def copy_tool_deps(self, checkout_path, destination_path): - """Copy necessary tools from Flutter SDK to initialize Fuchsia bot. - - Args: - flutter_bin: Path to Flutter bin with internal/fuchsia-linux.version. - destination_path: Path to store the downloaded Fuchsia dependencies. - """ - flutter_bin = checkout_path.join('bin') - fuchsia_tools = flutter_bin.join('cache', 'artifacts', 'fuchsia', 'tools', 'x64') - self.download_fuchsia_deps(flutter_bin, destination_path) - with self.m.step.nest('Collect tool deps'): - self.m.file.copy( - 'Copy test script', - checkout_path.join('dev', 'bots', FUCHSIA_TEST_SCRIPT_NAME), - destination_path) - self.m.file.copy('Copy device-finder', - fuchsia_tools.join('device-finder'), destination_path) - self.m.file.copy('Copy pm', fuchsia_tools.join('pm'), destination_path) - - def collect_results(self, fuchsia_swarming_metadata, timeout='30m'): - # Collect the result of the task by metadata. - fuchsia_output = self.m.path['cleanup'].join('fuchsia_test_output') - self.m.file.ensure_directory('swarming output', fuchsia_output) - results = self.m.swarming.collect( - 'collect', - fuchsia_swarming_metadata, - output_dir=fuchsia_output, - timeout=timeout) - self.m.display_util.display_tasks( - 'Display builds', - results=results, - metadata=fuchsia_swarming_metadata, - raise_on_failure=True) - - def upload_deps(self, checkout_path): - with self.m.step.nest('Create CAS Archive'): - with self.make_temp_dir('cas_dir') as cas_dir: - self.copy_tool_deps(checkout_path, cas_dir) - cas_flutter = cas_dir.join('flutter') - self.m.file.copytree('Copy flutter framework', checkout_path, - cas_flutter) - return self.m.cas_util.upload(cas_dir, step_name='Archive Fuchsia Test CAS') - - def trigger_swarming_task(self, checkout_path): - cas_hash = self.upload_deps(checkout_path) - fuchsia_ctl_package = self.m.cipd.EnsureFile() - fuchsia_ctl_package.add_package( - 'flutter/fuchsia_ctl/${platform}', - self.m.properties.get('fuchsia_ctl_version')) - request = ( - self.m.swarming.task_request().with_name( - 'flutter_fuchsia_driver_tests').with_priority(100)) - request = ( - request.with_slice( - 0, - request[0].with_cipd_ensure_file(fuchsia_ctl_package).with_command([ - './%s' % FUCHSIA_TEST_SCRIPT_NAME, FUCHSIA_IMAGE_NAME - ]).with_dimensions(pool='luci.flutter.tests').with_cas_input_root( - cas_hash).with_expiration_secs(3600).with_io_timeout_secs( - 3600).with_execution_timeout_secs(3600).with_idempotent( - True).with_containment_type('AUTO'))) - - return self.m.swarming.trigger( - 'Trigger Fuchsia Driver Tests', requests=[request]) - - def run_test(self, checkout_path): - """Create a swarming task to run tests against Fuchsia device. - - Args: - checkout_path: Location of Flutter SDK - """ - with self.m.step.nest('Fuchsia Tests'): - self.m.step( - 'Flutter Config Enable Fuchsia', - ['flutter', 'config', '--enable-fuchsia']) - self.m.step( - 'Precache Flutter Artifacts', - ['flutter', 'precache', '--fuchsia', '--no-android', '--no-ios', '--force']) - self.m.step('Precache Flutter Runners', [ - 'flutter', 'precache', '--flutter_runner', '--no-android', '--no-ios' - ]) - return self.trigger_swarming_task(checkout_path) - - def device_name(self): - """Extracts the device name from the bot name. - - This function expects a bot name [host]--[device_name] where host - is the hostname the bot is running on and [device_name] is the - fuchsia device name, e.g. fuchsia-tests-lab01-0001--ocean-bats-wick-snub. - """ - return self.m.swarming.bot_id.split('--')[1] - - def fuchsia_environment(self, checkout_path): - env, env_paths = self.m.repo_util.flutter_environment(checkout_path) - private_key_path = '/etc/botanist/keys/id_rsa_infra' - config_path = self.m.path['cleanup'].join('fuchsia_ssh__config') - public_key_path = self.m.path['cleanup'].join('fuchsia_key.pub') - with self.m.step.nest('Prepare Environment'): - self.m.step( - 'Create public key', ['ssh-keygen', '-y', '-f', private_key_path], - stdout=self.m.raw_io.output_text(leak_to=public_key_path)) - self.m.file.write_raw('Create ssh_config', config_path, SSH_CONFIG) - env['FUCHSIA_SSH_CONFIG'] = config_path - env['FUCHSIA_PRIVATE_KEY'] = private_key_path - env['FUCHSIA_PUBLIC_KEY'] = public_key_path - return env, env_paths
diff --git a/recipe_modules/fuchsia_util/examples/full.expected/basic.json b/recipe_modules/fuchsia_util/examples/full.expected/basic.json deleted file mode 100644 index 41aa7b7..0000000 --- a/recipe_modules/fuchsia_util/examples/full.expected/basic.json +++ /dev/null
@@ -1,625 +0,0 @@ -[ - { - "cmd": [], - "name": "Fuchsia Tests" - }, - { - "cmd": [ - "flutter", - "config", - "--enable-fuchsia" - ], - "name": "Fuchsia Tests.Flutter Config Enable Fuchsia", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "flutter", - "precache", - "--fuchsia", - "--no-android", - "--no-ios", - "--force" - ], - "name": "Fuchsia Tests.Precache Flutter Artifacts", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "flutter", - "precache", - "--flutter_runner", - "--no-android", - "--no-ios" - ], - "name": "Fuchsia Tests.Precache Flutter Runners", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "None/bin/internal/fuchsia-linux.version", - "/path/to/tmp/" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.Read fuchsia cipd version", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@fuchsia-linux.version@FuchsiaSdkCipdVersion@@@", - "@@@STEP_LOG_END@fuchsia-linux.version@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "fuchsia/sdk/core/linux-amd64", - "-version", - "FuchsiaSdkCipdVersion", - "-json-output", - "/path/to/tmp/json" - ], - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.cipd describe fuchsia/sdk/core/linux-amd64", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-FuchsiaSdkCipdVe\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fuchsia/sdk/core/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:GIT_REVISION\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"jiri:JIRI_VERSION\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"version:FUCHSIA_VERSION\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "python3", - "-u", - "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py", - "--", - "RECIPE_REPO[depot_tools]/gsutil.py", - "----", - "cp", - "gs://fuchsia/development/FUCHSIA_VERSION/images/qemu-x64.tgz", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.gsutil download fuchsia system image", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "python3", - "-u", - "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py", - "--", - "RECIPE_REPO[depot_tools]/gsutil.py", - "----", - "cp", - "gs://fuchsia/development/FUCHSIA_VERSION/packages/qemu-x64.tar.gz", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.gsutil download fuchsia companion packages", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "None/dev/bots/run_fuchsia_tests.sh", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps.Copy test script", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "None/bin/cache/artifacts/fuchsia/tools/x64/device-finder", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps.Copy device-finder", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "None/bin/cache/artifacts/fuchsia/tools/x64/pm", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps.Copy pm", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copytree", - "None", - "[CLEANUP]/tmp_tmp_1/flutter" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Copy flutter framework", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "RECIPE_MODULE[recipe_engine::cas]/resources/infra.sha1", - "/path/to/tmp/" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.read infra revision", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LOG_LINE@infra.sha1@git_revision:mock_infra_git_revision@@@", - "@@@STEP_LOG_END@infra.sha1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.install infra/tools/luci/cas", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cipd_tool/infra/tools/luci/cas/git_revision%3Amock_infra_git_revision" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.install infra/tools/luci/cas.ensure package directory", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/cipd_tool/infra/tools/luci/cas/git_revision%3Amock_infra_git_revision", - "-ensure-file", - "infra/tools/luci/cas/${platform} git_revision:mock_infra_git_revision", - "-max-threads", - "0", - "-json-output", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.install infra/tools/luci/cas.ensure_installed", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-git_revision:moc\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/cas/resolved-platform\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/cas/git_revision%3Amock_infra_git_revision/cas", - "archive", - "-cas-instance", - "projects/example-cas-server/instances/default_instance", - "-dump-digest", - "/path/to/tmp/", - "-log-level", - "debug", - "-paths", - "[CLEANUP]/tmp_tmp_1:." - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Archive Fuchsia Test CAS", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LINK@CAS UI@https://cas-viewer.appspot.com/projects/example-cas-server/instances/default_instance/blobs/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0/tree@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "rmtree", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.temp dir for cas_dir", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.install infra/tools/luci/swarming", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin" - ], - "infra_step": true, - "name": "Fuchsia Tests.install infra/tools/luci/swarming.ensure package directory", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin", - "-ensure-file", - "infra/tools/luci/swarming/${platform} swarming_module_pin", - "-max-threads", - "0", - "-json-output", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "Fuchsia Tests.install infra/tools/luci/swarming.ensure_installed", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-swarming_module_\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/swarming/resolved-platform\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin/swarming", - "spawn-tasks", - "-server", - "https://example.swarmingserver.appspot.com", - "-json-input", - "{\"requests\": [{\"name\": \"flutter_fuchsia_driver_tests\", \"priority\": \"100\", \"service_account\": \"\", \"task_slices\": [{\"expiration_secs\": \"3600\", \"properties\": {\"cas_input_root\": {\"cas_instance\": \"projects/example-cas-server/instances/default_instance\", \"digest\": {\"hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\", \"size_bytes\": \"0\"}}, \"cipd_input\": {\"packages\": [{\"package_name\": \"flutter/fuchsia_ctl/${platform}\", \"path\": \".\", \"version\": null}]}, \"command\": [\"./run_fuchsia_tests.sh\", \"qemu-x64.tgz\"], \"containment\": {\"containment_type\": \"AUTO\"}, \"dimensions\": [{\"key\": \"pool\", \"value\": \"luci.flutter.tests\"}], \"env\": [], \"env_prefixes\": [], \"execution_timeout_secs\": \"3600\", \"grace_period_secs\": \"30\", \"idempotent\": true, \"io_timeout_secs\": \"3600\", \"outputs\": [], \"relative_cwd\": \"\"}, \"wait_for_capacity\": false}]}]}", - "-json-output", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "Fuchsia Tests.Trigger Fuchsia Driver Tests", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"tasks\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"request\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"flutter_fuchsia_driver_tests\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/0\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LOG_LINE@json.input@{@@@", - "@@@STEP_LOG_LINE@json.input@ \"requests\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"name\": \"flutter_fuchsia_driver_tests\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"priority\": \"100\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"service_account\": \"\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"task_slices\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"expiration_secs\": \"3600\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"cas_input_root\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"cas_instance\": \"projects/example-cas-server/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"size_bytes\": \"0\"@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"cipd_input\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"packages\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"package_name\": \"flutter/fuchsia_ctl/${platform}\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"path\": \".\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"version\": null@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ]@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"command\": [@@@", - "@@@STEP_LOG_LINE@json.input@ \"./run_fuchsia_tests.sh\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"qemu-x64.tgz\"@@@", - "@@@STEP_LOG_LINE@json.input@ ], @@@", - "@@@STEP_LOG_LINE@json.input@ \"containment\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"containment_type\": \"AUTO\"@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"dimensions\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"key\": \"pool\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"value\": \"luci.flutter.tests\"@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ], @@@", - "@@@STEP_LOG_LINE@json.input@ \"env\": [], @@@", - "@@@STEP_LOG_LINE@json.input@ \"env_prefixes\": [], @@@", - "@@@STEP_LOG_LINE@json.input@ \"execution_timeout_secs\": \"3600\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"grace_period_secs\": \"30\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"idempotent\": true, @@@", - "@@@STEP_LOG_LINE@json.input@ \"io_timeout_secs\": \"3600\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.input@ \"relative_cwd\": \"\"@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"wait_for_capacity\": false@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ]@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ]@@@", - "@@@STEP_LOG_LINE@json.input@}@@@", - "@@@STEP_LOG_END@json.input@@@", - "@@@STEP_LINK@task UI: flutter_fuchsia_driver_tests@https://example.swarmingserver.appspot.com/task?id=0@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[CLEANUP]/fuchsia_test_output" - ], - "infra_step": true, - "name": "swarming output" - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin/swarming", - "collect", - "-server", - "https://example.swarmingserver.appspot.com", - "-task-summary-json", - "/path/to/tmp/json", - "-task-output-stdout", - "json", - "-output-dir", - "[CLEANUP]/fuchsia_test_output", - "-timeout", - "30m", - "0" - ], - "cost": { - "cpu": 100, - "disk": 0, - "memory": 50, - "net": 0 - }, - "infra_step": true, - "name": "collect", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"0\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"output\": \"hello world!\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"bot_id\": \"vm-123\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_output_root\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_instance\": \"projects/example-project/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"hash\": \"24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"size_bytes\": \"73\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"duration\": 62.35, @@@", - "@@@STEP_LOG_LINE@json.output@ \"exit_code\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"flutter_fuchsia_driver_tests\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/some-inv-name\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"state\": \"COMPLETED\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"0\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: flutter_fuchsia_driver_tests@hello world!@@@", - "@@@STEP_LOG_END@task stdout+stderr: flutter_fuchsia_driver_tests@@@", - "@@@STEP_LINK@task cas outputs: flutter_fuchsia_driver_tests@https://cas-viewer.appspot.com/projects/example-project/instances/default_instance/blobs/24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca/73/tree@@@" - ] - }, - { - "cmd": [], - "name": "Display builds", - "~followup_annotations": [ - "@@@STEP_WARNINGS@@@" - ] - }, - { - "cmd": [], - "name": "Display builds.flutter_fuchsia_driver_tests", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LINK@0@https://example.swarmingserver.appspot.com/task?id=0@@@", - "@@@STEP_WARNINGS@@@" - ] - }, - { - "cmd": [ - "git", - "rev-parse", - "HEAD" - ], - "cwd": "None", - "infra_step": true, - "name": "git rev-parse" - }, - { - "cmd": [], - "name": "Prepare Environment" - }, - { - "cmd": [ - "ssh-keygen", - "-y", - "-f", - "/etc/botanist/keys/id_rsa_infra" - ], - "name": "Prepare Environment.Create public key", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "\nHost *\n CheckHostIP no\n StrictHostKeyChecking no\n ForwardAgent no\n ForwardX11 no\n GSSAPIDelegateCredentials no\n UserKnownHostsFile /dev/null\n User fuchsia\n IdentitiesOnly yes\n IdentityFile $FUCHSIA_PRIVATE_KEY\n ControlPersist yes\n ControlMaster auto\n ControlPath /tmp/fuchsia--%r@%h:%p\n ConnectTimeout 10\n ServerAliveInterval 1\n ServerAliveCountMax 10\n LogLevel ERROR\n", - "[CLEANUP]/fuchsia_ssh__config" - ], - "infra_step": true, - "name": "Prepare Environment.Create ssh_config", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipe_modules/fuchsia_util/examples/full.expected/fuchsia_sdk_version_error.json b/recipe_modules/fuchsia_util/examples/full.expected/fuchsia_sdk_version_error.json deleted file mode 100644 index 6a1c499..0000000 --- a/recipe_modules/fuchsia_util/examples/full.expected/fuchsia_sdk_version_error.json +++ /dev/null
@@ -1,139 +0,0 @@ -[ - { - "cmd": [], - "name": "Fuchsia Tests", - "~followup_annotations": [ - "@@@STEP_EXCEPTION@@@" - ] - }, - { - "cmd": [ - "flutter", - "config", - "--enable-fuchsia" - ], - "name": "Fuchsia Tests.Flutter Config Enable Fuchsia", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "flutter", - "precache", - "--fuchsia", - "--no-android", - "--no-ios", - "--force" - ], - "name": "Fuchsia Tests.Precache Flutter Artifacts", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "flutter", - "precache", - "--flutter_runner", - "--no-android", - "--no-ios" - ], - "name": "Fuchsia Tests.Precache Flutter Runners", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_EXCEPTION@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_EXCEPTION@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "None/bin/internal/fuchsia-linux.version", - "/path/to/tmp/" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.Read fuchsia cipd version", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@fuchsia-linux.version@FuchsiaSdkCipdVersion@@@", - "@@@STEP_LOG_END@fuchsia-linux.version@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "fuchsia/sdk/core/linux-amd64", - "-version", - "FuchsiaSdkCipdVersion", - "-json-output", - "/path/to/tmp/json" - ], - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.cipd describe fuchsia/sdk/core/linux-amd64", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-FuchsiaSdkCipdVe\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fuchsia/sdk/core/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": []@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "rmtree", - "[CLEANUP]/tmp_tmp_1" - ], - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.temp dir for cas_dir", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "failure": { - "humanReason": "No version tag on Fuchsia SDK CIPD ref" - }, - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipe_modules/fuchsia_util/examples/full.py b/recipe_modules/fuchsia_util/examples/full.py deleted file mode 100644 index d05cb62..0000000 --- a/recipe_modules/fuchsia_util/examples/full.py +++ /dev/null
@@ -1,58 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from recipe_engine.recipe_api import Property - -DEPS = [ - 'flutter/fuchsia_util', - 'flutter/repo_util', - 'recipe_engine/assertions', - 'recipe_engine/cipd', - 'recipe_engine/file', - 'recipe_engine/path', -] - - -def RunSteps(api): - checkout_path = api.path['checkout'] - metadata = api.fuchsia_util.run_test(checkout_path) - api.fuchsia_util.collect_results(metadata) - device_name = api.fuchsia_util.device_name() - api.assertions.assertEqual(device_name, 'fuchsia-node') - env, env_paths = api.fuchsia_util.fuchsia_environment(checkout_path) - - -def GenTests(api): - # Empty calls for test functions coverage. - api.fuchsia_util.run_test_data('name') - api.fuchsia_util.device_name_data() - # End of calls for test functions coverage. - yield (api.test('basic') + api.fuchsia_util.device_name_data() + - api.repo_util.flutter_environment_data() + api.step_data( - 'Fuchsia Tests.Create CAS Archive.' - 'Download Fuchsia Dependencies.' - 'Read fuchsia cipd version', - api.file.read_text('FuchsiaSdkCipdVersion')) + api.step_data( - 'Fuchsia Tests.Create CAS Archive.' - 'Download Fuchsia Dependencies.' - 'cipd describe fuchsia/sdk/core/linux-amd64', - api.cipd.example_describe( - package_name="fuchsia/sdk/core/linux-amd64", - version="FuchsiaSdkCipdVersion", - test_data_tags=[ - "git_revision:GIT_REVISION", "jiri:JIRI_VERSION", - "version:FUCHSIA_VERSION" - ]))) - yield api.test('fuchsia_sdk_version_error') + api.step_data( - 'Fuchsia Tests.Create CAS Archive.' - 'Download Fuchsia Dependencies.' - 'Read fuchsia cipd version', - api.file.read_text('FuchsiaSdkCipdVersion')) + api.step_data( - 'Fuchsia Tests.Create CAS Archive.' - 'Download Fuchsia Dependencies.' - 'cipd describe fuchsia/sdk/core/linux-amd64', - api.cipd.example_describe( - package_name="fuchsia/sdk/core/linux-amd64", - version="FuchsiaSdkCipdVersion", - test_data_tags=[]))
diff --git a/recipe_modules/fuchsia_util/test_api.py b/recipe_modules/fuchsia_util/test_api.py deleted file mode 100644 index 77a9015..0000000 --- a/recipe_modules/fuchsia_util/test_api.py +++ /dev/null
@@ -1,15 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from recipe_engine import recipe_test_api - - -class FuchsiaUtilTestApi(recipe_test_api.RecipeTestApi): - - def run_test_data(self, step_name): - return self.step_data(step_name, self.m.swarming.trigger(['task1', - 'task2'])) - - def device_name_data(self): - return self.m.swarming.properties(bot_id='abc--fuchsia-node')
diff --git a/recipe_modules/job/__init__.py b/recipe_modules/job/__init__.py deleted file mode 100644 index e953755..0000000 --- a/recipe_modules/job/__init__.py +++ /dev/null
@@ -1,13 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -DEPS = [ - "recipe_engine/buildbucket", - "recipe_engine/file", - "recipe_engine/json", - "recipe_engine/led", - "recipe_engine/path", - "recipe_engine/properties", - "recipe_engine/swarming", -]
diff --git a/recipe_modules/job/api.py b/recipe_modules/job/api.py deleted file mode 100644 index ae8cdb6..0000000 --- a/recipe_modules/job/api.py +++ /dev/null
@@ -1,132 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from google.protobuf import json_format -from past.builtins import basestring -from recipe_engine import recipe_api -from PB.go.chromium.org.luci.buildbucket.proto import build as build_pb2 - - -class Job(object): - """Describes a job that could be launched via led. - - Attributes: - name (str): Name of the job. - properties (dict): Properties as the arguments to `led edit -p`. - dimensions (dict): Dimensions as the arguments to `led edit -d`. - task_id (str): Id of the swarming task. - task_server (str): Host name of the swarming server, e.g. - "chromium-swarm.appspot.com". - task_result (api.swarming.TaskResult): Result of the swarming task. - build_proto(build_pb2.Build): Proto generated from a buildbucket build. - outcome (str): The outcome could be "success", "none" when task_result.state - is None, or TaskState in lower case. - """ - - def __init__(self, name): - # Metadata attached before execution. - assert isinstance(name, basestring) - self.name = name - self.properties = {'name': name} - self.dimensions = {} - - # Metadata attached during execution. - self.task_id = None - self.task_server = None - - # Metadata attached after execution. - self.task_result = None - self.build_proto = None - self.outcome = None - - @property - def task_url(self): - """Returns the URL of the associated task in the Swarming UI.""" - return "%s/task?id=%s" % (self.task_server, self.task_id) - - @property - def milo_url(self): - """Returns the URL of the associated task in the Milo UI.""" - return "https://ci.chromium.org/swarming/task/%s?server=%s" % ( - self.task_id, self.task_server) - - -class JobApi(recipe_api.RecipeApi): - """API for launching jobs and collecting the results.""" - - def __init__(self, *args, **kwargs): - super(JobApi, self).__init__(*args, **kwargs) - - def new(self, job_name): - return Job(job_name) - - def current_recipe(self): - return self.m.properties.get('recipe') - - def launch(self, job, presentation): - """Launches a job with led. - - Args: - job (Job): The job definition. - presentation (StepPresentation): The presentation to add logs to. - - Returns: - The input job object with additional details about the execution. - """ - current = self.m.buildbucket.build.builder - led_data = self.m.led( - "get-builder", - "luci.%s.%s:%s" % (current.project, current.bucket, current.builder), - ) - edit_args = [] - for k, v in sorted(job.properties.items()): - edit_args.extend(["-p", "%s=%s" % (k, self.m.json.dumps(v))]) - for k, v in sorted(job.dimensions.items()): - edit_args.extend(["-d", "%s=%s" % (k, v)]) - led_data = led_data.then("edit", *edit_args) - led_data = self.m.led.inject_input_recipes(led_data) - final = led_data.then("launch", "-modernize") - - job.task_id = final.launch_result.task_id - job.task_server = final.launch_result.swarming_hostname - - presentation.links[job.name] = job.milo_url - return job - - def collect(self, jobs, presentation): - """Collects execution metadata for a list of jobs. - - Args: - jobs (list(Job)): The jobs to collect information for. - presentation (StepPresentation): The presentation to add logs to. - - Returns: - The input jobs with additional details collected from execution. - """ - by_task_id = {job.task_id: job for job in jobs} - swarming_results = self.m.swarming.collect( - "collect", - sorted(by_task_id.keys()), - output_dir=self.m.path["cleanup"], - ) - for result in sorted(swarming_results, key=lambda x: x.id): - job = by_task_id[result.id] - job.task_result = result - - # Led launch ensures this file is present in the task root dir. - build_proto_path = result.output_dir.join("build.proto.json") - build_proto = self.m.file.read_proto( - "read build.proto.json", build_proto_path, build_pb2.Build, "JSONPB") - job.build_proto = build_proto - - if result.success: - job.outcome = "success" - elif not result.state: - job.outcome = "none" - else: - # Example result.state: TaskState.COMPLETED - job.outcome = str(result.state)[10:].lower() - - presentation.links["%s (%s)" % (job.name, job.outcome)] = job.milo_url - return jobs
diff --git a/recipe_modules/job/examples/full.expected/collect.json b/recipe_modules/job/examples/full.expected/collect.json deleted file mode 100644 index f5f70ce..0000000 --- a/recipe_modules/job/examples/full.expected/collect.json +++ /dev/null
@@ -1,236 +0,0 @@ -[ - { - "cmd": [], - "name": "collect builds", - "~followup_annotations": [ - "@@@STEP_LINK@fake_job0 (success)@https://ci.chromium.org/swarming/task/task_id0?server=None@@@", - "@@@STEP_LINK@fake_job1 (success)@https://ci.chromium.org/swarming/task/task_id1?server=None@@@" - ] - }, - { - "cmd": [], - "name": "collect builds.install infra/tools/luci/swarming", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin" - ], - "infra_step": true, - "name": "collect builds.install infra/tools/luci/swarming.ensure package directory", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin", - "-ensure-file", - "infra/tools/luci/swarming/${platform} swarming_module_pin", - "-max-threads", - "0", - "-json-output", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "collect builds.install infra/tools/luci/swarming.ensure_installed", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-swarming_module_\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/swarming/resolved-platform\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin/swarming", - "collect", - "-server", - "https://example.swarmingserver.appspot.com", - "-task-summary-json", - "/path/to/tmp/json", - "-task-output-stdout", - "json", - "-output-dir", - "[CLEANUP]", - "task_id0", - "task_id1" - ], - "cost": { - "cpu": 100, - "disk": 0, - "memory": 50, - "net": 0 - }, - "infra_step": true, - "name": "collect builds.collect", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id0\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"output\": \"hello world!\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"bot_id\": \"vm-123\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_output_root\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_instance\": \"projects/example-project/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"hash\": \"24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"size_bytes\": \"73\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"duration\": 62.35, @@@", - "@@@STEP_LOG_LINE@json.output@ \"exit_code\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"my_task_0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/some-inv-name\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"state\": \"COMPLETED\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"task_id0\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id1\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"output\": \"hello world!\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"bot_id\": \"vm-123\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_output_root\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_instance\": \"projects/example-project/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"hash\": \"24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"size_bytes\": \"73\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"duration\": 62.35, @@@", - "@@@STEP_LOG_LINE@json.output@ \"exit_code\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"my_task_1\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/some-inv-name\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"state\": \"COMPLETED\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"task_id1\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: my_task_0@hello world!@@@", - "@@@STEP_LOG_END@task stdout+stderr: my_task_0@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: my_task_1@hello world!@@@", - "@@@STEP_LOG_END@task stdout+stderr: my_task_1@@@", - "@@@STEP_LINK@task cas outputs: my_task_0@https://cas-viewer.appspot.com/projects/example-project/instances/default_instance/blobs/24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca/73/tree@@@", - "@@@STEP_LINK@task cas outputs: my_task_1@https://cas-viewer.appspot.com/projects/example-project/instances/default_instance/blobs/24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca/73/tree@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[CLEANUP]/task_id0/build.proto.json", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "collect builds.read build.proto.json", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@build.proto.json@{@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"bucket\": \"ci\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": \"builder\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"create_time\": \"2018-05-25T23:50:17Z\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"created_by\": \"user:luci-scheduler@appspot.gserviceaccount.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"1000\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"resultdb\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"invocation\": \"invocations/build:1000\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"priority\": 30@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"input\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"gitiles_commit\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"host\": \"chromium.googlesource.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"ref\": \"refs/heads/main\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@}@@@", - "@@@STEP_LOG_END@build.proto.json@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[CLEANUP]/task_id1/build.proto.json", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "collect builds.read build.proto.json (2)", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@build.proto.json@{@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"bucket\": \"ci\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": \"builder\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"create_time\": \"2018-05-25T23:50:17Z\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"created_by\": \"user:luci-scheduler@appspot.gserviceaccount.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"1001\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"resultdb\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"invocation\": \"invocations/build:1001\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"priority\": 30@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"input\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"gitiles_commit\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"host\": \"chromium.googlesource.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"ref\": \"refs/heads/main\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@}@@@", - "@@@STEP_LOG_END@build.proto.json@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipe_modules/job/examples/full.expected/collect_failed_states.json b/recipe_modules/job/examples/full.expected/collect_failed_states.json deleted file mode 100644 index fa20d61..0000000 --- a/recipe_modules/job/examples/full.expected/collect_failed_states.json +++ /dev/null
@@ -1,218 +0,0 @@ -[ - { - "cmd": [], - "name": "collect builds", - "~followup_annotations": [ - "@@@STEP_LINK@fake_job0 (none)@https://ci.chromium.org/swarming/task/task_id0?server=None@@@", - "@@@STEP_LINK@fake_job1 (timed_out)@https://ci.chromium.org/swarming/task/task_id1?server=None@@@" - ] - }, - { - "cmd": [], - "name": "collect builds.install infra/tools/luci/swarming", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin" - ], - "infra_step": true, - "name": "collect builds.install infra/tools/luci/swarming.ensure package directory", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin", - "-ensure-file", - "infra/tools/luci/swarming/${platform} swarming_module_pin", - "-max-threads", - "0", - "-json-output", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "collect builds.install infra/tools/luci/swarming.ensure_installed", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-swarming_module_\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/swarming/resolved-platform\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin/swarming", - "collect", - "-server", - "https://example.swarmingserver.appspot.com", - "-task-summary-json", - "/path/to/tmp/json", - "-task-output-stdout", - "json", - "-output-dir", - "[CLEANUP]", - "task_id0", - "task_id1" - ], - "cost": { - "cpu": 100, - "disk": 0, - "memory": 50, - "net": 0 - }, - "infra_step": true, - "name": "collect builds.collect", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id0\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"error\": \"Bot could not be contacted\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"task_id0\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id1\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"output\": \"hello world!\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"bot_id\": \"vm-123\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_output_root\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_instance\": \"projects/example-project/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"hash\": \"24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"size_bytes\": \"73\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"duration\": 62.35, @@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"my_task_1\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/some-inv-name\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"state\": \"TIMED_OUT\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"task_id1\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: None@Bot could not be contacted@@@", - "@@@STEP_LOG_END@task stdout+stderr: None@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: my_task_1@hello world!@@@", - "@@@STEP_LOG_END@task stdout+stderr: my_task_1@@@", - "@@@STEP_LINK@task cas outputs: my_task_1@https://cas-viewer.appspot.com/projects/example-project/instances/default_instance/blobs/24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca/73/tree@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[CLEANUP]/task_id0/build.proto.json", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "collect builds.read build.proto.json", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@build.proto.json@{@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"bucket\": \"ci\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": \"builder\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"create_time\": \"2018-05-25T23:50:17Z\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"created_by\": \"user:luci-scheduler@appspot.gserviceaccount.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"1000\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"resultdb\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"invocation\": \"invocations/build:1000\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"priority\": 30@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"input\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"gitiles_commit\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"host\": \"chromium.googlesource.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"ref\": \"refs/heads/main\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@}@@@", - "@@@STEP_LOG_END@build.proto.json@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[CLEANUP]/task_id1/build.proto.json", - "/path/to/tmp/json" - ], - "infra_step": true, - "name": "collect builds.read build.proto.json (2)", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@build.proto.json@{@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"bucket\": \"ci\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"builder\": \"builder\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"create_time\": \"2018-05-25T23:50:17Z\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"created_by\": \"user:luci-scheduler@appspot.gserviceaccount.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"1001\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"resultdb\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"invocation\": \"invocations/build:1001\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"priority\": 30@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ },@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"input\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"gitiles_commit\": {@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"host\": \"chromium.googlesource.com\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"id\": \"2d72510e447ab60a9728aeea2362d8be2cbd7789\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"project\": \"project\",@@@", - "@@@STEP_LOG_LINE@build.proto.json@ \"ref\": \"refs/heads/main\"@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@ }@@@", - "@@@STEP_LOG_LINE@build.proto.json@}@@@", - "@@@STEP_LOG_END@build.proto.json@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipe_modules/job/examples/full.expected/current_recipe.json b/recipe_modules/job/examples/full.expected/current_recipe.json deleted file mode 100644 index b6042b6..0000000 --- a/recipe_modules/job/examples/full.expected/current_recipe.json +++ /dev/null
@@ -1,5 +0,0 @@ -[ - { - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipe_modules/job/examples/full.expected/launch.json b/recipe_modules/job/examples/full.expected/launch.json deleted file mode 100644 index 9ee4d3f..0000000 --- a/recipe_modules/job/examples/full.expected/launch.json +++ /dev/null
@@ -1,148 +0,0 @@ -[ - { - "cmd": [], - "name": "launch job", - "~followup_annotations": [ - "@@@STEP_LINK@fake_job0@https://ci.chromium.org/swarming/task/job_task_id?server=example.swarmingserver.appspot.com@@@" - ] - }, - { - "cmd": [ - "led", - "get-builder", - "luci.flutter.try:Linux" - ], - "luci_context": { - "realm": { - "name": "flutter:try" - }, - "resultdb": { - "current_invocation": { - "name": "invocations/build:8945511751514863184", - "update_token": "token" - }, - "hostname": "rdbhost" - } - }, - "name": "launch job.led get-builder", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@proto.output@{@@@", - "@@@STEP_LOG_LINE@proto.output@ \"buildbucket\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"bbagent_args\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"build\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"builder\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"bucket\": \"try\",@@@", - "@@@STEP_LOG_LINE@proto.output@ \"builder\": \"Linux\",@@@", - "@@@STEP_LOG_LINE@proto.output@ \"project\": \"flutter\"@@@", - "@@@STEP_LOG_LINE@proto.output@ },@@@", - "@@@STEP_LOG_LINE@proto.output@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"task_id\": \"job_task_id\"@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@}@@@", - "@@@STEP_LOG_END@proto.output@@@" - ] - }, - { - "cmd": [ - "led", - "edit", - "-p", - "foo=[\"a\", \"b\"]", - "-p", - "name=\"fake_job0\"", - "-p", - "recipe=\"fake_recipe\"", - "-d", - "id=fake_bot_id", - "-d", - "pool=luci.flutter.staging" - ], - "luci_context": { - "realm": { - "name": "flutter:try" - }, - "resultdb": { - "current_invocation": { - "name": "invocations/build:8945511751514863184", - "update_token": "token" - }, - "hostname": "rdbhost" - } - }, - "name": "launch job.led edit", - "stdin": "{\n \"buildbucket\": {\n \"bbagent_args\": {\n \"build\": {\n \"builder\": {\n \"bucket\": \"try\",\n \"builder\": \"Linux\",\n \"project\": \"flutter\"\n },\n \"infra\": {\n \"swarming\": {\n \"task_id\": \"job_task_id\"\n }\n }\n }\n }\n }\n}", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@proto.output@{@@@", - "@@@STEP_LOG_LINE@proto.output@ \"buildbucket\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"bbagent_args\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"build\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"builder\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"bucket\": \"try\",@@@", - "@@@STEP_LOG_LINE@proto.output@ \"builder\": \"Linux\",@@@", - "@@@STEP_LOG_LINE@proto.output@ \"project\": \"flutter\"@@@", - "@@@STEP_LOG_LINE@proto.output@ },@@@", - "@@@STEP_LOG_LINE@proto.output@ \"infra\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"task_id\": \"job_task_id\"@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ },@@@", - "@@@STEP_LOG_LINE@proto.output@ \"input\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@proto.output@ \"foo\": [@@@", - "@@@STEP_LOG_LINE@proto.output@ \"a\",@@@", - "@@@STEP_LOG_LINE@proto.output@ \"b\"@@@", - "@@@STEP_LOG_LINE@proto.output@ ],@@@", - "@@@STEP_LOG_LINE@proto.output@ \"name\": \"fake_job0\",@@@", - "@@@STEP_LOG_LINE@proto.output@ \"recipe\": \"fake_recipe\"@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@ }@@@", - "@@@STEP_LOG_LINE@proto.output@}@@@", - "@@@STEP_LOG_END@proto.output@@@" - ] - }, - { - "cmd": [ - "led", - "launch", - "-modernize" - ], - "luci_context": { - "realm": { - "name": "flutter:try" - }, - "resultdb": { - "current_invocation": { - "name": "invocations/build:8945511751514863184", - "update_token": "token" - }, - "hostname": "rdbhost" - } - }, - "name": "launch job.led launch", - "stdin": "{\n \"buildbucket\": {\n \"bbagent_args\": {\n \"build\": {\n \"builder\": {\n \"bucket\": \"try\",\n \"builder\": \"Linux\",\n \"project\": \"flutter\"\n },\n \"infra\": {\n \"swarming\": {\n \"task_id\": \"job_task_id\"\n }\n },\n \"input\": {\n \"properties\": {\n \"foo\": [\n \"a\",\n \"b\"\n ],\n \"name\": \"fake_job0\",\n \"recipe\": \"fake_recipe\"\n }\n }\n }\n }\n }\n}", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"swarming\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"host_name\": \"example.swarmingserver.appspot.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"job_task_id\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LINK@Swarming task@https://example.swarmingserver.appspot.com/task?id=job_task_id@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipe_modules/job/examples/full.py b/recipe_modules/job/examples/full.py deleted file mode 100644 index 33a21ae..0000000 --- a/recipe_modules/job/examples/full.py +++ /dev/null
@@ -1,75 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from recipe_engine.recipe_api import Property - -DEPS = [ - "flutter/job", - "recipe_engine/properties", - "recipe_engine/step", - "recipe_engine/swarming", -] - -PROPERTIES = { - "test_name": Property(kind=str, help="Name of the test"), -} - - -def RunSteps(api, test_name): - job0 = api.job.new("fake_job0") - job0.properties.update({ - "recipe": "fake_recipe", - "foo": ["a", "b"], - }) - job0.dimensions.update({ - "id": "fake_bot_id", - "pool": "luci.flutter.staging", - }) - - job1 = api.job.new("fake_job1") - - if test_name == "launch": - with api.step.nest("launch job") as presentation: - job0 = api.job.launch(job0, presentation) - elif test_name == "collect": - job0.task_id = "task_id0" - job1.task_id = "task_id1" - with api.step.nest("collect builds") as presentation: - api.job.collect([job0, job1], presentation) - elif test_name == "current_recipe": - api.job.current_recipe() - - job1.task_url # For test coverage. - -def GenTests(api): - yield api.test( - "launch", - api.properties(test_name="launch"), - api.job.mock_launch(), - ) - yield api.test( - "collect", - api.properties(test_name="collect"), - api.job.mock_collect(["task_id0", "task_id1"], "collect builds"), - ) - yield api.test( - "collect_failed_states", - api.properties(test_name="collect"), - api.job.mock_collect( - ["task_id0", "task_id1"], - "collect builds", - swarming_results=[ - api.swarming.task_result( - id="task_id0", name="my_task_0", state=None), - api.swarming.task_result( - id="task_id1", - name="my_task_1", - state=api.swarming.TaskState.TIMED_OUT), - ], - ), - ) - yield api.test( - "current_recipe", - api.properties(test_name="current_recipe"), - )
diff --git a/recipe_modules/job/test_api.py b/recipe_modules/job/test_api.py deleted file mode 100644 index d526346..0000000 --- a/recipe_modules/job/test_api.py +++ /dev/null
@@ -1,81 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -from PB.go.chromium.org.luci.led.job import job as job_pb2 -from recipe_engine import recipe_test_api - - -class JobTestApi(recipe_test_api.RecipeTestApi): - - def mock_launch(self, buildbucket_build=None, task_id="job_task_id"): - """Returns mock data for the launch function. - - Args: - buildbucket_build (TestData): Emulates a buildbucket build. It is usually - an output from api.buildbucket.x_build(). - task_id (str): Id of the swarming task. - """ - ret = self.empty_test_data() - - # Attaches current build. - if not buildbucket_build: - buildbucket_build = self.m.buildbucket.ci_build( - project="flutter", bucket="try", builder="Linux") - ret += buildbucket_build - - # Attaches task_id of the launched swarming task. - # led launch mock will take ....infra.swarming.task_id as this build's - # launched swarming ID. - jd = job_pb2.Definition() - jd.buildbucket.bbagent_args.build.infra.swarming.task_id = task_id - ret += self.m.led.mock_get_builder(jd) - return ret - - def mock_collect(self, - task_ids, - presentation_step_name, - swarming_results=None, - build_protos=None): - """Returns mock data for the collect function. - - Args: - task_ids (list(str)): List of swarming task ids. - presentation_step_name (str): The step name of the presentation. - swarming_results (list(dict)): List of the outputs from - api.swarming.task_result() in the order of task_ids. - build_protos (list(build_pb2.Build)): List of build proto messages in the - order of task_ids. - """ - ret = self.empty_test_data() - - # Attaches swarming results. - if not swarming_results: - swarming_results = [ - self.m.swarming.task_result(id=task_id, name="my_task_%d" % i) - for i, task_id in enumerate(task_ids) - ] - - ret += self.step_data( - "%s.collect" % presentation_step_name, - self.m.swarming.collect(swarming_results), - ) - - # Attaches build protos. - if not build_protos: - build_protos = [ - self.m.buildbucket.ci_build_message(build_id=1000 + i) - for i, _ in enumerate(task_ids) - ] - - for i, id in enumerate(task_ids): - # Mocks read build.proto.json. - step_name = "%s.read build.proto.json" % presentation_step_name - if i > 0: - step_name += " (%d)" % (i + 1) - ret += self.step_data( - step_name, - self.m.file.read_proto(build_protos[i]), - ) - - return ret
diff --git a/recipes/fuchsia/fuchsia.expected/basic.json b/recipes/fuchsia/fuchsia.expected/basic.json deleted file mode 100644 index d4333a5..0000000 --- a/recipes/fuchsia/fuchsia.expected/basic.json +++ /dev/null
@@ -1,1128 +0,0 @@ -[ - { - "cmd": [], - "name": "Checkout flutter/flutter" - }, - { - "cmd": [ - "python3", - "-u", - "RECIPE_MODULE[depot_tools::git]/resources/git_setup.py", - "--path", - "[START_DIR]/flutter", - "--url", - "https://github.com/flutter/flutter" - ], - "name": "Checkout flutter/flutter.git setup", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "git", - "fetch", - "origin", - "refs/pull/1/head", - "--recurse-submodules", - "--progress", - "--tags" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "PATH": "RECIPE_REPO[depot_tools]:<PATH>" - }, - "infra_step": true, - "name": "Checkout flutter/flutter.git fetch", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "git", - "checkout", - "-f", - "FETCH_HEAD" - ], - "cwd": "[START_DIR]/flutter", - "infra_step": true, - "name": "Checkout flutter/flutter.git checkout", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "git", - "rev-parse", - "HEAD" - ], - "cwd": "[START_DIR]/flutter", - "infra_step": true, - "name": "Checkout flutter/flutter.read revision", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_TEXT@<br/>checked out 'deadbeef'<br/>@@@", - "@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@" - ] - }, - { - "cmd": [ - "git", - "clean", - "-f", - "-d", - "-x" - ], - "cwd": "[START_DIR]/flutter", - "infra_step": true, - "name": "Checkout flutter/flutter.git clean", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "git", - "submodule", - "sync" - ], - "cwd": "[START_DIR]/flutter", - "infra_step": true, - "name": "Checkout flutter/flutter.submodule sync", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "git", - "submodule", - "update", - "--init", - "--recursive" - ], - "cwd": "[START_DIR]/flutter", - "infra_step": true, - "name": "Checkout flutter/flutter.submodule update", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "git", - "rev-parse", - "HEAD" - ], - "cwd": "[START_DIR]/flutter", - "infra_step": true, - "name": "git rev-parse" - }, - { - "cmd": [], - "name": "Fuchsia Tests" - }, - { - "cmd": [ - "flutter", - "config", - "--enable-fuchsia" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "name": "Fuchsia Tests.Flutter Config Enable Fuchsia", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "flutter", - "precache", - "--fuchsia", - "--no-android", - "--no-ios", - "--force" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "name": "Fuchsia Tests.Precache Flutter Artifacts", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "flutter", - "precache", - "--flutter_runner", - "--no-android", - "--no-ios" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "name": "Fuchsia Tests.Precache Flutter Runners", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/flutter/bin/internal/fuchsia-linux.version", - "/path/to/tmp/" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.Read fuchsia cipd version", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@fuchsia-linux.version@FuchsiaSdkCipdVersion@@@", - "@@@STEP_LOG_END@fuchsia-linux.version@@@" - ] - }, - { - "cmd": [ - "cipd", - "describe", - "fuchsia/sdk/core/linux-amd64", - "-version", - "FuchsiaSdkCipdVersion", - "-json-output", - "/path/to/tmp/json" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.cipd describe fuchsia/sdk/core/linux-amd64", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"pin\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-FuchsiaSdkCipdVe\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"fuchsia/sdk/core/linux-amd64\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"refs\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-latest----------\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"modified_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"ref\": \"latest\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ], @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tags\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"git_revision:GIT_REVISION\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"jiri:JIRI_VERSION\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_by\": \"user:44-blablbla@developer.gserviceaccount.com\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"registered_ts\": 1446574210, @@@", - "@@@STEP_LOG_LINE@json.output@ \"tag\": \"version:FUCHSIA_VERSION\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "python3", - "-u", - "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py", - "--", - "RECIPE_REPO[depot_tools]/gsutil.py", - "----", - "cp", - "gs://fuchsia/development/FUCHSIA_VERSION/images/qemu-x64.tgz", - "[CLEANUP]/tmp_tmp_1" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.gsutil download fuchsia system image", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "python3", - "-u", - "RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py", - "--", - "RECIPE_REPO[depot_tools]/gsutil.py", - "----", - "cp", - "gs://fuchsia/development/FUCHSIA_VERSION/packages/qemu-x64.tar.gz", - "[CLEANUP]/tmp_tmp_1" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Download Fuchsia Dependencies.gsutil download fuchsia companion packages", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/flutter/dev/bots/run_fuchsia_tests.sh", - "[CLEANUP]/tmp_tmp_1" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps.Copy test script", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/flutter/bin/cache/artifacts/fuchsia/tools/x64/device-finder", - "[CLEANUP]/tmp_tmp_1" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps.Copy device-finder", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/flutter/bin/cache/artifacts/fuchsia/tools/x64/pm", - "[CLEANUP]/tmp_tmp_1" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Collect tool deps.Copy pm", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copytree", - "[START_DIR]/flutter", - "[CLEANUP]/tmp_tmp_1/flutter" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Copy flutter framework", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "RECIPE_MODULE[recipe_engine::cas]/resources/infra.sha1", - "/path/to/tmp/" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.read infra revision", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LOG_LINE@infra.sha1@git_revision:mock_infra_git_revision@@@", - "@@@STEP_LOG_END@infra.sha1@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.Create CAS Archive.install infra/tools/luci/cas", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cipd_tool/infra/tools/luci/cas/git_revision%3Amock_infra_git_revision" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.install infra/tools/luci/cas.ensure package directory", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/cipd_tool/infra/tools/luci/cas/git_revision%3Amock_infra_git_revision", - "-ensure-file", - "infra/tools/luci/cas/${platform} git_revision:mock_infra_git_revision", - "-max-threads", - "0", - "-json-output", - "/path/to/tmp/json" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.install infra/tools/luci/cas.ensure_installed", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@3@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-git_revision:moc\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/cas/resolved-platform\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/cas/git_revision%3Amock_infra_git_revision/cas", - "archive", - "-cas-instance", - "projects/example-cas-server/instances/default_instance", - "-dump-digest", - "/path/to/tmp/", - "-log-level", - "debug", - "-paths", - "[CLEANUP]/tmp_tmp_1:." - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.Archive Fuchsia Test CAS", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LINK@CAS UI@https://cas-viewer.appspot.com/projects/example-cas-server/instances/default_instance/blobs/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/0/tree@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "rmtree", - "[CLEANUP]/tmp_tmp_1" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Create CAS Archive.temp dir for cas_dir", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [], - "name": "Fuchsia Tests.install infra/tools/luci/swarming", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.install infra/tools/luci/swarming.ensure package directory", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@" - ] - }, - { - "cmd": [ - "cipd", - "ensure", - "-root", - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin", - "-ensure-file", - "infra/tools/luci/swarming/${platform} swarming_module_pin", - "-max-threads", - "0", - "-json-output", - "/path/to/tmp/json" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.install infra/tools/luci/swarming.ensure_installed", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@2@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"resolved-instance_id-of-swarming_module_\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"package\": \"infra/tools/luci/swarming/resolved-platform\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@" - ] - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin/swarming", - "spawn-tasks", - "-server", - "https://example.swarmingserver.appspot.com", - "-json-input", - "{\"requests\": [{\"name\": \"flutter_fuchsia_driver_tests\", \"priority\": \"100\", \"service_account\": \"\", \"task_slices\": [{\"expiration_secs\": \"3600\", \"properties\": {\"cas_input_root\": {\"cas_instance\": \"projects/example-cas-server/instances/default_instance\", \"digest\": {\"hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\", \"size_bytes\": \"0\"}}, \"cipd_input\": {\"packages\": [{\"package_name\": \"flutter/fuchsia_ctl/${platform}\", \"path\": \".\", \"version\": \"version:0.0.2\"}]}, \"command\": [\"./run_fuchsia_tests.sh\", \"qemu-x64.tgz\"], \"containment\": {\"containment_type\": \"AUTO\"}, \"dimensions\": [{\"key\": \"pool\", \"value\": \"luci.flutter.tests\"}], \"env\": [], \"env_prefixes\": [], \"execution_timeout_secs\": \"3600\", \"grace_period_secs\": \"30\", \"idempotent\": true, \"io_timeout_secs\": \"3600\", \"outputs\": [], \"relative_cwd\": \"\"}, \"wait_for_capacity\": false}]}]}", - "-json-output", - "/path/to/tmp/json" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "Fuchsia Tests.Trigger Fuchsia Driver Tests", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"tasks\": [@@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"request\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"task1\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/0\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ {@@@", - "@@@STEP_LOG_LINE@json.output@ \"request\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"task2\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"1\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_result\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/1\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ ]@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LOG_LINE@json.input@{@@@", - "@@@STEP_LOG_LINE@json.input@ \"requests\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"name\": \"flutter_fuchsia_driver_tests\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"priority\": \"100\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"service_account\": \"\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"task_slices\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"expiration_secs\": \"3600\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"properties\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"cas_input_root\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"cas_instance\": \"projects/example-cas-server/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"size_bytes\": \"0\"@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"cipd_input\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"packages\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"package_name\": \"flutter/fuchsia_ctl/${platform}\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"path\": \".\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"version\": \"version:0.0.2\"@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ]@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"command\": [@@@", - "@@@STEP_LOG_LINE@json.input@ \"./run_fuchsia_tests.sh\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"qemu-x64.tgz\"@@@", - "@@@STEP_LOG_LINE@json.input@ ], @@@", - "@@@STEP_LOG_LINE@json.input@ \"containment\": {@@@", - "@@@STEP_LOG_LINE@json.input@ \"containment_type\": \"AUTO\"@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"dimensions\": [@@@", - "@@@STEP_LOG_LINE@json.input@ {@@@", - "@@@STEP_LOG_LINE@json.input@ \"key\": \"pool\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"value\": \"luci.flutter.tests\"@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ], @@@", - "@@@STEP_LOG_LINE@json.input@ \"env\": [], @@@", - "@@@STEP_LOG_LINE@json.input@ \"env_prefixes\": [], @@@", - "@@@STEP_LOG_LINE@json.input@ \"execution_timeout_secs\": \"3600\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"grace_period_secs\": \"30\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"idempotent\": true, @@@", - "@@@STEP_LOG_LINE@json.input@ \"io_timeout_secs\": \"3600\", @@@", - "@@@STEP_LOG_LINE@json.input@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.input@ \"relative_cwd\": \"\"@@@", - "@@@STEP_LOG_LINE@json.input@ }, @@@", - "@@@STEP_LOG_LINE@json.input@ \"wait_for_capacity\": false@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ]@@@", - "@@@STEP_LOG_LINE@json.input@ }@@@", - "@@@STEP_LOG_LINE@json.input@ ]@@@", - "@@@STEP_LOG_LINE@json.input@}@@@", - "@@@STEP_LOG_END@json.input@@@", - "@@@STEP_LINK@task UI: task1@https://example.swarmingserver.appspot.com/task?id=0@@@", - "@@@STEP_LINK@task UI: task2@https://example.swarmingserver.appspot.com/task?id=1@@@" - ] - }, - { - "cmd": [ - "vpython3", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[CLEANUP]/fuchsia_test_output" - ], - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "swarming output" - }, - { - "cmd": [ - "[START_DIR]/cipd_tool/infra/tools/luci/swarming/swarming_module_pin/swarming", - "collect", - "-server", - "https://example.swarmingserver.appspot.com", - "-task-summary-json", - "/path/to/tmp/json", - "-task-output-stdout", - "json", - "-output-dir", - "[CLEANUP]/fuchsia_test_output", - "-timeout", - "30m", - "0", - "1" - ], - "cost": { - "cpu": 100, - "disk": 0, - "memory": 50, - "net": 0 - }, - "cwd": "[START_DIR]/flutter", - "env": { - "DEPOT_TOOLS": "RECIPE_REPO[depot_tools]", - "GIT_BRANCH": "", - "LUCI_BRANCH": "", - "LUCI_CI": "True", - "LUCI_PR": "1", - "OS": "linux", - "PUB_CACHE": "[START_DIR]/.pub-cache", - "REVISION": "12345abcde12345abcde12345abcde12345abcde", - "SDK_CHECKOUT_PATH": "[START_DIR]/flutter" - }, - "env_prefixes": { - "PATH": [ - "[START_DIR]/flutter/bin", - "[START_DIR]/flutter/bin/cache/dart-sdk/bin" - ] - }, - "infra_step": true, - "name": "collect", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@json.output@{@@@", - "@@@STEP_LOG_LINE@json.output@ \"0\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"output\": \"hello world!\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"bot_id\": \"vm-123\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_output_root\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_instance\": \"projects/example-project/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"hash\": \"24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"size_bytes\": \"73\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"duration\": 62.35, @@@", - "@@@STEP_LOG_LINE@json.output@ \"exit_code\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"task1\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/some-inv-name\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"state\": \"COMPLETED\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"0\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"1\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"output\": \"hello world!\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"outputs\": [], @@@", - "@@@STEP_LOG_LINE@json.output@ \"results\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"bot_id\": \"vm-123\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_output_root\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"cas_instance\": \"projects/example-project/instances/default_instance\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"digest\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"hash\": \"24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"size_bytes\": \"73\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"duration\": 62.35, @@@", - "@@@STEP_LOG_LINE@json.output@ \"exit_code\": \"0\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"name\": \"task2\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"resultdb_info\": {@@@", - "@@@STEP_LOG_LINE@json.output@ \"invocation\": \"invocations/some-inv-name\"@@@", - "@@@STEP_LOG_LINE@json.output@ }, @@@", - "@@@STEP_LOG_LINE@json.output@ \"state\": \"COMPLETED\", @@@", - "@@@STEP_LOG_LINE@json.output@ \"task_id\": \"1\"@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@ }@@@", - "@@@STEP_LOG_LINE@json.output@}@@@", - "@@@STEP_LOG_END@json.output@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: task1@hello world!@@@", - "@@@STEP_LOG_END@task stdout+stderr: task1@@@", - "@@@STEP_LOG_LINE@task stdout+stderr: task2@hello world!@@@", - "@@@STEP_LOG_END@task stdout+stderr: task2@@@", - "@@@STEP_LINK@task cas outputs: task1@https://cas-viewer.appspot.com/projects/example-project/instances/default_instance/blobs/24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca/73/tree@@@", - "@@@STEP_LINK@task cas outputs: task2@https://cas-viewer.appspot.com/projects/example-project/instances/default_instance/blobs/24b2420bc49d8b8fdc1d011a163708927532b37dc9f91d7d8d6877e3a86559ca/73/tree@@@" - ] - }, - { - "cmd": [], - "name": "Display builds", - "~followup_annotations": [ - "@@@STEP_WARNINGS@@@" - ] - }, - { - "cmd": [], - "name": "Display builds.task1", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LINK@0@https://example.swarmingserver.appspot.com/task?id=0@@@", - "@@@STEP_WARNINGS@@@" - ] - }, - { - "cmd": [], - "name": "Display builds.task2", - "~followup_annotations": [ - "@@@STEP_NEST_LEVEL@1@@@", - "@@@STEP_LINK@1@https://example.swarmingserver.appspot.com/task?id=1@@@", - "@@@STEP_WARNINGS@@@" - ] - }, - { - "name": "$result" - } -] \ No newline at end of file
diff --git a/recipes/fuchsia/fuchsia.py b/recipes/fuchsia/fuchsia.py deleted file mode 100644 index 6cd85ad..0000000 --- a/recipes/fuchsia/fuchsia.py +++ /dev/null
@@ -1,57 +0,0 @@ -# Copyright 2020 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - - -from contextlib import contextmanager -import re - -DEPS = [ - 'flutter/fuchsia_util', - 'flutter/repo_util', - 'recipe_engine/cipd', - 'recipe_engine/context', - 'recipe_engine/file', - 'recipe_engine/path', - 'recipe_engine/properties', -] - - -def RunSteps(api): - checkout_path = api.path['start_dir'].join('flutter') - api.repo_util.checkout( - 'flutter', - checkout_path, - api.properties.get('git_url'), - api.properties.get('git_ref'), - ) - env, env_prefixes = api.repo_util.flutter_environment(checkout_path) - with api.context(env=env, env_prefixes=env_prefixes, cwd=checkout_path): - metadata = api.fuchsia_util.run_test(checkout_path) - api.fuchsia_util.collect_results(metadata) - - -def GenTests(api): - yield (api.test('basic') + api.properties( - git_url='https://github.com/flutter/flutter', - git_ref='refs/pull/1/head', - shard='tests', - os='linux', - fuchsia_ctl_version='version:0.0.2', - should_upload=False) + api.fuchsia_util.run_test_data( - 'Fuchsia Tests.Trigger Fuchsia Driver Tests') + - api.repo_util.flutter_environment_data() + api.step_data( - 'Fuchsia Tests.Create CAS Archive.' - 'Download Fuchsia Dependencies.' - 'Read fuchsia cipd version', - api.file.read_text('FuchsiaSdkCipdVersion')) + api.step_data( - 'Fuchsia Tests.Create CAS Archive.' - 'Download Fuchsia Dependencies.' - 'cipd describe fuchsia/sdk/core/linux-amd64', - api.cipd.example_describe( - package_name="fuchsia/sdk/core/linux-amd64", - version="FuchsiaSdkCipdVersion", - test_data_tags=[ - "git_revision:GIT_REVISION", "jiri:JIRI_VERSION", - "version:FUCHSIA_VERSION" - ])))