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

disable send-azpredictorrating in results az.tools.predictor #16586

Closed
brwilkinson opened this issue Dec 7, 2021 · 13 comments · Fixed by #16862
Closed

disable send-azpredictorrating in results az.tools.predictor #16586

brwilkinson opened this issue Dec 7, 2021 · 13 comments · Fixed by #16862
Assignees
Labels
Az.Tools.Predictor feature-request This issue requires a new behavior in the product in order be resolved.

Comments

@brwilkinson
Copy link

Description

I was wondering what is the setting to disable this?

image

Script or Debug output

No response

Environment data

No response

Module versions

No response

Error output

No response

@brwilkinson brwilkinson added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Dec 7, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Dec 7, 2021
@dcaro
Copy link
Contributor

dcaro commented Dec 7, 2021

@brwilkinson we introduced this in the preview but there is no setting to remove the message. We will remove this in the upcoming preview.
cc @kceiw

@brwilkinson
Copy link
Author

Thank you @dcaro

@dingmeng-xue dingmeng-xue added feature-request This issue requires a new behavior in the product in order be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Dec 16, 2021
@craiglandis
Copy link
Member

This broke all prediction for me, not just Az prediction. With Az.Tools.Predictor loaded I only ever see a single prediction - for Send-AzPredictorRating. Adding a feedback mechanism that breaks the module is not a great way to solicit feedback. :-)

I've uninstalled it for now. Since it's typically in use, I close all PS sessions and run this from CMD -

pwsh -noprofile -nologo -command Uninstall-Module -Name Az.Tools.Predictor

@brwilkinson
Copy link
Author

@craiglandis what pwsh version are you on and which version of psreadline do you have installed?

@craiglandis
Copy link
Member

@craiglandis what pwsh version are you on and which version of psreadline do you have installed?

PS 7.2.1, Az.Tools.Predictor 0.5.0

@brwilkinson
Copy link
Author

Script 2.2.0 beta4 PSReadLine ?

    if ( $PSVersionTable.psversion.Major -ge 7  -and $PSVersionTable.PSVersion.Minor -ge 2)
    {
        Enable-AzPredictor
        Set-PSReadLineOption -PredictionViewStyle ListView
        Set-PSReadLineOption -PredictionSource HistoryAndPlugin
    }

Is this what you have?

@kceiw
Copy link
Contributor

kceiw commented Dec 20, 2021

@craiglandis Can you please help us to improve the qualify by giving us some examples like what you types when you see it's broken?

Az Predictor only shows the suggestions based on the command history and the command you're typing (The commands are Az commands). If there are no suggestions, it doesn't show anything. It gets the suggestions from our server. So it also requires Internet connection. "Send-AzPredictorRating" doesn't require Internet connection and is always shown as the last item in the suggestion list. So even if there are no suggestions for what you types or there is no Internet connection, we still show this cmdlet.

I ask for your input because I would like to try it at my side and also trying to see if we have any gaps in the model we use for the suggestions.

@brwilkinson
Copy link
Author

brwilkinson commented Jan 11, 2022

Hi @dcaro It seems the survey prompt is having more impact than I initially thought.

There has been an issue over on PowerShell/vscode-powershell#3701 that relates to the survey functionality.

It seems the eventsubscriber as below is causing exceptions within PsReadline and powershell editor services within VSCode.

Get-EventSubscriber -Force  | foreach action | foreach command

                if ([Microsoft.Azure.PowerShell.Tools.AzPredictor.AzPredictorData]::ShowSurveyOnIdle) {
                    [Microsoft.Azure.PowerShell.Tools.AzPredictor.AzPredictorData]::ShowSurveyOnIdle = $False
                    Write-Host ''
                    Write-Host ''; Write-Host `Survey: -ForegroundColor $Host.PrivateData.VerboseBackgroundColor -BackgroundColor $host.PrivateData.VerboseForegroundColor -NoNewLine; Write-Host ' How was your experience using the Az Predictor module?'
                    Write-Host ''
                    Write-Host 'Run ' -NoNewline; Write-Host Open-AzPredictorSurvey -ForegroundColor $Host.PrivateData.VerboseBackgroundColor -BackgroundColor $host.PrivateData.VerboseForegroundColor -NoNewline; Write-Host ' to give us your feedback.'
                    Write-Host ''
                    Write-Host '(Use "Ctrl + C" to return to the prompt)'
                }

@brwilkinson
Copy link
Author

brwilkinson commented Jan 11, 2022

for a workaround I am deleting the event subscriber directly after the AzPredictor is loaded.

    if ( $PSVersionTable.psversion.Major -ge 7 -and $PSVersionTable.PSVersion.Minor -ge 2)
    {
        Enable-AzPredictor
        Set-PSReadLineOption -PredictionViewStyle ListView
        Set-PSReadLineOption -PredictionSource HistoryAndPlugin
        Get-EventSubscriber -Force -SourceIdentifier PowerShell.OnIdle -EA 0 | Unregister-Event -Force
    }

@brwilkinson
Copy link
Author

Please ... please ... please ... please... please... please... please...

please can we remove this feature ?

How many people have sent a ratings request ?

image

This is EXTREMELY frustrating.

I can only say that if I walked into your Office and put a quite distracting object on your clean office desk that takes up quite a large amount of space "of your workspace" so that you had to constantly look at it, how frustrating would that be?

or at least make it configurable or time based?

I gave a rating and it still shows up ?

image

@dcaro dcaro linked a pull request Mar 29, 2022 that will close this issue
8 tasks
@dcaro
Copy link
Contributor

dcaro commented Mar 29, 2022

@brwilkinson this additional line was an experiment that we did to understand better how to prompt users for feedback in a command line tool.
We will remove this in the upcoming release of Az.Tools.Predictor.

@brwilkinson
Copy link
Author

Thank you @dcaro 🙏🏼

@brwilkinson
Copy link
Author

great news

image

image

Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Az.Tools.Predictor feature-request This issue requires a new behavior in the product in order be resolved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants