Skip to content

Cog Load Resilience for Site-Dependent Extensions #6

@rippyboii

Description

@rippyboii

Summary

Under certain startup conditions, some extensions/cogs fail to load when the site/API is temporarily unavailable (e.g., connection drop, timeout, failed response).

Example (Filtering cog):

  • bot/exts/filtering/filtering.py
  • async def cog_load(self)
  • site/API call during load (self.bot.api_client.get(...))
  • webhook setup during load (_fetch_or_generate_filtering_webhook())

If these fail and are not handled, the cog may not load.

Affected Cogs

  • filters (highest priority; moderation-critical)
  • superstarify
  • reminders
  • python_news

Tasks

  • Add retry + backoff helper/pattern for temporary site/API failures
  • Handle and log failures clearly in cog_load()
  • Add moderator/admin alert for filters load failure
  • Re-raise after final failure so monitoring still sees it
  • Add tests for retry/failure behavior (unit tests where feasible)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions