Open blueww opened 4 years ago
@dingmeng-xue @erich-wang Could we make the task state as "Failed" when run cmdlets with -Asjob and failure happens in EndProcessing()? We find this issue to track the ICM: https://portal.microsofticm.com/imp/v3/incidents/details/206587283/home
I’m seeing a similar behaviour with New-AzDataLakeGen2Item. Creating a file in the root of the container but specifying / as the path results in an invalid URI error but the job state is ‘Completed’.
Description
Run a cmdlet with -Asjob, when error report in EndProcessing(), the job state will still be "Completed". This will misleading customer think the cmdlet runs success, but actually failed.
Steps to reproduce
Try to overwrite a block blob with page blob, If you run it with -Asjob, will see the task finish with State as "Completed" (
$task.error
is not null). But if you run it without -asjob, will see error reported.This is caused by the failure happens in EndProcessing()
with -asjob
without -asjob
Environment data
Module versions
This happens on lastest Az.Storage 2.6.0 + Az.Account 1.9.4
Debug output
Add -debug , the result is same.
Error output