First customization to avm99963-bugs
- Only a service is used (default) in order to keep usage within Google
Cloud's free tier.
- Settings have been adapted.
- Only a single DB instance is used (primary).
- Some cron jobs are executed less often.
- |threadsafe| has been set to "yes" so the single instance can serve
concurrent requests (otherwise the search/list issues function
breaks).
GitOrigin-RevId: 52130750a30a5aa2234a6dd3f5ae23c3fb1b8343
diff --git a/settings.py b/settings.py
index e5c5bd1..d1f9b61 100644
--- a/settings.py
+++ b/settings.py
@@ -3,7 +3,7 @@
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
-"""Defines settings for monorail."""
+"""Defines settings for the avm99963 bugs monorail instance."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
@@ -33,19 +33,19 @@
# Part 1: settings that you must edit before deploying your site.
# Email address that is offered to users who might need help using the tool.
-feedback_email = 'jrobbins+monorail.feedback@chromium.org'
+feedback_email = 'me+monorail.feedback@avm99963.com'
# For debugging when running in staging: send all outbound
# email to this address rather than to the actual address that
# it would normally be sent to.
-send_all_email_to = 'monorail-staging-emails+all+%(user)s+%(domain)s@google.com'
+send_all_email_to = 'monorail-staging-emails+all+%(user)s+%(domain)s@dontsend.avm99963.com'
# For debugging when running the server locally: send all outbound
# email to this address rather than to the actual address that
# it would normally be sent to.
send_local_email_to = (
send_all_email_to or
- 'monorail-staging-emails+dev+%(user)s+%(domain)s@google.com')
+ 'monorail-staging-emails+dev+%(user)s+%(domain)s@dontsend.avm99963.com')
# User to send emails from Monorail as. The reply_to sections of emails will be
# set to appspotmail addresses.
@@ -53,8 +53,13 @@
# email addresses then setting these values to
# 'reply@${app_id}.appspotmail.com' and 'noreply@{app_id}.appspotmail.com'
# is likely the best option.
-send_email_as_format = 'monorail@%(domain)s'
-send_noreply_email_as_format = 'monorail+noreply@%(domain)s'
+
+# Old values (TODO: set up DNS records and uncomment this):
+#send_email_as_format = 'monorail@%(domain)s'
+#send_noreply_email_as_format = 'monorail+noreply@%(domain)s'
+
+send_email_as_format = 'reply@avm99963-bugs.appspotmail.com'
+send_noreply_email_as_format = 'noreply@avm99963-bugs.appspotmail.com'
# The default is to look for a database named "monorail" in replicas
# named "replica-00" .. "replica-09"
@@ -63,20 +68,20 @@
db_database_name = 'monorail'
db_primary_name = 'primary'
db_replica_prefix = 'replica'
-db_region = 'us-central1'
+db_region = 'europe-west1'
# The default connection pool size for mysql connections.
db_cnxn_pool_size = 20
# The number of logical database shards used. Each replica is complete copy
# of the primary, so any replica DB can answer queries about any logical shard.
-num_logical_shards = 10
+num_logical_shards = 1
# "Learn more" link for the site home page
learn_more_link = None
# Site name, displayed above the search box on the site home page.
-site_name = 'Monorail'
+site_name = 'avm99963 bugs'
# Who is allowed to create new projects? Set to ANYONE or ADMIN_ONLY.
project_creation_restriction = site_pb2.UserTypeRestriction.ADMIN_ONLY
@@ -98,20 +103,15 @@
# Text that mentions these words as shorthand host names will be autolinked
# regardless of the lack of "https://" or ".com".
autolink_shorthand_hosts = [
- 'go', 'g', 'shortn', 'who', 'teams',
+ 'go',
]
-autolink_numeric_shorthand_hosts = [
- 'b', 't', 'o', 'omg', 'cl', 'cr',
- ]
+autolink_numeric_shorthand_hosts = []
# We only allow self-service account linking invites when the child account is
# linking to a parent account in an allowed domain.
linkable_domains = {
# Child account domain: [parent account domains]
- 'chromium.org': ['google.com'],
- 'google.com': ['chromium.org'],
- # TODO(jrobbins): webrtc.org, etc.
}
@@ -134,7 +134,7 @@
banned_user_domains = []
# We use this for specifying cloud task parent
-CLOUD_TASKS_REGION = 'us-central1'
+CLOUD_TASKS_REGION = 'europe-west1'
# We only send subscription notifications to users who have visited the
# site in the last 6 months.
@@ -267,44 +267,31 @@
# Users with emails in the "priviledged" domains do NOT get any advantage
# but they do default their preference to show unobscured email addresses.
priviledged_user_domains = [
- 'google.com', 'chromium.org', 'webrtc.org',
+ 'avm99963.com',
]
# Branded domains: Any UI GET to a project listed below on prod or staging
# should have the specified host, otherwise it will be redirected such that
# the specified host is used.
branded_domains = {} # defaults to empty for localhost
-branded_domains_dev = {
- 'fuchsia': 'bugs-dev.fuchsia.dev',
- '*': 'bugs-dev.chromium.org',
-}
-branded_domains_staging = {
- 'fuchsia': 'bugs-staging.fuchsia.dev',
- '*': 'bugs-staging.chromium.org',
-}
branded_domains_prod = {
- 'fuchsia': 'bugs.fuchsia.dev',
- '*': 'bugs.chromium.org',
+ '*': 'bugs.avm99963.com',
}
# The site home page will immediately redirect to a default project for these
# domains, if the project can be viewed. Structure is {hostport: project_name}.
domain_to_default_project = {} # defaults to empty for localhost
-domain_to_default_project_dev = {'bugs-dev.fuchsia.dev': 'fuchsia'}
-domain_to_default_project_staging = {'bugs-staging.fuchsia.dev': 'fuchsia'}
-domain_to_default_project_prod = {'bugs.fuchsia.dev': 'fuchsia'}
+domain_to_default_project_prod = {}
# Names of projects on code.google.com which we allow cross-linking to.
recognized_codesite_projects = [
- 'chromium-os',
- 'chrome-os-partner',
]
####
# Part 5: Instance-specific settings that override lines above.
# This ID is for -staging and other misc deployments. Prod is defined below.
-analytics_id = 'UA-55762617-20'
+analytics_id = ''
if unit_test_mode:
db_cloud_project = '' # No real database is used during unit testing.
@@ -312,13 +299,13 @@
else:
app_id = app_identity.get_application_id()
- if app_id == 'monorail-staging':
- site_name = 'Monorail Staging'
- banner_message = 'This staging site does not send emails.'
+ if app_id == 'avm99963-bugs':
+ send_all_email_to = None # Deliver it to the intended users.
# The Google Cloud SQL databases to use.
db_cloud_project = app_id
- branded_domains = branded_domains_staging
- domain_to_default_project = domain_to_default_project_staging
+ analytics_id = ''
+ branded_domains = branded_domains_prod
+ domain_to_default_project = domain_to_default_project_prod
# For each of these redis_hosts, they must match the corresponding
# HOST address of the redis instance for the environment. You can use
# the following command to find it.
@@ -326,29 +313,8 @@
# gcloud redis instances list --project monorail-staging \
# --region us-central1
# ````
- redis_host = '10.228.109.51'
-
- elif app_id == 'monorail-dev':
- site_name = 'Monorail Dev'
- banner_message = 'This dev site does not send emails.'
- # The Google Cloud SQL databases to use.
- db_cloud_project = app_id
- branded_domains = branded_domains_dev
- domain_to_default_project = domain_to_default_project_dev
- # See comment above on how to find this address.
- redis_host = '10.150.170.251'
- # Use replicas created when testing the restore procedures on 2021-02-24
- db_replica_prefix = 'replica-2'
-
- elif app_id == 'monorail-prod':
- send_all_email_to = None # Deliver it to the intended users.
- # The Google Cloud SQL databases to use.
- db_cloud_project = app_id
- analytics_id = 'UA-55762617-14'
- branded_domains = branded_domains_prod
- domain_to_default_project = domain_to_default_project_prod
- # See comment above on how to find this address.
- redis_host = '10.190.48.180'
+ # Leaving empty for now
+ redis_host = ''
if local_mode:
site_name = 'Monorail Local'
@@ -362,19 +328,17 @@
# Combine the customized info above to make the names of the replica DB
# instances.
-db_replica_names = ['{}-{:02d}'.format(db_replica_prefix, i) for i in range(10)]
+db_replica_names = [db_primary_name for i in range(num_logical_shards)]
# Format string for the name of the physical database replicas.
physical_db_name_format = (db_cloud_project + ':' + db_region + ':%s')
# preferred domains to display
preferred_domains = {
- 'monorail-prod.appspot.com': 'bugs.chromium.org',
- 'monorail-staging.appspot.com': 'bugs-staging.chromium.org',
- 'monorail-dev.appspot.com': 'bugs-dev.chromium.org'}
+ 'avm99963-bugs.appspot.com': 'bugs.avm99963.com'}
# Borg robot service account
-borg_service_account = 'chrome-infra-prod-borg@system.gserviceaccount.com'
+borg_service_account = 'chrome-infra-prod-borg-NOTUSEDBYAVM99963BUGS@system.gserviceaccount.com'
# Prediction API params.
classifier_project_id = 'project-id-testing-only'
@@ -413,49 +377,28 @@
'.gserviceaccount.com',
'@google.com',
'@webrtc.org',
+ '@avm99963.com',
)
# New issues filed by these users in these groups
# automatically get the Restrict-View-Google label.
-restrict_new_issues_user_groups = [
- 'chromeos-all@google.com',
- 'chromeos-acl@google.com',
- 'chromeos-fte-tvc@google.com',
- 'chromeos-fte-tvc@chromium.org',
- 'create-team@google.com',
- 'test-corp-mode@google.com',
-]
+restrict_new_issues_user_groups = []
# Users in these groups see a "corp mode" warning dialog when commenting
# on public issues, informing them that their comments are public by default.
-public_issue_notice_user_groups = [
- 'chromeos-all@google.com',
- 'chromeos-acl@google.com',
- 'chromeos-fte-tvc@google.com',
- 'chromeos-fte-tvc@chromium.org',
- 'create-team@google.com',
- 'test-corp-mode@google.com',
- 'tq-team@google.com',
-]
+public_issue_notice_user_groups = []
-full_emails_perm_groups = [
- # Synced group that gives members permission to view the full
- # emails of all users.
- 'monorail-display-names-perm@google.com',
- # Native Monorail group that gives service account members permission
- # to view full emails of all users.
- 'display-names-perm-sa@bugs.chromium.org'
-]
+full_emails_perm_groups = []
# These email suffixes are allowed to create new alert bugs via email.
-alert_allowlisted_suffixes = ('@google.com',)
+alert_allowlisted_suffixes = ('@avm99963.com',)
# The person who is notified if there is an unexpected problem in the alert
# pipeline.
-alert_escalation_email = 'zhangtiff@google.com'
+alert_escalation_email = 'me@avm99963.com'
# Bugs autogenerated from alert emails are created through this account.
-alert_service_account = 'chrome-trooper-alerts@google.com'
+alert_service_account = 'autogenerated-bug-from-alert-mails-monorail@noreply.avm99963.com'
# The number of hash buckets to use when vectorizing text from Issues and
# Comments. This should be the same value that the model was trained with.
@@ -496,12 +439,8 @@
chart_query_max_rows = 10000
# Client ID to use for loading the Google API client, gapi.js.
-if app_identity.get_application_id() == 'monorail-prod':
- gapi_client_id = (
- '679746765624-tqaakho939p2mc7eb65t4ecrj3gj08rt.apps.googleusercontent.com')
-else:
- gapi_client_id = (
- '52759169022-6918fl1hd1qoul985cs1ohgedeb8c9a0.apps.googleusercontent.com')
+# (This is not used by avm99963 bugs, this is only useful for buganizer bugs)
+gapi_client_id = ''
# The pub/sub topic on which to publish issue update messages.
if local_mode:
@@ -516,4 +455,4 @@
# All users in the following domains will have API access.
# Important: the @ symbol must be included.
-api_allowed_email_domains = ('@google.com')
+api_allowed_email_domains = ('@avm99963.com')