From d70e799466a1157aee7ed7dd325088c24eb5c461 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 24 Jan 2020 13:39:00 -0800 Subject: [PATCH] bots: Remove FEEDBACK_BOT implementation. This legacy cross-realm bot hasn't been used in several years, as far as I know. If we wanted to re-introduce it, I'd want to implement it as an embedded bot using those common APIs, rather than the totally custom hacky code used for it that involves unnecessary queue workers and similar details. Fixes #13533. --- docs/production/troubleshooting.md | 1 - puppet/zulip/manifests/base.pp | 1 - .../files/nagios3/conf.d/services.cfg | 11 --- scripts/nagios/check-rabbitmq-consumers | 1 - static/js/click_handlers.js | 21 ------ static/js/resize.js | 1 - static/styles/right-sidebar.scss | 7 -- templates/zerver/app/navbar.html | 7 -- templates/zerver/app/right_sidebar.html | 7 -- tools/linter_lib/custom_check.py | 1 - tools/test-backend | 1 - zerver/lib/actions.py | 10 --- zerver/lib/feedback.py | 68 ------------------- zerver/lib/import_realm.py | 2 - .../commands/initialize_voyager_db.py | 3 - zerver/tests/test_feedback.py | 12 ---- zerver/views/home.py | 1 - zerver/worker/queue_processors.py | 8 --- zproject/default_settings.py | 10 --- zproject/prod_settings_template.py | 6 -- 20 files changed, 179 deletions(-) delete mode 100644 zerver/lib/feedback.py delete mode 100644 zerver/tests/test_feedback.py diff --git a/docs/production/troubleshooting.md b/docs/production/troubleshooting.md index 56d7436874..670a8345e8 100644 --- a/docs/production/troubleshooting.md +++ b/docs/production/troubleshooting.md @@ -51,7 +51,6 @@ zulip-workers:zulip-events-confirmation-emails RUNNING pid 21 zulip-workers:zulip-events-digest_emails RUNNING pid 2205, uptime 1:13:11 zulip-workers:zulip-events-email_mirror RUNNING pid 2203, uptime 1:13:11 zulip-workers:zulip-events-error_reports RUNNING pid 2200, uptime 1:13:11 -zulip-workers:zulip-events-feedback_messages RUNNING pid 2207, uptime 1:13:11 zulip-workers:zulip-events-missedmessage_mobile_notifications RUNNING pid 2204, uptime 1:13:11 zulip-workers:zulip-events-missedmessage_reminders RUNNING pid 2206, uptime 1:13:11 zulip-workers:zulip-events-signups RUNNING pid 2198, uptime 1:13:11 diff --git a/puppet/zulip/manifests/base.pp b/puppet/zulip/manifests/base.pp index fbf18c2026..4b0f8e5a83 100644 --- a/puppet/zulip/manifests/base.pp +++ b/puppet/zulip/manifests/base.pp @@ -76,7 +76,6 @@ class zulip::base { 'embed_links', 'embedded_bots', 'error_reports', - 'feedback_messages', 'invites', 'missedmessage_email_senders', 'email_senders', diff --git a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg index 4ba421fdca..60ed2859ca 100644 --- a/puppet/zulip_ops/files/nagios3/conf.d/services.cfg +++ b/puppet/zulip_ops/files/nagios3/conf.d/services.cfg @@ -449,17 +449,6 @@ define service { contact_groups admins } -define service { - use generic-service - service_description Check rabbitmq feedback messages consumers - check_command check_rabbitmq_consumers!feedback_messages - # Workaround weird checks 40s after first error causing alerts - # from a single failure because cron hasn't run again yet - max_check_attempts 3 - hostgroup_name frontends - contact_groups admins -} - define service { use generic-service service_description Check rabbitmq missedmessage mobile notifications consumers diff --git a/scripts/nagios/check-rabbitmq-consumers b/scripts/nagios/check-rabbitmq-consumers index 8fe25deff6..a80f435607 100755 --- a/scripts/nagios/check-rabbitmq-consumers +++ b/scripts/nagios/check-rabbitmq-consumers @@ -53,7 +53,6 @@ queues = { 'embed_links', 'embedded_bots', 'error_reports', - 'feedback_messages', 'invites', 'missedmessage_emails', 'missedmessage_email_senders', diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 2cfde3cc27..3190e838b5 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -679,27 +679,6 @@ exports.initialize = function () { stream_list.toggle_filter_displayed(e); }); - - // FEEDBACK - - // Keep these 2 feedback bot triggers separate because they have to - // propagate the event differently. - $('.feedback').click(function () { - compose_actions.start('private', { - private_message_recipient: 'feedback@zulip.com', - trigger: 'feedback menu item'}); - - }); - $('#feedback_button').click(function (e) { - e.stopPropagation(); - popovers.hide_all(); - compose_actions.start('private', { - private_message_recipient: 'feedback@zulip.com', - trigger: 'feedback button'}); - - }); - - // WEBATHENA $('body').on('click', '.webathena_login', function (e) { diff --git a/static/js/resize.js b/static/js/resize.js index 35014fc36a..98cf9dd66e 100644 --- a/static/js/resize.js +++ b/static/js/resize.js @@ -70,7 +70,6 @@ function get_new_heights() { const usable_height = viewport_height - parseInt($("#right-sidebar").css("marginTop"), 10) - - $("#feedback_section").safeOuterHeight(true) - parseInt(buddy_list_wrapper.css("marginTop"), 10) - parseInt(buddy_list_wrapper.css("marginBottom"), 10) - $("#userlist-header").safeOuterHeight(true) diff --git a/static/styles/right-sidebar.scss b/static/styles/right-sidebar.scss index 17f703b011..f69c915421 100644 --- a/static/styles/right-sidebar.scss +++ b/static/styles/right-sidebar.scss @@ -227,13 +227,6 @@ } } -#feedback_section { - text-align: left; - padding-bottom: 15px; - border-bottom: 1px solid hsl(0, 0%, 88%); - margin-right: 10px; -} - #keyboard-icon { position: fixed; bottom: 8px; /* bottom padding of .compose-content */ diff --git a/templates/zerver/app/navbar.html b/templates/zerver/app/navbar.html index 0b6ac827c4..151ab358b5 100644 --- a/templates/zerver/app/navbar.html +++ b/templates/zerver/app/navbar.html @@ -167,13 +167,6 @@ {% endif %} - {% if enable_feedback %} -
  • - -
  • - {% endif %} {% if show_invites %}
  • diff --git a/templates/zerver/app/right_sidebar.html b/templates/zerver/app/right_sidebar.html index 17eacee539..98662fc005 100644 --- a/templates/zerver/app/right_sidebar.html +++ b/templates/zerver/app/right_sidebar.html @@ -1,12 +1,5 @@