From b4463cc9c1a1c8230df61958b4754e021fda44e2 Mon Sep 17 00:00:00 2001 From: Armen Zambrano Date: Tue, 14 Jan 2020 09:06:22 -0500 Subject: [PATCH] Changes to Heroku Review Apps (#5805) * For Heroku Review Apps define tasks defaulting to the Firefox CI Taskcluster instance The Pulse sources are configured differently on Heroku Review Apps because `PULSE_PUSH_SOURCES` and `PULSE_TASK_SOURCES` are defined as arrays rather than a string. This is because `app.json` is a Json file and we cannot specify an array by mixing single & double quotes. * Bump the Redis and JawsDB add-ons to handle load * Remove ingesting android-components as it causes noise * Default LOGGING_LEVEL to INFO as we can handle the extra logging --- app.json | 7 ++++--- .../etl/management/commands/pulse_listener_pushes.py | 2 +- treeherder/etl/management/commands/pulse_listener_tasks.py | 2 +- treeherder/etl/tasks/pulse_tasks.py | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app.json b/app.json index 2b837a65a..ac843b950 100644 --- a/app.json +++ b/app.json @@ -2,10 +2,10 @@ "addons": [ "scheduler", "cloudamqp:tiger", - "heroku-redis", + "heroku-redis:premium-0", "papertrail:choklad", { - "plan": "jawsdb:leopard", + "plan": "jawsdb:blacktip", "options": { "version": "5.7" } @@ -32,6 +32,7 @@ "HEROKU_APP_NAME": { "required": true }, + "LOGGING_LEVEL": "INFO", "PULSE_URL": "amqp://treeherder-shared-pulse-user:mozilla123@pulse.mozilla.org:5671/?ssl=true", "PULSE_RESULSETS_QUEUE_NAME": { "generator": "secret" @@ -40,7 +41,7 @@ "generator": "secret" }, "PROJECTS_TO_INGEST": { - "value": "autoland,android-components" + "value": "autoland" }, "TREEHERDER_DJANGO_SECRET_KEY": { "generator": "secret" diff --git a/treeherder/etl/management/commands/pulse_listener_pushes.py b/treeherder/etl/management/commands/pulse_listener_pushes.py index 2f05fb4c6..99307857b 100644 --- a/treeherder/etl/management/commands/pulse_listener_pushes.py +++ b/treeherder/etl/management/commands/pulse_listener_pushes.py @@ -23,7 +23,7 @@ class Command(BaseCommand): # [{pulse_url: .., hgmo: true, root_url: ..}, ..] push_sources = env.json( "PULSE_PUSH_SOURCES", - default=[{"root_url": "https://taskcluster.net", "github": True, "hgmo": True, "pulse_url": env("PULSE_URL")}]) + default=[{"root_url": "https://firefox-ci-tc.services.mozilla.com", "github": True, "hgmo": True, "pulse_url": env("PULSE_URL")}]) consumers = prepare_consumers( PushConsumer, diff --git a/treeherder/etl/management/commands/pulse_listener_tasks.py b/treeherder/etl/management/commands/pulse_listener_tasks.py index 63bca69e6..3ac59017f 100644 --- a/treeherder/etl/management/commands/pulse_listener_tasks.py +++ b/treeherder/etl/management/commands/pulse_listener_tasks.py @@ -22,7 +22,7 @@ class Command(BaseCommand): # root_url: ..}, ..] task_sources = env.json( "PULSE_TASK_SOURCES", - default=[{"root_url": "https://taskcluster.net", "pulse_url": env("PULSE_URL")}]) + default=[{"root_url": "https://firefox-ci-tc.services.mozilla.com", "pulse_url": env("PULSE_URL")}]) consumers = prepare_consumers( TaskConsumer, diff --git a/treeherder/etl/tasks/pulse_tasks.py b/treeherder/etl/tasks/pulse_tasks.py index 048f8ed29..e713e8866 100644 --- a/treeherder/etl/tasks/pulse_tasks.py +++ b/treeherder/etl/tasks/pulse_tasks.py @@ -15,7 +15,7 @@ from treeherder.workers.task import retryable_task @retryable_task(name='store-pulse-tasks', max_retries=10) -def store_pulse_tasks(pulse_job, exchange, routing_key, root_url='https://taskcluster.net'): +def store_pulse_tasks(pulse_job, exchange, routing_key, root_url='https://firefox-ci-tc.services.mozilla.com'): """ Fetches tasks from Taskcluster """ @@ -34,7 +34,7 @@ def store_pulse_tasks(pulse_job, exchange, routing_key, root_url='https://taskcl @retryable_task(name='store-pulse-pushes', max_retries=10) -def store_pulse_pushes(body, exchange, routing_key, root_url='https://taskcluster.net'): +def store_pulse_pushes(body, exchange, routing_key, root_url='https://firefox-ci-tc.services.mozilla.com'): """ Fetches the pushes pending from pulse exchanges and loads them. """