Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Unified Diff: infra_libs/event_mon/monitoring.py

Issue 1815413002: Add support for patch_url field in BuildEvent (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Added test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/tools/send_monitoring_event/send_event.py ('k') | infra_libs/event_mon/test/monitoring_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra_libs/event_mon/monitoring.py
diff --git a/infra_libs/event_mon/monitoring.py b/infra_libs/event_mon/monitoring.py
index 87365e6706ebe24f8739f700e115b1aeaa7056a5..2965c86c3de2d263207a8b900e6818b315d101a7 100644
--- a/infra_libs/event_mon/monitoring.py
+++ b/infra_libs/event_mon/monitoring.py
@@ -269,7 +269,8 @@ def get_build_event(event_type,
service_name=None,
goma_stats=None,
goma_error=None,
- goma_crash_report_id=None):
+ goma_crash_report_id=None,
+ patch_url=None):
"""Compute a ChromeInfraEvent filled with a BuildEvent.
Arguments are identical to those in send_build_event(), please refer
@@ -331,6 +332,8 @@ def get_build_event(event_type,
event.build_event.step_name = step_name
if step_number is not None:
event.build_event.step_number = step_number
+ if patch_url is not None:
+ event.build_event.patch_url = patch_url
if event.build_event.step_name:
if event_type != 'STEP':
@@ -423,7 +426,8 @@ def send_build_event(event_type,
event_timestamp=None,
goma_stats=None,
goma_error=None,
- goma_crash_report_id=None):
+ goma_crash_report_id=None,
+ patch_url=None):
"""Send a ChromeInfraEvent filled with a BuildEvent
Args:
@@ -449,6 +453,7 @@ def send_build_event(event_type,
goma_stats (goma_stats_pb2.GomaStats): statistics output by the Goma proxy.
goma_error (string): goma error type defined as GomaErrorType.
goma_crash_report_id (string): id of goma crash report.
+ patch_url (string): URL of the patch that triggered build
Returns:
success (bool): False if some error happened.
@@ -466,7 +471,8 @@ def send_build_event(event_type,
event_timestamp=event_timestamp,
goma_stats=goma_stats,
goma_error=goma_error,
- goma_crash_report_id=goma_crash_report_id).send()
+ goma_crash_report_id=goma_crash_report_id,
+ patch_url=patch_url).send()
def send_events(events):
« no previous file with comments | « infra/tools/send_monitoring_event/send_event.py ('k') | infra_libs/event_mon/test/monitoring_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698