Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style |
| 3 | # license that can be found in the LICENSE file or at |
| 4 | # https://developers.google.com/open-source/licenses/bsd |
| 5 | |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 6 | """Defines settings for the avm99963 bugs monorail instance.""" |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 7 | from __future__ import print_function |
| 8 | from __future__ import division |
| 9 | from __future__ import absolute_import |
| 10 | |
| 11 | import os |
| 12 | import re |
| 13 | |
| 14 | from google.appengine.api import app_identity |
| 15 | |
| 16 | from framework import framework_constants |
| 17 | from proto import project_pb2 |
| 18 | from proto import site_pb2 |
| 19 | |
| 20 | |
| 21 | # This file is divided into the following parts: |
| 22 | # 1. Settings you must edit before deploying your site. |
| 23 | # 2. Settings you would edit on certain occasions while maintaining your site. |
| 24 | # 3. Settings enable specific features. |
| 25 | # 4. Settings that you can usually leave as-is. |
| 26 | |
| 27 | # TODO(jrobbins): Store these settings in the database and implement |
| 28 | # servlets for domain admins to edit them without needing to redeploy the |
| 29 | # app. |
| 30 | |
| 31 | |
| 32 | #### |
| 33 | # Part 1: settings that you must edit before deploying your site. |
| 34 | |
| 35 | # Email address that is offered to users who might need help using the tool. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 36 | feedback_email = 'me+monorail.feedback@avm99963.com' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 37 | |
| 38 | # For debugging when running in staging: send all outbound |
| 39 | # email to this address rather than to the actual address that |
| 40 | # it would normally be sent to. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 41 | send_all_email_to = 'monorail-staging-emails+all+%(user)s+%(domain)s@dontsend.avm99963.com' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 42 | |
| 43 | # For debugging when running the server locally: send all outbound |
| 44 | # email to this address rather than to the actual address that |
| 45 | # it would normally be sent to. |
| 46 | send_local_email_to = ( |
| 47 | send_all_email_to or |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 48 | 'monorail-staging-emails+dev+%(user)s+%(domain)s@dontsend.avm99963.com') |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 49 | |
| 50 | # User to send emails from Monorail as. The reply_to sections of emails will be |
| 51 | # set to appspotmail addresses. |
| 52 | # Note: If configuring a new monorail instance without DNS records and reserved |
| 53 | # email addresses then setting these values to |
| 54 | # 'reply@${app_id}.appspotmail.com' and 'noreply@{app_id}.appspotmail.com' |
| 55 | # is likely the best option. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 56 | |
| 57 | # Old values (TODO: set up DNS records and uncomment this): |
| 58 | #send_email_as_format = 'monorail@%(domain)s' |
| 59 | #send_noreply_email_as_format = 'monorail+noreply@%(domain)s' |
| 60 | |
| 61 | send_email_as_format = 'reply@avm99963-bugs.appspotmail.com' |
| 62 | send_noreply_email_as_format = 'noreply@avm99963-bugs.appspotmail.com' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 63 | |
| 64 | # The default is to look for a database named "monorail" in replicas |
| 65 | # named "replica-00" .. "replica-09" |
| 66 | # Replica names for -prod, -staging, and -dev may diverge if replicas ever fail. |
| 67 | # In such cases the db_replica_names list can be overwritten in Part 5. |
| 68 | db_database_name = 'monorail' |
| 69 | db_primary_name = 'primary' |
| 70 | db_replica_prefix = 'replica' |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 71 | db_region = 'europe-west1' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 72 | |
| 73 | # The default connection pool size for mysql connections. |
| 74 | db_cnxn_pool_size = 20 |
| 75 | |
| 76 | # The number of logical database shards used. Each replica is complete copy |
| 77 | # of the primary, so any replica DB can answer queries about any logical shard. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 78 | num_logical_shards = 1 |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 79 | |
| 80 | # "Learn more" link for the site home page |
| 81 | learn_more_link = None |
| 82 | |
| 83 | # Site name, displayed above the search box on the site home page. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 84 | site_name = 'avm99963 bugs' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 85 | |
| 86 | # Who is allowed to create new projects? Set to ANYONE or ADMIN_ONLY. |
| 87 | project_creation_restriction = site_pb2.UserTypeRestriction.ADMIN_ONLY |
| 88 | |
| 89 | # Default access level when creating a new project. |
| 90 | default_access_level = project_pb2.ProjectAccess.ANYONE |
| 91 | |
| 92 | # Possible access levels to offer when creating a new project. |
| 93 | allowed_access_levels = [ |
| 94 | project_pb2.ProjectAccess.ANYONE, |
| 95 | project_pb2.ProjectAccess.MEMBERS_ONLY] |
| 96 | |
| 97 | # Who is allowed to create user groups? Set to ANYONE or ADMIN_ONLY. |
| 98 | group_creation_restriction = site_pb2.UserTypeRestriction.ADMIN_ONLY |
| 99 | |
| 100 | # Who is allowed to create hotlists? Set to ANYONE or ADMIN_ONLY. |
| 101 | hotlist_creation_restriction = site_pb2.UserTypeRestriction.ANYONE |
| 102 | |
| 103 | # Text that mentions these words as shorthand host names will be autolinked |
| 104 | # regardless of the lack of "https://" or ".com". |
| 105 | autolink_shorthand_hosts = [ |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 106 | 'go', |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 107 | ] |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 108 | autolink_numeric_shorthand_hosts = [] |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 109 | |
| 110 | |
| 111 | # We only allow self-service account linking invites when the child account is |
| 112 | # linking to a parent account in an allowed domain. |
| 113 | linkable_domains = { |
| 114 | # Child account domain: [parent account domains] |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | |
| 118 | #### |
| 119 | # Part 2: Settings you would edit on certain occasions. |
| 120 | |
| 121 | # Read-only mode prevents changes while we make server-side changes. |
| 122 | read_only = False |
| 123 | |
| 124 | # Timestamp used to notify users when the read only mode or other status |
| 125 | # described in the banner message takes effect. It is |
| 126 | # expressed as a tuple of ints: (year, month, day[, hour[, minute[, second]]]) |
| 127 | # e.g. (2009, 3, 20, 21, 45) represents March 20 2009 9:45PM UTC. |
| 128 | banner_time = None |
| 129 | |
| 130 | # Display a site maintenance banner on every monorail page. |
| 131 | banner_message = '' |
| 132 | |
| 133 | # User accounts with email addresses at these domains are all banned. |
| 134 | banned_user_domains = [] |
| 135 | |
| 136 | # We use this for specifying cloud task parent |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 137 | CLOUD_TASKS_REGION = 'europe-west1' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 138 | |
| 139 | # We only send subscription notifications to users who have visited the |
| 140 | # site in the last 6 months. |
| 141 | subscription_timeout_secs = 180 * framework_constants.SECS_PER_DAY |
| 142 | |
| 143 | # Location of GCS spam classification staging trainer. Whenever the training |
| 144 | # code is changed, this should be updated to point to the new package. |
| 145 | trainer_staging = ('gs://monorail-staging-mlengine/spam_trainer_1517870972/' |
| 146 | 'packages/befc9b29d9beb7e89d509bd1e9866183c138e3a32317cc' |
| 147 | 'e253342ac9f8e7c375/trainer-0.1.tar.gz') |
| 148 | |
| 149 | # Location of GCS spam classification prod trainer. Whenever the training |
| 150 | # code is changed, this should be updated to point to the new package. |
| 151 | trainer_prod = ('gs://monorail-prod-mlengine/spam_trainer_1521755738/packages/' |
| 152 | '3339dfcb5d7b6c9d714fb9b332fd72d05823e9a1850ceaf16533a6124bcad' |
| 153 | '6fd/trainer-0.1.tar.gz') |
| 154 | #### |
| 155 | # Part 3: Settings that enable specific features |
| 156 | |
| 157 | # Enables "My projects" drop down menu |
| 158 | enable_my_projects_menu = True |
| 159 | |
| 160 | # Enables stars in the UI for projects |
| 161 | enable_project_stars = True |
| 162 | |
| 163 | # Enables stars in the UI for users |
| 164 | enable_user_stars = True |
| 165 | |
| 166 | # Enable quick edit mode in issue peek dialog and show dialog on hover |
| 167 | enable_quick_edit = True |
| 168 | |
| 169 | |
| 170 | #### |
| 171 | # Part 4: Settings that you can usually leave as-is. |
| 172 | |
| 173 | # local_mode makes the server slower and more dynamic for easier debugging. |
| 174 | # E.g., template files are reloaded on each request. |
| 175 | local_mode = os.environ['SERVER_SOFTWARE'].startswith('Development') |
| 176 | unit_test_mode = os.environ['SERVER_SOFTWARE'].startswith('test') |
| 177 | |
| 178 | # If we assume 1KB each, then this would be 400 MB for this cache in frontends |
| 179 | # that have only 1024 MB total. |
| 180 | issue_cache_max_size = 400 * 1000 |
| 181 | |
| 182 | # If we assume 1KB each, then this would be 400 MB for this cache in frontends |
| 183 | # that have only 1024 MB total. |
| 184 | comment_cache_max_size = 400 * 1000 |
| 185 | |
| 186 | # 150K users should be enough for all the frequent daily users plus the |
| 187 | # occasional users that are mentioned on any popular pages. |
| 188 | user_cache_max_size = 150 * 1000 |
| 189 | |
| 190 | # Normally we use the default namespace, but during development it is |
| 191 | # sometimes useful to run a tainted version on staging that has a separate |
| 192 | # memcache namespace. E.g., os.environ.get('CURRENT_VERSION_ID') |
| 193 | memcache_namespace = None # Should be None when committed. |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 194 | |
| 195 | # Recompute derived issue fields via work items rather than while |
| 196 | # the user is waiting for a page to load. |
| 197 | recompute_derived_fields_in_worker = True |
| 198 | |
| 199 | # The issue search SQL queries have a LIMIT clause with this amount. |
| 200 | search_limit_per_shard = 10 * 1000 # This is more than all open in chromium. |
| 201 | |
| 202 | # The GAE search feature is slow, so don't request too many results. |
| 203 | # This limit is approximately the most results that we can get from |
| 204 | # the fulltext engine in 1s. If we reach this limit in any shard, |
| 205 | # the user will see a message explaining that results were capped. |
| 206 | fulltext_limit_per_shard = 1 * 2000 |
| 207 | |
| 208 | # Retrieve at most this many issues from the DB when showing an issue grid. |
| 209 | max_issues_in_grid = 6000 |
| 210 | # This is the most tiles that we show in grid view. If the number of results |
| 211 | # is larger than this, we display IDs instead. |
| 212 | max_tiles_in_grid = 1000 |
| 213 | |
| 214 | # Maximum number of project results to display on a single pagination page |
| 215 | max_project_search_results_per_page = 100 |
| 216 | |
| 217 | # Maximum number of results per pagination page, regardless of what |
| 218 | # the user specified in their request. This exists to prevent someone |
| 219 | # from doing a DoS attack that makes our servers do a huge amount of work. |
| 220 | max_artifact_search_results_per_page = 1000 |
| 221 | |
| 222 | # Maximum number of comments to display on a single pagination page |
| 223 | max_comments_per_page = 500 |
| 224 | |
| 225 | # Max number of issue starrers to notify via email. Issues with more |
| 226 | # that this many starrers will only notify the last N of them after a |
| 227 | # comment from a project member. |
| 228 | max_starrers_to_notify = 4000 |
| 229 | |
| 230 | # In projects that have more than this many issues the next and prev |
| 231 | # links on the issue detail page will not be shown when the user comes |
| 232 | # directly to an issue without specifying any query terms. |
| 233 | threshold_to_suppress_prev_next = 10000 |
| 234 | |
| 235 | # Format string for the name of the FTS index shards for issues. |
| 236 | search_index_name_format = 'issues%02d' |
| 237 | |
| 238 | # Name of the FTS index for projects (not sharded). |
| 239 | project_search_index_name = 'projects' |
| 240 | |
| 241 | # Each backend has this many seconds to respond, otherwise frontend gives up |
| 242 | # on that shard. |
| 243 | backend_deadline = 45 |
| 244 | |
| 245 | # If the initial call to a backend fails, try again this many times. |
| 246 | # Initial backend calls are failfast, meaning that they fail immediately rather |
| 247 | # than queue behind other requests. The last 2 retries will wait in queue. |
| 248 | backend_retries = 3 |
| 249 | |
| 250 | # Do various extra logging at INFO level. |
| 251 | enable_profiler_logging = True |
| 252 | |
| 253 | # Mail sending domain. Normally set this to None and it will be computed |
| 254 | # automatically from your AppEngine APP_ID. But, it can be overridden below. |
| 255 | mail_domain = None |
| 256 | |
| 257 | # URL format to browse source code revisions. This can be overridden |
| 258 | # in specific projects by setting project.revision_url_format. |
| 259 | # The format string may include "{revnum}" for the revision number. |
| 260 | revision_url_format = 'https://crrev.com/{revnum}' |
| 261 | |
| 262 | # Users with emails in the "priviledged" domains do NOT get any advantage |
| 263 | # but they do default their preference to show unobscured email addresses. |
| 264 | priviledged_user_domains = [ |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 265 | 'avm99963.com', |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 266 | ] |
| 267 | |
| 268 | # Branded domains: Any UI GET to a project listed below on prod or staging |
| 269 | # should have the specified host, otherwise it will be redirected such that |
| 270 | # the specified host is used. |
| 271 | branded_domains = {} # defaults to empty for localhost |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 272 | branded_domains_prod = { |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 273 | '*': 'bugs.avm99963.com', |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 274 | } |
| 275 | |
| 276 | # The site home page will immediately redirect to a default project for these |
| 277 | # domains, if the project can be viewed. Structure is {hostport: project_name}. |
| 278 | domain_to_default_project = {} # defaults to empty for localhost |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 279 | domain_to_default_project_prod = {} |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 280 | |
| 281 | |
| 282 | # Names of projects on code.google.com which we allow cross-linking to. |
| 283 | recognized_codesite_projects = [ |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 284 | ] |
| 285 | |
| 286 | #### |
| 287 | # Part 5: Instance-specific settings that override lines above. |
| 288 | # This ID is for -staging and other misc deployments. Prod is defined below. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 289 | analytics_id = '' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 290 | |
| 291 | if unit_test_mode: |
| 292 | db_cloud_project = '' # No real database is used during unit testing. |
| 293 | app_id = '' |
| 294 | else: |
| 295 | app_id = app_identity.get_application_id() |
| 296 | |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 297 | if app_id == 'avm99963-bugs': |
| 298 | send_all_email_to = None # Deliver it to the intended users. |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 299 | # The Google Cloud SQL databases to use. |
| 300 | db_cloud_project = app_id |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 301 | analytics_id = '' |
| 302 | branded_domains = branded_domains_prod |
| 303 | domain_to_default_project = domain_to_default_project_prod |
Adrià Vilanova Martínez | de94280 | 2022-07-15 14:06:55 +0200 | [diff] [blame^] | 304 | |
Adrià Vilanova Martínez | cab9d51 | 2021-07-10 01:50:12 +0200 | [diff] [blame] | 305 | elif app_id == 'monorail-staging': |
| 306 | site_name = 'Monorail Staging' |
| 307 | banner_message = 'This staging site does not send emails.' |
| 308 | # The Google Cloud SQL databases to use. |
| 309 | db_cloud_project = app_id |
Adrià Vilanova Martínez | de94280 | 2022-07-15 14:06:55 +0200 | [diff] [blame^] | 310 | branded_domains = branded_domains_staging |
| 311 | domain_to_default_project = domain_to_default_project_staging |
Adrià Vilanova Martínez | cab9d51 | 2021-07-10 01:50:12 +0200 | [diff] [blame] | 312 | |
| 313 | elif app_id == 'monorail-dev': |
| 314 | site_name = 'Monorail Dev' |
| 315 | banner_message = 'This dev site does not send emails.' |
| 316 | # The Google Cloud SQL databases to use. |
| 317 | db_cloud_project = app_id |
| 318 | branded_domains = branded_domains |
| 319 | domain_to_default_project = domain_to_default_project |
Adrià Vilanova Martínez | cab9d51 | 2021-07-10 01:50:12 +0200 | [diff] [blame] | 320 | # Use replicas created when testing the restore procedures on 2021-02-24 |
| 321 | db_replica_prefix = 'replica-2' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 322 | |
| 323 | if local_mode: |
| 324 | site_name = 'Monorail Local' |
| 325 | num_logical_shards = 10 |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 326 | # Run cloud tasks emulator at port 9090 |
| 327 | CLOUD_TASKS_EMULATOR_ADDRESS = '127.0.0.1:9090' |
Adrià Vilanova Martínez | cab9d51 | 2021-07-10 01:50:12 +0200 | [diff] [blame] | 328 | CLOUD_TASKS_REGION = 'us-central1' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 329 | |
| 330 | # Combine the customized info above to make the name of the primary DB instance. |
| 331 | db_instance = db_cloud_project + ':' + db_region + ':' + db_primary_name |
| 332 | |
| 333 | # Combine the customized info above to make the names of the replica DB |
| 334 | # instances. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 335 | db_replica_names = [db_primary_name for i in range(num_logical_shards)] |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 336 | |
| 337 | # Format string for the name of the physical database replicas. |
| 338 | physical_db_name_format = (db_cloud_project + ':' + db_region + ':%s') |
| 339 | |
| 340 | # preferred domains to display |
| 341 | preferred_domains = { |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 342 | 'avm99963-bugs.appspot.com': 'bugs.avm99963.com'} |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 343 | |
| 344 | # Borg robot service account |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 345 | borg_service_account = 'chrome-infra-prod-borg-NOTUSEDBYAVM99963BUGS@system.gserviceaccount.com' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 346 | |
| 347 | # Prediction API params. |
| 348 | classifier_project_id = 'project-id-testing-only' |
| 349 | |
| 350 | # Necessary for tests. |
| 351 | if 'APPLICATION_ID' not in os.environ: |
| 352 | os.environ['APPLICATION_ID'] = 'testing-app' |
| 353 | |
| 354 | if local_mode: |
| 355 | # There is no local stub for ML Engine. |
| 356 | classifier_project_id = 'monorail-staging' |
| 357 | else: |
| 358 | classifier_project_id = app_identity.get_application_id() |
| 359 | |
| 360 | classifier_model_id = '20170302' |
| 361 | |
| 362 | # Number of distinct users who have to flag an issue before it |
| 363 | # is automatically removed as spam. |
| 364 | # Currently effectively disabled. |
| 365 | spam_flag_thresh = 1000 |
| 366 | |
| 367 | # If the classifier's confidence is less than this value, the |
| 368 | # item will show up in the spam moderation queue for manual |
| 369 | # review. |
| 370 | classifier_moderation_thresh = 1.0 |
| 371 | |
| 372 | # If the classifier's confidence is greater than this value, |
| 373 | # and the label is 'spam', the item will automatically be created |
| 374 | # with is_spam=True, and will be filtered out from search results. |
| 375 | classifier_spam_thresh = 0.995 |
| 376 | |
| 377 | # Users with email addresses ending with these will not be subject to |
| 378 | # spam filtering. |
| 379 | spam_allowlisted_suffixes = ( |
| 380 | '@chromium.org', |
| 381 | '.gserviceaccount.com', |
| 382 | '@google.com', |
| 383 | '@webrtc.org', |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 384 | '@avm99963.com', |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 385 | ) |
| 386 | |
| 387 | # New issues filed by these users in these groups |
| 388 | # automatically get the Restrict-View-Google label. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 389 | restrict_new_issues_user_groups = [] |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 390 | |
| 391 | # Users in these groups see a "corp mode" warning dialog when commenting |
| 392 | # on public issues, informing them that their comments are public by default. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 393 | public_issue_notice_user_groups = [] |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 394 | |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 395 | full_emails_perm_groups = [] |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 396 | |
| 397 | # These email suffixes are allowed to create new alert bugs via email. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 398 | alert_allowlisted_suffixes = ('@avm99963.com',) |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 399 | |
| 400 | # The person who is notified if there is an unexpected problem in the alert |
| 401 | # pipeline. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 402 | alert_escalation_email = 'me@avm99963.com' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 403 | |
| 404 | # Bugs autogenerated from alert emails are created through this account. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 405 | alert_service_account = 'autogenerated-bug-from-alert-mails-monorail@noreply.avm99963.com' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 406 | |
| 407 | # The number of hash buckets to use when vectorizing text from Issues and |
| 408 | # Comments. This should be the same value that the model was trained with. |
| 409 | spam_feature_hashes = 500 |
| 410 | |
| 411 | # The number of features to use when vectorizing text from Issues and |
| 412 | # Comments. This should be the same value that the model was trained with. |
| 413 | component_features = 5000 |
| 414 | |
| 415 | # The name of the spam model in ML Engine. |
| 416 | spam_model_name = 'spam_only_words' |
| 417 | |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 418 | ratelimiting_enabled = True |
| 419 | |
| 420 | # Requests that hit ratelimiting_cost_thresh_sec get one extra count |
| 421 | # added to their bucket at the end of the request for each additional |
| 422 | # multiple of this latency. |
| 423 | ratelimiting_ms_per_count = 1000 |
| 424 | |
| 425 | api_ratelimiting_enabled = True |
| 426 | |
| 427 | # When we post an auto-ping comment, it is posted by this user @ the preferred |
| 428 | # domain name. E.g., 'monorail@bugs.chromium.org'. |
| 429 | date_action_ping_author = 'monorail' |
| 430 | |
| 431 | # Hard-coding this so that we don't rely on sys.maxint, which could |
| 432 | # potentially differ. It is equal to the maximum unsigned 32 bit integer, |
| 433 | # because the `int(10) unsigned` column type in MySQL is 32 bits. |
| 434 | maximum_snapshot_period_end = 4294967295 |
| 435 | |
| 436 | # The maximum number of rows chart queries can scan. |
| 437 | chart_query_max_rows = 10000 |
| 438 | |
| 439 | # Client ID to use for loading the Google API client, gapi.js. |
Adrià Vilanova Martínez | 515639b | 2021-07-06 16:43:59 +0200 | [diff] [blame] | 440 | # (This is not used by avm99963 bugs, this is only useful for buganizer bugs) |
| 441 | gapi_client_id = '' |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 442 | |
| 443 | # The pub/sub topic on which to publish issue update messages. |
| 444 | if local_mode: |
| 445 | # In local dev, send issue updates to the monorail-dev project. |
| 446 | # There also exists a pubsub emulator we could potentially use in the future: |
| 447 | # https://cloud.google.com/pubsub/docs/emulator |
| 448 | pubsub_project = 'monorail-dev' |
| 449 | else: |
| 450 | pubsub_project = app_identity.get_application_id() |
| 451 | |
| 452 | pubsub_topic_id = 'projects/%s/topics/issue-updates' % pubsub_project |
| 453 | |
| 454 | # All users in the following domains will have API access. |
| 455 | # Important: the @ symbol must be included. |
Adrià Vilanova Martínez | 96deb38 | 2021-08-08 00:13:47 +0200 | [diff] [blame] | 456 | api_allowed_email_domains = ('@avm99963.com', '@avm99963-bugs.iam.gserviceaccount.com') |