-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[wip] az feedback #8829
[wip] az feedback #8829
Conversation
2a9c14c
to
43e0265
Compare
Please feel free to review away! cc: @tjprescott, @yugangw-msft, @achandmsft. |
4c14c18
to
5a0ff33
Compare
ping! (for review) |
src/azure-cli-core/setup.py
Outdated
'azure-mgmt-resource==2.1.0' | ||
'azure-mgmt-resource==2.1.0', | ||
'pyperclip==1.7.0', | ||
'psutil==5.6.1' |
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.
Looks like this dependency is causing our ADO check to fail. I suspect that this dependency isn't playing nice inside of alpine.
@@ -72,7 +72,9 @@ | |||
'six', | |||
'tabulate>=0.7.7', | |||
'wheel', | |||
'azure-mgmt-resource==2.1.0' | |||
'azure-mgmt-resource==2.1.0', |
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.
In general, our setup.py files should contain a range of acceptable versions, instead of one pinned version. Not doing this causes issues like #6973.
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.
makes sense!
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.
Privacy is my primary concern with this, but there are others as well.
|
||
|
||
UNKNOWN_COMMAND = "unknown_command" | ||
CMD_LOG_LINE_PREFIX = "CMD-LOG-LINE-BEGIN" |
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.
These should not be public.
.github/ISSUE_TEMPLATE/Bug_report.md
Outdated
@@ -4,7 +4,7 @@ about: Create a report to help us improve | |||
|
|||
--- | |||
|
|||
**Describe the bug** | |||
q**Describe the bug** |
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.
q?
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.
yes, I noticed this too, its a typo, mistake, will update it with my next round of changes.
try: | ||
os.remove(os.path.join(log_dir, file)) | ||
except OSError: # FileNotFoundError introduced in Python 3 | ||
continue |
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.
So this... keeps the number of files between 5 and 25?
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.
keeps files between 0 and 20 / 25. I could rename the variable to clarify that the files are in reverse order. I wanted to make removing the files an infrequent operation that removes a bulk of unnecessary commands. Maybe I could fine tune this.
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.
Add comments so we understand the logic.
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.
@tjprescott, you were right, there was a bug. I have fixed it.
issue_url = "https://aka.ms/azcli/ext/issues" if is_extension else "https://aka.ms/azcli/issues" | ||
logger.error("The command failed with an unexpected error. Here is the traceback:\n") | ||
logger.exception(ex) | ||
logger.warning("\nTo open an issue, please visit: %s", issue_url) |
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.
Shouldn't we direct people to use az feedback
here?
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.
We most definitely should!
@@ -43,9 +45,21 @@ def cli_main(cli, args): | |||
else: | |||
telemetry.set_success() | |||
|
|||
elapsed_time = timeit.default_timer() - start_time |
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.
Why do we log the time for each command? I worry this may attract more perf related issues being raised.
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.
I think this was brought up in the meeting with @yugangw-msft and @achandmsft. I think the rational was to help customers notice / point out situations were commands are much slower than usual. I suppose we just saw it as general command related information.
If perf really is a problem (esp. on the CLI side) moving forward then I think it doesn't hurt to give customers and ourselves more clarity regarding it. If it really is a problem then we eventually have to address it.
I guess we could discuss this more when I am back from the conference.
|
||
_ISSUES_TEMPLATE = """ | ||
|
||
### **This autogenerated template contains command parameters. Please review and remove sensitive information, if necessary** |
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.
Why don't we simply remove the values and replace them with placeholders? This is the kind of thing we do not want to screw up. As soon as someone DOESN'T read this and posts sensitive information (which would take all of oh... 1 week?) we have a problem.
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.
Yes this is a tough / nuanced decision to make. On the one hand, we risk customer security by showing command arguments in the output by default, but this would often contain very helpful information.
I suppose place holders could be the happy medium. I can make this change then.
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.
Well, it would be helpful to have all the data in telemetry as well... problem is, that would be illegal. :)
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.
fair enough, lol. I will confirm with team and go ahead to replace with placeholders after scrum...
|
||
|
||
**Command Duration** | ||
{command_duration} |
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.
Why is this useful?
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.
It's just metadata about the command which could possible be useful. I suppose it doesn't hurt.
`{command_name}` | ||
|
||
**Ran:** | ||
`{executed_command}` |
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.
It is safer to put sanitized values here and invite the user to put actual values than vice-versa. @JasonRShaver @yugangw-msft you know more about the risks here as they are largely the same as the risks involved with telemetry.
{errors_string} | ||
|
||
## To Reproduce: | ||
|
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.
It seems like "Ran" from above could be combined here. At a minimum, the command they ran is the last step of the repro...
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.
That was the goal, but @yugangw-msft suggested moving "ran..." up near the top of the issue so users are less likely to post the issue without checking the command's arguments for sensitive info.
However, if we go with the placeholder approach, then I could move this command info back down to this section..
{cli_version} | ||
|
||
## Additional context | ||
Add any other context about the problem here. |
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.
I would move all the stuff they would be expected to fill in manually to the top of the auto-gen template. Otherwise they will simply expect that everything is pre-filled for them.
0996643
to
1fb02c3
Compare
…his metadata. Command duration and time since last run now properly shown. Print format updates. Minor bug fixes. Prompt user for issue they want info on. Fix bugs. changes with browser Skip feedback commands. Browser open works. Verbose shows issue template. Refactored code, although printing and time logic seems to be incorrect.
Delete last 5 commands if number of cached commands exceeds 25. Address more style issues. style fixes Move feedback test to correct location. More style fixes.
More style fixes. Fix python 2 error.
…o command metadata logs. Minor changes.
…. Minor updates. Fix bug where command_data_dict could be None.
50a8b9f
to
045eede
Compare
logger.error("The command failed with an unexpected error. Here is the traceback:\n") | ||
logger.exception(ex) | ||
logger.warning("\nTo open an issue, please visit: %s", issue_url) | ||
if isinstance(ex, (CLIError, CloudError)): |
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.
this section should be exactly the same, except that we use the command logger context and we no longer print the issues url but direct users to use az feedback.
@@ -34,7 +34,7 @@ LABEL maintainer="Microsoft" \ | |||
# pip wheel - required for CLI packaging | |||
# jmespath-terminal - we include jpterm as a useful tool | |||
RUN apk add --no-cache bash openssh ca-certificates jq curl openssl git zip \ | |||
&& apk add --no-cache --virtual .build-deps gcc make openssl-dev libffi-dev musl-dev \ | |||
&& apk add --no-cache --virtual .build-deps gcc make openssl-dev libffi-dev musl-dev linux-headers \ |
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.
Could you point me to where you found this secret-sauce? It looks promising (seeing as we haven't historically been too sensitive to image size) but I want to make sure that I understand the consequences of adding this dependency.
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.
@marstr, this is the github issue / comment that helped me out.
@marstr ping. |
az feedback
now:Todo:
az login
webpage to contain getting started links / commands.az feedback
to the list of recent commands.closes #2048
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).
I adhere to the Command Guidelines.