Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure bot doesn't indefinitely hang on an exception in on_ready #6202

Conversation

Jackenmen
Copy link
Member

Description of the changes

As evidenced by the past (#2677, #3663, or, more recently, #6124), we sometimes introduce bugs into this code area, resulting in the bot hanging indefinitely, showing up as online even though it can't be interacted with. This PR aims to properly shut down the bot with a non-zero exit code in such cases.

One unrelated change here is to fetch_latest_red_version_info() no longer being wrapped with suppress - this is actually already handled by the function itself, in which case it returns (None, None) tuple.

Have the changes in this PR been tested?

Yes

@Jackenmen Jackenmen added the Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. label Jul 13, 2023
@Jackenmen Jackenmen added this to the 3.5.3 milestone Jul 13, 2023
@github-actions github-actions bot added the Category: Core - Other Internals This is related to core internals that don't have a dedicated label. label Jul 13, 2023
@Jackenmen Jackenmen changed the title Ensure bot doesn't indefinitely hang on an exception in on_ready Ensure bot doesn't indefinitely hang on an exception in on_ready Jul 19, 2023
@Jackenmen Jackenmen merged commit bad23a4 into Cog-Creators:V3/develop Jul 19, 2023
17 checks passed
@red-githubbot red-githubbot bot added the Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. label Jul 19, 2023
@Jackenmen Jackenmen deleted the ensure_bot_does_not_hang_on_on_ready_exception branch July 19, 2023 20:45
@Jackenmen Jackenmen added Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. and removed Changelog Entry: Pending Changelog entry for this PR hasn't been added by repo maintainers yet. labels Jul 24, 2023
Dav-Git pushed a commit to Dav-Git/Red-DiscordBot that referenced this pull request Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Core - Other Internals This is related to core internals that don't have a dedicated label. Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants