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

Unified Diff: appengine/findit/handlers/config.py

Issue 2104113002: [Findit] Add settings for actions after culprits or suspects are identified. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@group_same_failures
Patch Set: Address chan's comments. Created 4 years, 6 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 | « no previous file | appengine/findit/handlers/test/config_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/config.py
diff --git a/appengine/findit/handlers/config.py b/appengine/findit/handlers/config.py
index 392745dba029a06cc6512d48f5a22281e3614f70..c9e0e03129d37bc98ce835339d148ba8f6a73e34 100644
--- a/appengine/findit/handlers/config.py
+++ b/appengine/findit/handlers/config.py
@@ -174,13 +174,21 @@ def _ValidateDownloadBuildDataSettings(settings):
isinstance(settings.get('use_chrome_build_extract'), bool))
+def _ValidateActionSettings(settings):
+ return (isinstance(settings, dict) and
+ isinstance(settings.get('cr_notification_build_threshold'), int) and
+ isinstance(
+ settings.get('cr_notification_latency_limit_minutes'), int))
+
+
# Maps config properties to their validation functions.
_CONFIG_VALIDATION_FUNCTIONS = {
'steps_for_masters_rules': _ValidateMastersAndStepsRulesMapping,
'builders_to_trybots': _ValidateTrybotMapping,
'try_job_settings': _ValidateTryJobSettings,
'swarming_settings': _ValidateSwarmingSettings,
- 'download_build_data_settings': _ValidateDownloadBuildDataSettings
+ 'download_build_data_settings': _ValidateDownloadBuildDataSettings,
+ 'action_settings': _ValidateActionSettings,
}
@@ -243,6 +251,7 @@ class Configuration(BaseHandler):
'try_job_settings': settings.try_job_settings,
'swarming_settings': settings.swarming_settings,
'download_build_data_settings': settings.download_build_data_settings,
+ 'action_settings': settings.action_settings,
'version': settings.version,
'latest_version': latest_version,
'updated_by': settings.updated_by,
« no previous file with comments | « no previous file | appengine/findit/handlers/test/config_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698