From eac9c7c50ef86bd23e5f89f11863ae158e4b5cc5 Mon Sep 17 00:00:00 2001 From: Ekaterina Tyurina Date: Mon, 2 Sep 2019 17:43:19 +0100 Subject: [PATCH 1/3] Fix error when uploading stats to buildstats --- src/python/pants/goal/pantsd_stats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/pants/goal/pantsd_stats.py b/src/python/pants/goal/pantsd_stats.py index de3b83a6936..80ad70ea944 100644 --- a/src/python/pants/goal/pantsd_stats.py +++ b/src/python/pants/goal/pantsd_stats.py @@ -9,7 +9,7 @@ def __init__(self): self.scheduler_metrics = {} def set_scheduler_metrics(self, scheduler_metrics): - self.scheduler_metrics = scheduler_metrics + self.scheduler_metrics = {key: value for (key, value) in scheduler_metrics.items() if key != "engine_workunits"} def set_target_root_size(self, size): self.scheduler_metrics['target_root_size'] = size From cb6a5e7d3dfa1cb7d790422b7b9b36275d61b89a Mon Sep 17 00:00:00 2001 From: Ekaterina Tyurina Date: Tue, 3 Sep 2019 14:07:36 +0100 Subject: [PATCH 2/3] Update tests --- tests/python/pants_test/goal/test_run_tracker_integration.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/python/pants_test/goal/test_run_tracker_integration.py b/tests/python/pants_test/goal/test_run_tracker_integration.py index 69c6f14cfb7..9bec6255d3d 100644 --- a/tests/python/pants_test/goal/test_run_tracker_integration.py +++ b/tests/python/pants_test/goal/test_run_tracker_integration.py @@ -15,6 +15,7 @@ def test_stats_local_json_file_v1(self): 'test', '--run-tracker-stats-local-json-file={}'.format(tmpfile), '--run-tracker-stats-version=1', + '--reporting-zipkin-trace-v2', '--run-tracker-stats-option-scopes-to-record=["GLOBAL", "GLOBAL^v2_ui", "compile.rsc^capture_classpath"]', 'testprojects/src/java/org/pantsbuild/testproject/unicode/main', ]) @@ -31,6 +32,7 @@ def test_stats_local_json_file_v1(self): self.assertIn('pantsd_stats', stats_json) self.assertIn('recorded_options', stats_json) self.assertIn('GLOBAL', stats_json['recorded_options']) + self.assertNotIn('engine_workunits', stats_json['pantsd_stats']) self.assertIs(stats_json['recorded_options']['GLOBAL']['v2_ui'], False) self.assertEqual(stats_json['recorded_options']['GLOBAL']['level'], 'info') self.assertIs(stats_json['recorded_options']['GLOBAL^v2_ui'], False) @@ -42,6 +44,7 @@ def test_stats_local_json_file_v2(self): 'test', '--run-tracker-stats-local-json-file={}'.format(tmpfile), '--run-tracker-stats-version=2', + '--reporting-zipkin-trace-v2', 'testprojects/src/java/org/pantsbuild/testproject/unicode/main', ]) self.assert_success(pants_run) @@ -52,6 +55,7 @@ def test_stats_local_json_file_v2(self): self.assertIn('run_info', stats_json) self.assertIn('pantsd_stats', stats_json) self.assertIn('workunits', stats_json) + self.assertNotIn('engine_workunits', stats_json['pantsd_stats']) def test_workunit_failure(self): pants_run = self.run_pants([ From f891c57e9f86e15b6650f49b37af462a4526f95a Mon Sep 17 00:00:00 2001 From: Ekaterina Tyurina Date: Wed, 4 Sep 2019 11:27:03 +0100 Subject: [PATCH 3/3] Increase timeout for tests/python/pants_test/backend/native/subsystems:: --- tests/python/pants_test/backend/native/subsystems/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/python/pants_test/backend/native/subsystems/BUILD b/tests/python/pants_test/backend/native/subsystems/BUILD index d52cab4ee94..a640f3efec7 100644 --- a/tests/python/pants_test/backend/native/subsystems/BUILD +++ b/tests/python/pants_test/backend/native/subsystems/BUILD @@ -13,4 +13,5 @@ python_tests( 'tests/python/pants_test/subsystem:subsystem_utils', ], tags={'platform_specific_behavior'}, + timeout=120, )