-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Get-AzStorageBlob blocks console in interactive mode if an error ocurrs #24748
Comments
Would you please help to look at this issue? It looks all Storage dataplane cmdlets based on v12 SDK (Track2 SDK) won't work, when customer first run cmdlet "Connect-DbaInstance" (from module "dbatools"), then run storage dataplane cmdlet like "Get-AzStorageContainer" or "Get-AzStorageBlob". I can repro this issue with following script in both Powershell 5/7:
A workaround might be first run "import-module Az.Storage", then run "Connect-DbaInstance". On my machine, looks this way won't fail any cmdlet. |
Update: @isra-fel Would you please help to see is there any way we can do to resolve this issue? |
Just to clarify, although this is a version mismatch and can be worked-around adjusting the import order, there is a secondary issue "blocks console in interactive mode". So, it's not just that an error happens, it's that the command which should run unatended is not releasing the console but blocking the whole process. There is something wrong with error handling in this library. |
Do you have any idea to improve the error handling to avoid cmdlet hang for above assembly conflict error? @david-garcia-garcia |
@blueww current error handling behaviour (process gets stuck/ransomed) is super dangerous. How am I supposed to know that the process has en error if it does not return or throw an exception? I am making these calls from a docker entrypoint and from scheduled tasks. Current behaviour is totally unreliable, nothing can be captured o handled because the process does not return. I'm OK if it fails due to version mismatch, but it has to fail, not to block indefinately. |
We can understand your concern for the cmdlet not exit in this kind of error. The cmdlets can exist on common type of error, like error reported from storage server, like wrong parameters are input. |
Description
I am investigating an unhandled exception in Get-AzStorageBlob. When the error happens, the console gets blocked and you can only regain console control using ctrl+c.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: