From 9d1a19be7f87fb6e292391966357380a0d8fbddf Mon Sep 17 00:00:00 2001 From: Ben Thorner Date: Tue, 19 Jan 2021 17:40:44 +0000 Subject: [PATCH] Remove unpublishing queue for Email Alert Service This is after deploying the previous change [1] to actually remove the resource, which were marked as absent. The original commits are quite scattered [2][3][4], but this seems to cover everything. [1]: https://github.com/alphagov/govuk-puppet/pull/10926 [2]: https://github.com/alphagov/govuk-puppet/commit/c0eace2e459a099fc116f8a5369979f5b8e7efa7 [3]: https://github.com/alphagov/govuk-puppet/commit/31a0a14fa95d6fa4d7bca59c4c059b1dd805b5a2 [4]: https://github.com/alphagov/govuk-puppet/commit/3d119d219ea29966cc475398262ffafa0c5c07d0 --- Rakefile | 1 - hieradata_aws/common.yaml | 1 - .../manifests/apps/email_alert_service.pp | 7 ------ .../apps/email_alert_service/rabbitmq.pp | 23 +++---------------- 4 files changed, 3 insertions(+), 29 deletions(-) diff --git a/Rakefile b/Rakefile index 26d064fc7f..792d05565a 100644 --- a/Rakefile +++ b/Rakefile @@ -208,7 +208,6 @@ task :check_consistency_between_aws_and_carrenza do govuk::apps::email_alert_api::unicorn_worker_processes govuk::apps::email_alert_frontend::redis_host govuk::apps::email_alert_frontend::redis_port - govuk::apps::email_alert_service::enable_unpublishing_queue_consumer govuk::apps::email_alert_service::enabled govuk::apps::email_alert_service::rabbitmq::queue_size_critical_threshold govuk::apps::email_alert_service::rabbitmq::queue_size_warning_threshold diff --git a/hieradata_aws/common.yaml b/hieradata_aws/common.yaml index 6cc90b8946..fcd543a5ec 100644 --- a/hieradata_aws/common.yaml +++ b/hieradata_aws/common.yaml @@ -542,7 +542,6 @@ govuk::apps::email_alert_frontend::redis_host: "%{hiera('sidekiq_host')}" govuk::apps::email_alert_frontend::redis_port: "%{hiera('sidekiq_port')}" govuk::apps::email_alert_service::enabled: true -govuk::apps::email_alert_service::enable_unpublishing_queue_consumer: true govuk::apps::email_alert_service::rabbitmq_hosts: - rabbitmq govuk::apps::email_alert_service::redis_host: "%{hiera('sidekiq_host')}" diff --git a/modules/govuk/manifests/apps/email_alert_service.pp b/modules/govuk/manifests/apps/email_alert_service.pp index ec6df7dcc4..d8daa680c0 100644 --- a/modules/govuk/manifests/apps/email_alert_service.pp +++ b/modules/govuk/manifests/apps/email_alert_service.pp @@ -53,13 +53,6 @@ command => 'bundle exec rake message_queues:major_change_consumer', } - govuk::procfile::worker { 'email-alert-service-unpublishing-queue-consumer': - ensure => absent, - setenv_as => $app_name, - process_type => 'unpublishing-queue-consumer', - process_regex => '\/rake message_queues:unpublishing_consumer', - } - Govuk::App::Envvar { ensure => $ensure, app => 'email-alert-service', diff --git a/modules/govuk/manifests/apps/email_alert_service/rabbitmq.pp b/modules/govuk/manifests/apps/email_alert_service/rabbitmq.pp index 29dc9fc28d..7ee59a9d5e 100644 --- a/modules/govuk/manifests/apps/email_alert_service/rabbitmq.pp +++ b/modules/govuk/manifests/apps/email_alert_service/rabbitmq.pp @@ -38,7 +38,6 @@ $amqp_pass = 'email_alert_service', $amqp_exchange = 'published_documents', $amqp_major_change_queue = 'email_alert_service', - $amqp_unpublishing_queue = 'email_unpublishing', $queue_size_critical_threshold, $queue_size_warning_threshold, ) { @@ -59,27 +58,11 @@ warning_threshold => $queue_size_warning_threshold, } -> - govuk_rabbitmq::queue_with_binding { $amqp_unpublishing_queue: - ensure => absent, - amqp_exchange => $amqp_exchange, - amqp_queue => $amqp_unpublishing_queue, - routing_key => 'redirect.unpublish.#', - durable => true, - } -> - - govuk_rabbitmq::monitor_messages {"${amqp_unpublishing_queue}_message_monitoring": - ensure => absent, - rabbitmq_hostname => 'localhost', - rabbitmq_queue => $amqp_unpublishing_queue, - critical_threshold => $queue_size_critical_threshold, - warning_threshold => $queue_size_warning_threshold, - } -> - govuk_rabbitmq::consumer { $amqp_user: ensure => $ensure, amqp_pass => $amqp_pass, - read_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_unpublishing_queue}|${amqp_exchange})\$", - write_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_unpublishing_queue})\$", - configure_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_unpublishing_queue})\$", + read_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_exchange})\$", + write_permission => "^(amq\\.gen.*|${amqp_major_change_queue}\$", + configure_permission => "^(amq\\.gen.*|${amqp_major_change_queue}\$", } }