镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Extension Load Error Detection & Tracking #3

Closed

Description

@a-runebou

Summary

Implement centralized detection of extension (cog) load failures during bot startup (and reloads?). Currently, failures may occur silently because extension loading is scheduled asynchronously, and exceptions are not surfaced clearly.

  1. load_extensions() schedules tasks.
  2. Exceptions occur inside async tasks.
  3. Failures may only appear in logs/Sentry.
  4. The bot may run partially degraded without moderator awareness.

Tasks

  • Wrap Bot.load_extension() in try/except.
  • Catch any errors.
  • Track extension that failed to load.
  • Unit test for failure detection.

Related

The methods load_extensions() and _load_extensions() are relevant and might need to be overwritten: https://github.com/python-discord/bot-core/blob/74072b3709d87dc811a4972aec1ef172101e49bf/pydis_core/_bot.py#L163

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