-
Notifications
You must be signed in to change notification settings - Fork 563
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
1128 - Print the entropy to stderr regardless of quiet mode #1129
1128 - Print the entropy to stderr regardless of quiet mode #1129
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1129 +/- ##
==========================================
+ Coverage 39.24% 39.27% +0.03%
==========================================
Files 53 53
Lines 8022 8028 +6
==========================================
+ Hits 3148 3153 +5
Misses 4452 4452
- Partials 422 423 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our code coverage has gone down. Can you write a test that exercises the else
branch?
Hi @mapkon, I added a unit test per your request. |
I took the liberty of merging the recent changes from master to the branch. Looking at last night's build failure, I don't understand why it failed - the only failed tests seem to come from |
I sometimes get these intermittent failures - |
@mapkon What are the next steps? Is anything required from my side? |
CC: @wolfeidau @gliptak |
thank your for the detailed analysis @eacherkan-aternity while survey doesn't seem to have native support for stderr/always display, consider moving the stderr switching functionality into prompter PS #1147 |
@eacherkan-aternity Any response to this? |
@mapkon I think the decision whether the currently proposed solution is reasonable or whether the functionality should go into prompter should be yours (the maintainers'). As a first-time contributor I don't feel familiar enough with the project to make a design decision. If you reject the current proposal (which of course is absolutely fine, no hard feelings whatsoever), I can try to move the functionality into prompter. As far as I understand, this entails:
Does that make sense? |
thank you for detailing approach above. is there a need for separate PinentryPrompter or would CliPrompter gain additional methods? consider formulating above as a separate PR (and we could rebase this PR on it) |
Thanks mate for the submission, and I appreciate your work on this, and contribution to open source. To be fair, I maintain the project mainly by testing dependency updates and merging PRs. For the heavy lifting stuff, I defer to @gliptak and @wolfeidau for guidance, since they have more context than I do. I would take their word over mine. |
@eacherkan-aternity Any update on this? |
@mapkon I'm working on the implementation.
I don't see a need for a separate prompter, I would add a method to |
If that is easier to implement, lets go for that |
Hi, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter is failing. Please take a look
Sorry. Fixed by running |
Judging by the
prompter.StringRequired("Enter verification code")
usage in the same method, I assume that it's reasonable to print tostderr
if user input is required, even in quiet mode.The logger's destination is set in
main.go
, either toio.Discard
(in quiet mode), or toos.Stderr
otherwise. Since at the moment there's no great flexibility in the logger configuration, I propose a simple solution by printing the specific linePhone approval required. Entropy is: %d
always tostderr
. I implement this by saving the previous destination aside, and putting it back after thePrintf
.Potential downsides of this solution include:
prompter
. However, theprompter
framework doesn't seem to have facilities for an informative user message that doesn't require input.