healthchecks_healthchecks/hc/front/tests
Pēteris Caune b5d4f2aa74
Implement S3 outage mitigation
The mitigation is to not attempt GetObject calls if there have
been more than 3 S3 errors in the past minute. The implementation
uses the TokenBucket class that we normally use for rate-limiting.

An example scenario this is trying to avoid is:

* the S3 service becomes unavailable for 10 straight minutes.
  Each S3 request hangs until we hit the configured timeout
  (settings.S3_TIMEOUT)
* A client is frequently requesting the "Get ping's logged body"
  API call. Each call causes one webserver process to become
  busy for S3_TIMEOUT seconds.
* All workers become busy, request backlog fills up, our service
  starts returning 5xx errors.

With the mitigation, during an S3 outage, only the calls that
retrieve ping's logged body will return 503, the rest of the service
will (hopefully) work normally.

Fixes: #1114
2025-01-13 14:21:42 +02:00
..
__init__.py Setting up tests 2015-06-25 22:29:19 +03:00
test_add_apprise.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_call.py Add Channel.phone property 2023-09-09 11:09:52 +03:00
test_add_check.py Implement OnCalendar schedules in the "Add Check" dialog 2023-12-08 12:02:01 +02:00
test_add_discord.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_discord_complete.py Fix a testcase not correctly using sample values 2024-07-29 10:36:29 +03:00
test_add_email.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_gotify.py Switch to using Pydantic for parsing Gotify configuration 2023-10-26 12:01:42 +03:00
test_add_group.py Add testcases for "Add group" and "Edit group" forms 2023-10-07 10:59:57 +03:00
test_add_matrix.py Move the "join Matrix room" code to hc.lib.matrix 2023-10-23 09:32:03 +03:00
test_add_mattermost.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_msteams.py Implement Implement MS Teams Workflows integration 2024-07-17 13:35:17 +03:00
test_add_ntfy.py Switch to using Pydantic for parsing ntfy configuration 2023-10-26 10:32:41 +03:00
test_add_opsgenie.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_pagerduty_complete.py Add Channel.shell and Channel.pd properties 2023-09-08 16:33:12 +03:00
test_add_pagertree.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_pd.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_prometheus.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_pushbullet.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_pushbullet_complete.py Update tests to check if logger.warning() gets called 2023-11-01 12:14:30 +02:00
test_add_pushover.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_pushover_help.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_rocketchat.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_shell.py Add Channel.shell and Channel.pd properties 2023-09-08 16:33:12 +03:00
test_add_signal.py Rename "phone" -> "recipient" in Signal add/edit forms 2024-12-28 11:21:34 +02:00
test_add_slack.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_slack_btn.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_slack_complete.py Update Slack integration to use channel name as the integration name 2024-05-27 15:54:30 +03:00
test_add_slack_help.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_sms.py Add support for Signal usernames 2024-12-28 11:08:41 +02:00
test_add_spike.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_telegram.py Enable mock autospeccing in more places 2023-10-21 11:55:30 +03:00
test_add_trello.py Fix elf -> self 2024-12-02 11:32:53 +02:00
test_add_victorops.py Improve type hints 2023-08-30 09:57:34 +03:00
test_add_webhook.py Update Channel.webhook_spec to return an object instead of a dict 2023-09-03 16:20:22 +03:00
test_add_whatsapp.py Add Channel.phone property 2023-09-09 11:09:52 +03:00
test_add_zulip.py Improve type hints, use pydantic for parsing Zulip configurations 2023-10-17 16:58:57 +03:00
test_badges.py Remove now obsolete Check.prepare_badge_key() 2024-12-27 12:56:26 +02:00
test_basics.py Rename "sign in" to "log in" 2024-08-12 15:09:58 +03:00
test_channel_checks.py Improve type hints 2023-08-30 09:57:34 +03:00
test_channels.py Add Channel.phone property 2023-09-09 11:09:52 +03:00
test_clear_events.py Improve type hints 2023-08-30 09:57:34 +03:00
test_copy.py Improve type hints 2023-08-30 09:57:34 +03:00
test_cron_preview.py Reduce repetition in test_cron_preview 2023-12-06 16:07:20 +02:00
test_details.py Add SITE_NAME setting override in test_details 2024-03-26 17:33:13 +02:00
test_edit_email.py Add Channel.email property 2023-09-11 11:45:25 +03:00
test_edit_group.py Add testcases for "Add group" and "Edit group" forms 2023-10-07 10:59:57 +03:00
test_edit_ntfy.py Switch to using Pydantic for parsing ntfy configuration 2023-10-26 10:32:41 +03:00
test_edit_signal.py Rename "phone" -> "recipient" in Signal add/edit forms 2024-12-28 11:21:34 +02:00
test_edit_sms.py Add Channel.phone property 2023-09-09 11:09:52 +03:00
test_edit_webhook.py Update Channel.webhook_spec to return an object instead of a dict 2023-09-03 16:20:22 +03:00
test_edit_whatsapp.py Add Channel.phone property 2023-09-09 11:09:52 +03:00
test_filtering_rules.py Improve type hints 2023-08-30 09:57:34 +03:00
test_get_events.py Fix date bounds check in log_events 2024-03-21 11:37:46 +02:00
test_hc_extras.py Update settings.py to allow subpath in SITE_ROOT 2024-12-04 10:37:52 +02:00
test_index.py Implement dynamic favicon in the projects overview page 2024-04-10 14:36:42 +03:00
test_linemode_tag.py Improve type hints 2023-08-30 09:57:34 +03:00
test_log.py Remove usages of Ping.body 2024-07-11 16:17:21 +03:00
test_log_events.py Fix AJAX views to better handle user logging out 2024-08-20 10:57:36 +03:00
test_mattermost_help.py Rename "sign in" to "log in" 2024-08-12 15:09:58 +03:00
test_metrics.py Improve type hints 2023-08-30 09:57:34 +03:00
test_my_checks.py Add testcases for favicons 2024-03-26 17:28:58 +02:00
test_oncalendar_preview.py Fix oncalendar_preview to require a logged in user 2023-12-13 12:55:12 +02:00
test_pause.py Improve type hints 2023-08-30 09:57:34 +03:00
test_pd_help.py Improve type hints 2023-08-30 09:57:34 +03:00
test_ping_body.py Implement S3 outage mitigation 2025-01-13 14:21:42 +02:00
test_ping_details.py Implement S3 outage mitigation 2025-01-13 14:21:42 +02:00
test_projects_menu.py Improve type hints 2023-08-30 09:57:34 +03:00
test_remove_channel.py Improve type hints 2023-08-30 09:57:34 +03:00
test_remove_check.py Improve type hints 2023-08-30 09:57:34 +03:00
test_resume.py Improve type hints 2023-08-30 09:57:34 +03:00
test_search.py Improve type hints 2023-08-30 09:57:34 +03:00
test_send_test_notification.py Update Webhook transport to close db connection before network IO 2024-08-31 19:18:17 +03:00
test_serve_doc.py Improve type hints 2023-08-30 09:57:34 +03:00
test_signal_captcha.py Fix "class Foo(object):" -> "class Foo:" 2024-10-29 17:57:50 +02:00
test_status.py Fix AJAX views to better handle user logging out 2024-08-20 10:57:36 +03:00
test_status_single.py Update the "Running, started ... ago" template to use seconds precision 2025-01-02 15:49:32 +02:00
test_switch_channel.py Improve type hints 2023-08-30 09:57:34 +03:00
test_transfer.py Improve type hints 2023-08-30 09:57:34 +03:00
test_trello_settings.py Remove @nolog decorator 2024-02-06 17:30:24 +02:00
test_uncloak.py Improve type hints 2023-08-30 09:57:34 +03:00
test_unsubscribe_email.py Improve type hints 2023-08-30 09:57:34 +03:00
test_update_channel.py Improve type hints 2023-08-30 09:57:34 +03:00
test_update_channel_name.py Improve type hints 2023-08-30 09:57:34 +03:00
test_update_name.py Improve type hints 2023-08-30 09:57:34 +03:00
test_update_timeout.py Fix systemd expression in a testcase to work after 2024-02-01 2024-02-02 13:00:29 +02:00
test_validate_schedule.py Implement OnCalendar schedules in the "Add Check" dialog 2023-12-08 12:02:01 +02:00
test_verify_email.py Improve type hints 2023-08-30 09:57:34 +03:00
test_verify_signal_number.py Rename "phone" -> "recipient" in Signal add/edit forms 2024-12-28 11:21:34 +02:00
test_webhook_validator.py Improve type hints 2023-08-30 09:57:34 +03:00