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

Unified Diff: scripts/master/status_logger.py

Issue 1513183005: status_logger: only send step data for whitelisted recipes (chromium_trybot) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/status_logger.py
diff --git a/scripts/master/status_logger.py b/scripts/master/status_logger.py
index 98d51522000e25f4e987b38921af914243e179ab..48f7d0ea9f314b9be8015e42769418920f352ab0 100644
--- a/scripts/master/status_logger.py
+++ b/scripts/master/status_logger.py
@@ -494,14 +494,23 @@ class StatusEventLogger(StatusReceiverMultiService):
result=buildbot.status.results.Results[results],
extra_result_code=extra_result_code)
+ # It's important that the recipe does not generate unbounded number
+ # of step names (e.g. one for each git revision), to avoid stream
+ # explosion in the monitoring system. Another alternative is for the recipe
+ # to clearly mark such dynamic steps - e.g. add "(dynamic)" to the name,
+ # and exclude such steps here.
+ WHITELISTED_RECIPES = [
+ 'chromium_trybot',
+ ]
steps_to_send = []
- for step in build.getSteps():
- step_started, step_finished = step.getTimes()
- steps_to_send.append({
- 'step_name': step.getName(),
- 'duration_s': step_finished - step_started,
- 'result': buildbot.status.results.Results[step.getResults()[0]],
- })
+ if properties.getProperty('recipe') in WHITELISTED_RECIPES:
+ for step in build.getSteps():
+ step_started, step_finished = step.getTimes()
+ steps_to_send.append({
+ 'step_name': step.getName(),
+ 'duration_s': step_finished - step_started,
+ 'result': buildbot.status.results.Results[step.getResults()[0]],
+ })
# If property doesn't exist, this function returns None.
# Note: this is not true for build.getProperty(), it raises KeyError.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698