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

Discord fix when a channel is not found. #1480

Merged
merged 10 commits into from
Sep 29, 2023
Merged

Discord fix when a channel is not found. #1480

merged 10 commits into from
Sep 29, 2023

Conversation

rvztz
Copy link
Contributor

@rvztz rvztz commented Sep 21, 2023

  • issue: Discord connector raises issues when trying to fetch jump_url
  • cause: The get_channel function from the discord client returns None when the given channel couldn't be fetched or it doesn't exists.
  • fix: Call bot.get_channel only once within the callback function used by the discord bot. If the fetching of the channel fails, we note it earlier.

Comment on lines 92 to 93
if channel is None:
raise FileNotFoundError("Channel not found.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we know for a fact if this is None it's because the channel wasn't found versus a connectivity issue? asking because we hit the error earlier and it seemed to be an ephemeral issue, which would suggest the latter, right? I want to make sure we don't mislead the caller here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on a comment on the discord client we're using:
The returned channel or ``None`` if not found.

Copy link
Contributor

@ryannikolaidis ryannikolaidis Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, but then why were we seeing that in CI intermittently? ...because obviously that channel didn't disappear/reappear.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also probably good to drop a line to that documentation as comment in the code here, but probably helpful for us to understand why this is the case intermittently in CI. seems like some other case is also resulting in this being None (if None is what triggered the original error we were seeing)

CHANGELOG.md Outdated Show resolved Hide resolved
@ryannikolaidis
Copy link
Contributor

looks like we have no actual changes at this point? I know this is still draft, assuming something is in progress?

CHANGELOG.md Outdated Show resolved Hide resolved
@rvztz rvztz marked this pull request as ready for review September 27, 2023 16:45
CHANGELOG.md Outdated Show resolved Hide resolved
@ryannikolaidis ryannikolaidis enabled auto-merge (squash) September 29, 2023 01:20
@ryannikolaidis ryannikolaidis merged commit 4e84e32 into main Sep 29, 2023
@ryannikolaidis ryannikolaidis deleted the discord-fix branch September 29, 2023 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants