Inconsistency about whether resuming a prompt should count as a retry
See original GitHub issueVersion
master branch
Describe the bug
In Prompt.cs, ResumeDialogAsync
calls RepromptDialogAsync
which calls OnPromptAsync
with isRetry
set to false
:
public override async Task RepromptDialogAsync(ITurnContext turnContext, DialogInstance instance, CancellationToken cancellationToken = default(CancellationToken))
{
var state = (IDictionary<string, object>)instance.State[PersistedState];
var options = (PromptOptions)instance.State[PersistedOptions];
await OnPromptAsync(turnContext, state, options, false, cancellationToken).ConfigureAwait(false);
}
However, in ActivityPrompt.cs, RepromptDialogAsync
calls OnPromptAsync
with isRetry
set to true
:
public override async Task RepromptDialogAsync(ITurnContext turnContext, DialogInstance instance, CancellationToken cancellationToken = default(CancellationToken))
{
var state = (IDictionary<string, object>)instance.State[PersistedState];
var options = (PromptOptions)instance.State[PersistedOptions];
await OnPromptAsync(turnContext, state, options, true, cancellationToken).ConfigureAwait(false);
}
I know it’s a rare case when a prompt would be resumed, but in such a case should the retry prompt be used or not?
[bug]
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
The environment is inconsistent, please check the package ...
For my setup, I need to specify the channel otherwise it would not work. After running the command in the terminal, I was...
Read more >Limited Retries: A Need For Speed Unbound Documentary ...
I think the limited retries are good when it's a case of "should you retry for first or accept third" or if you...
Read more >How setting the parameter "Maximum number of retries" to a ...
In case the value set in maximum number of retries is more than 5, there can be consequences resulting in slow performance in...
Read more >Flaky tests | GitLab
It's a test that sometimes fails, but if you retry it enough times, it passes, eventually. What are the potential cause for a...
Read more >Transaction Retry Count - TechDocs - Broadcom Inc.
TRANSACTION RETRY COUNT is a special attribute that can be used in the PAD logic ... It lets an action diagram determine if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I made that change to
RepromptDialogAsync()
, specifically with the feedback from Gabo after he reviewed the PR to addisRetry
ontoActivityPrompt.OnPromptAsync()
, which you can see in the history here.It’s specifically counting as a retry when re-prompting a user, so logically it made sense that it would go towards a retry count, and also aligned it in parity with JS (retries were completely missing from C#
ActivityPrompt
prior to the PR linked).ActivityPrompt
class was just admittedly “weird” in comparison to the other “Prompts”, as it is inMicrosoft.Bot.Builder.Dialogs
namespace and does not derive fromPrompt
class, but instead directly fromDialog
.Dialog
, it’s the only one you’ll see that overrides theDialog.RepromptDialogAsync()
methodResumeDialogAsync()
ResumeDialogAsync()
to callRepromptDialogAsync()
how they’d preferThoughts, @gabog ?
Here’s a real-world example of a prompt being resumed: https://stackoverflow.com/questions/64765378/textprompt-reprompts-after-interruption