Open zsharp-gls opened 7 months ago
This is caused by the mismatch between swagger and service response. But this is fix in https://github.com/Azure/azure-rest-api-specs/commit/8e982a3998c1fdfffb897a2894ff29f9bbb8074d. The solution is to refresh the Az.App
module.
Thanks for the pointer! This might be an issue with the azure-powershell docker container then. Here's what I get when I try to Update-Module
on Az.App
PS C:\Users\zsharp> docker image list mcr.microsoft.com/azure-powershell
REPOSITORY TAG IMAGE ID CREATED SIZE
mcr.microsoft.com/azure-powershell latest e543c0f068a0 3 weeks ago 946MB
PS C:\Users\zsharp> docker run -it mcr.microsoft.com/azure-powershell:latest
PowerShell 7.4.0
PS /> Start-AzContainerAppJob
cmdlet Start-AzContainerAppJob at command pipeline position 1
Supply values for the following parameters:
Name:
PS /> # Ctrl-C to skip entering values
PS /> Get-Module Az*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.15.0 Az.Accounts {Add-AzEnvironme…
Script 1.0.0 Az.App {Disable-AzConta…
PS /> Update-Module Az.App
Install-Package: Unable to find repository '/latest'. Use Get-PSRepository to see all available repositories.
PS />
This is caused by the mismatch between swagger and service response. But this is fix in Azure/azure-rest-api-specs@8e982a3. The solution is to refresh the
Az.App
module.
@wyunchi-ms Refresh as in release a new version, because updating to 1.0.0 doesn't seem to have included the fix?
Is there any kind of work-around for this at the moment?
@wyunchi-ms this issue does not seem to be resolved, at least not with AZ.App
v1.0.0.
As a workaround, you can retrieve the Azure Resource of the Container App Job Execution, and use the Properties
object from there:
$ResourceGroup = "resource-group"
$ContainerName = "container-app-test"
$job = Start-AzContainerAppJob -Name $ContainerName -ResourceGroupName $ResourceGroup
$resource = Get-AzResource -id $job.id
PS /> $resource.Properties.status
Running
Related and may warrant a separate issue, Get-AzContainerAppJobExecution should support list
if a jobID is not supplied and return all jobs.
Equivalent:
invoke-azrestmethod 'https://management.azure.com/subscriptions/x/resourceGroups/x/providers/Microsoft.App/jobs/x/executions?api-version=2024-02-02-preview' |% content | convertfrom-json -depth 9 |% value
Description
When running
Get-AzContainerAppJobExecution
, the resulting powershell object is missing most properties from the execution, like Status, StartTime, etc...Issue script & Debug output
Environment data
Module versions
Error output