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

For actions that allows retrying, let the user retry again #189

Closed
christianrondeau opened this issue Mar 20, 2015 · 4 comments
Closed

For actions that allows retrying, let the user retry again #189

christianrondeau opened this issue Mar 20, 2015 · 4 comments

Comments

@christianrondeau
Copy link
Contributor

Most of the time, if an action has to be retried, it's because A) the software is still running, or B) some of the uninstall actions are taking longer than expected, or C) I have a file opened in some software, e.g. a config file opened in a text editor.

In many cases, the user could solve the issue and retry; by now "ignoring" the error, we leave junk that could be avoided.

Suggestion:

Maximum tries of 3 reached. Try again? (Yes/No):

Example of what it currently does:

vagrant v1.6.3
 vagrant has been successfully uninstalled.
This is try 1/3. Retrying after 300 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

This is try 2/3. Retrying after 400 milliseconds.
 Error converted to warning:
 Cannot create a file when that file already exists.

Maximum tries of 3 reached. Throwing error.
Move failed with message:
 Cannot create a file when that file already exists.

 Attempting backup move method.

vagrant v1.6.5
 Skipping auto uninstaller - AutoUninstaller feature is not enabled.
 Skipping auto uninstaller - AutoUninstaller feature is not enabled.
 vagrant has been successfully uninstalled.

For more details: https://groups.google.com/forum/#!topic/chocolatey/UVncL7PxXRg

(Moved from chocolatey-archive/chocolatey#697)

@christianrondeau
Copy link
Contributor Author

I'm currently looking into this; if we're to allow users to manually retry, they should know what they are retrying. Right now, Chocolatey does not tell you what it's attempting to do, only what the error was. I would suggest a slightly different output, that tries to keep the operation hidden until the user needs to know what the operation is:

Operation failed (1/3): Cannot create a file when that file already exists.
Retrying after 300 milliseconds...
Operation failed (2/3): Cannot create a file when that file already exists.
Retrying after 300 milliseconds...
Operation failed (3/3): Cannot create a file when that file already exists.
Chocolatey could not execute this operation: Write file 'c:\example.txt'
Try again? (yes/no): y
Operation failed: Cannot create a file when that file already exists.
Try again? (yes/no): n
Attempting backup move method.

What do you think? The alternative would be to say what the operation is upfront; it would be easier to understand but would also greatly clutter the output (there are 7 instances of retryable file system operations)

christianrondeau added a commit to christianrondeau/choco that referenced this issue Apr 22, 2015
@christianrondeau
Copy link
Contributor Author

Quick FYI; this will be pending for #181 since I need the Console.ReadLine but in the meantime, I tried to still move forward. The branch in progress is here: https://github.com/chocolatey/choco/compare/master...christianrondeau:189-manual-retry?expand=1

All tests are green, here's where it's at:

  • Allow passing a description to retry that will be shown once all retries have been exhausted
  • Shorten messages to fit my previous comment
  • Add a description to all usages of retry throughout the code
  • Add a parameter to specify if user retries are allowed (in practice, since all would be retryable I would have changed the signature, but I understand you prefer not changing/removing features from the infrastructure code)
  • Implement the manual retry prompt and failure messages

By the way, is this helping at all?

christianrondeau added a commit to christianrondeau/choco that referenced this issue Apr 22, 2015
@ferventcoder ferventcoder modified the milestone: 0.9.10 May 11, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.x May 20, 2015
christianrondeau added a commit to christianrondeau/choco that referenced this issue Jul 22, 2015
christianrondeau added a commit to christianrondeau/choco that referenced this issue Jan 27, 2016
Copy link

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue will be closed in 14 days if it continues to be inactive.

@github-actions github-actions bot added the Pending Closure This issue has been marked as having no response or is stale and will soon be closed. label Jan 19, 2024
Copy link

github-actions bot commented Feb 3, 2024

Dear contributor,

As this issue seems to have been inactive for quite some time now, it has been automatically closed.
If you feel this is a valid issue, please feel free to re-open the issue if / when a pull request
has been added.
Thank you for your contribution.

@github-actions github-actions bot closed this as completed Feb 3, 2024
@pauby pauby removed Improvement 0 - Backlog 0 - Waiting on User Pending Closure This issue has been marked as having no response or is stale and will soon be closed. labels Feb 3, 2024
@gep13 gep13 removed this from the Future milestone Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants