Skip to content

Conversation

@akiraveliara
Copy link
Member

this is a bit dubious because it can cause long hangs in the extension, would appreciate any potential ideas

@akiraveliara akiraveliara added enhancement commands For issues related to DSharpPlus.Commands labels Jul 20, 2024
@akiraveliara akiraveliara added this to the v5.0 milestone Jul 20, 2024
@akiraveliara akiraveliara marked this pull request as ready for review July 20, 2024 12:20
@ecrocombe
Copy link
Contributor

Closes #1986

@Plerx2493
Copy link
Member

Closes #1986

Im not sure if i would say this closes the issue. Yes it helps because we retry it when it fails but i think we should also add something like IRestRequest.HasLongTimeout which drasticly increase the timeout for this request (maybe 10 minutes?). This would lead to better registration and other reqeusts wont have a long timeout

@ecrocombe
Copy link
Contributor

Closes #1986

Im not sure if i would say this closes the issue. Yes it helps because we retry it when it fails but i think we should also add something like IRestRequest.HasLongTimeout which drasticly increase the timeout for this request (maybe 10 minutes?). This would lead to better registration and other reqeusts wont have a long timeout

You are right, in more ways than 1.

However, I believe the timeout's in question will be resolved by some REST improvements and is part of a larger issue, which is already planned and tracked for v5 in #1580

IEnumerable<DiscordApplicationCommand> commands
)
{
while (true)
Copy link
Member

Choose a reason for hiding this comment

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

i think we should still have some kind of max retries, maybe 5 or 10

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe, probably via config

Copy link
Member

Choose a reason for hiding this comment

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

not sure if this has been fixed yet but I'd reiterate what plerx said, it's important to not keep retrying indefinitely. Especially if the issue ends up being an us issue. We can not just assume our request is "correct". Especially since this is Discord we're talking about.

@Plerx2493
Copy link
Member

However, I believe the timeout's in question will be resolved by some REST improvements and is part of a larger issue, which is already planned and tracked for v5 in #1580

Im not sure about that, afaik the underlying issue is that the registration endpoint can have a very fluctuating time usage, which is something we will have to special case

@akiraveliara
Copy link
Member Author

can we confirm this with Discord somehow?

@Plerx2493
Copy link
Member

can we confirm this with Discord somehow?

Its not documented by discord, maybe we should open an issue on discords repo

@akiraveliara
Copy link
Member Author

maybe. if so, we shouldn't merge this until we have confirmation that this is a workable approach in the face of discord tomfoolery

@Plerx2493
Copy link
Member

can we confirm this with Discord somehow?

The issue opened by @ecrocombe was closed as not able to reproduce. Im not sure how to tackle this.

@akiraveliara akiraveliara marked this pull request as draft August 20, 2024 15:24
@akiraveliara
Copy link
Member Author

superseded by efforts in #2115

@akiraveliara akiraveliara deleted the aki/retry-registering-commands branch December 16, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands For issues related to DSharpPlus.Commands discord-issue enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants