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

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

Issue 1999653003: [Findit] Bailing out if build data is too old and moving relevant settings to config (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments Created 4 years, 7 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 1916a6b30cea98974ed65a1aa507216b8c001cd2..392745dba029a06cc6512d48f5a22281e3614f70 100644
--- a/appengine/findit/handlers/config.py
+++ b/appengine/findit/handlers/config.py
@@ -166,12 +166,21 @@ def _ValidateSwarmingSettings(settings):
isinstance(settings.get('iterations_to_rerun'), int))
+def _ValidateDownloadBuildDataSettings(settings):
+ return (isinstance(settings, dict) and
+ isinstance(settings.get('download_interval_seconds'), int) and
+ isinstance(settings.get(
+ 'memcache_master_download_expiration_seconds'), int) and
+ isinstance(settings.get('use_chrome_build_extract'), bool))
+
+
# 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
+ 'swarming_settings': _ValidateSwarmingSettings,
+ 'download_build_data_settings': _ValidateDownloadBuildDataSettings
}
@@ -233,6 +242,7 @@ class Configuration(BaseHandler):
'builders': settings.builders_to_trybots,
'try_job_settings': settings.try_job_settings,
'swarming_settings': settings.swarming_settings,
+ 'download_build_data_settings': settings.download_build_data_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