Bug 1634603 - [tryselect] Fix 'mach try coverage'; r=marco
authorGeoff Brown <gbrown@mozilla.com>
Thu, 28 May 2020 18:50:49 +0000
changeset 532895 612019ea551bce0423b7be98eb388bf0f7a3f2e6
parent 532894 ae53dbf57eeb3ec228dc297ce91d02d8235e0b57
child 532896 bfb3aee94a88794cfd51b5a80bf162357b2606cf
push id37460
push userbtara@mozilla.com
push dateFri, 29 May 2020 15:59:09 +0000
treeherdermozilla-central@60a406d3b53a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarco
bugs1634603
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1634603 - [tryselect] Fix 'mach try coverage'; r=marco Use up-to-date URL for code-coverage information and fix miscellaneous bit-rot. Differential Revision: https://phabricator.services.mozilla.com/D77270
tools/tryselect/selectors/coverage.py
--- a/tools/tryselect/selectors/coverage.py
+++ b/tools/tryselect/selectors/coverage.py
@@ -117,17 +117,17 @@ def download_coverage_mapping(base_revis
             tags = json.load(f)
             if tags['target_revision'] == base_revision:
                 return
             else:
                 print('Base revision changed.')
     except (IOError, ValueError):
         print('Chunk mapping file not found.')
 
-    CHUNK_MAPPING_URL_TEMPLATE = 'https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.releng.services.project.production.code_coverage_bot.{}/artifacts/public/chunk_mapping.tar.xz'  # noqa
+    CHUNK_MAPPING_URL_TEMPLATE = 'https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.relman.code-coverage.production.cron.{}/artifacts/public/chunk_mapping.tar.xz'  # noqa
     JSON_PUSHES_URL_TEMPLATE = 'https://hg.mozilla.org/mozilla-central/json-pushes?version=2&tipsonly=1&startdate={}'  # noqa
 
     # Get pushes from at most one month ago.
     PUSH_HISTORY_DAYS = 30
     delta = datetime.timedelta(days=PUSH_HISTORY_DAYS)
     start_time = (datetime.datetime.now() - delta).strftime('%Y-%m-%d')
     pushes_url = JSON_PUSHES_URL_TEMPLATE.format(start_time)
     pushes_data = requests.get(pushes_url + '&tochange={}'.format(base_revision)).json()
@@ -359,17 +359,18 @@ def run(try_config={}, full=False, param
         print('ERROR Could not find any tests or chunks to run.')
         return 1
 
     tg = generate_tasks(parameters, full)
     all_tasks = tg.tasks.keys()
 
     tasks_by_chunks = filter_tasks_by_chunks(all_tasks, test_chunks)
     tasks_by_path = filter_tasks_by_paths(all_tasks, test_files)
-    tasks = filter(is_opt_task, set(tasks_by_path + tasks_by_chunks))
+    tasks = filter(is_opt_task, set(tasks_by_path) | set(tasks_by_chunks))
+    tasks = list(tasks)
 
     if not tasks:
         print('ERROR Did not find any matching tasks after filtering.')
         return 1
     test_count_message = ('{test_count} test file{test_plural} that ' +
                           'cover{test_singular} these changes ' +
                           '({task_count} task{task_plural} to be scheduled)').format(
         test_count=len(test_files),