-
Notifications
You must be signed in to change notification settings - Fork 4k
Write current module version to Verbose channel. #2810
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
Conversation
…ssemblyInfo.cs. They will have a script to update them before release.
This information will help us debugging end user problems.
@NonStatic2014 This is not recommended practice for finding the module version. If you would prefer to make this part of exception handling, or include the module version int he debug stream, this would be preferable. |
@markcowl I tried to write it into Debug channel, but it will require user do the rest of work step by step, or setup an environment variable before run the command. I'd like to use the Verbose channel to make the user experience easier for them other more commands or action. |
@NonStatic2014 The assembly version is not useful information in this case, you want the module version. Please change this to be the module version, and please put this in exception handling code and in the debug stream. |
@@ -138,6 +140,7 @@ protected override void StopProcessing() | |||
} | |||
catch (Exception ex) | |||
{ | |||
this.WriteVersionInfoToDebugChannel(); |
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 was thinking more of adding this information to the error itself, but you could do this in a subsequent PR
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.
Yep, that will be a bigger change: derive from ErrorRecord, put the module version in it and return that object. Let me do that when we have more information needs to be displayed during exception handling.
ON demand run here: http://azuresdkci.cloudapp.net/view/1-AzurePowerShell/job/powershell-demand/1124/ LGTM once the on-demand run passes. |
Sometimes, our customer may use an old version of AzureML PS cmdlet and cause unexpected result. We have to let them know how to use other PowerShell cmdlet to get the module number. With this change, they just need to add
-vb
in the same command line and then they can easily get it and help the investigation.