azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[BUG] ContainerAppJobExecutionData missing data

Open algorunescu opened this issue 2 years ago • 8 comments
trafficstars

Library name and version

Azure.ResourceManager.AppContainers 1.1.0

Describe the bug

Whatever way I retrieve the ContainerAppJobExecutionData of either a specific job execution or all executions of a job, the Data has most of its members null.

I've tried retrieving the data as it is done in the generated sample Sample_ContainerAppJobExecutionResource.cs. but also using the ResourceGroup resource

Expected behavior

Execution data should contain the Id, Name, StartOn, EndOn, Status, SystemData, Template.

Actual behavior

Id and Name are populated but everything else is null

Reproduction Steps

var client = new ArmClient(new DefaultAzureCredential());
var resourceGroupResource = client.GetDefaultSubscription().GetResourceGroup(resourceGroupName);
var job = resourceGroupResource.GetContainerAppJob(jobName);
var execution = await job.Value.GetContainerAppJobExecutionAsync(executionName)

Environment

dotnet 7.0.400 Windows 11 Visual Studio 17.7.2

algorunescu avatar Aug 28 '23 15:08 algorunescu

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar Aug 29 '23 12:08 jsquire

Having the same problem. It appears to be because the deserialization happens on the root of the JSON document yet the values are nested under the properties node.

{
    "id": "/subscriptions/<omitted>/resourceGroups/<omitted/providers/Microsoft.App/jobs/<name>/executions/<name>-zr5ga40",
    "name": "<name>-zr5ga40",
    "type": "Microsoft.App/jobs/executions",
    "properties": {
        "status": "Succeeded",
        "startTime": "2023-09-18T12:38:44+00:00",
        "endTime": "2023-09-18T12:43:20+00:00",
        "template": {}
    }
}

The code responsible: https://github.com/Azure/azure-sdk-for-net/blob/a35f47a9c74df644a3755e73ec5a8b82a32de105/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/Models/ContainerAppJobExecutionData.Serialization.cs

The CLI works just fine:

az containerapp job execution list -n <name> -g <omitted>

I have no clue how to fix this. @jsquire Any pointers?

mburumaxwell avatar Sep 18 '23 13:09 mburumaxwell

@mburumaxwell: I lack insight into the management packages and am just the initial triage for this. We'll need assistance from @ArthurMa1978 and team to resolve.

jsquire avatar Sep 18 '23 13:09 jsquire

Is there any news on this or timeline ? It is very annoying for us.

antoinechamot avatar Nov 16 '23 13:11 antoinechamot

Issue fixed, expected to ship in the next release.

HarveyLink avatar Jan 10 '24 07:01 HarveyLink

When is the next release please?

Shalin-AngloAmerican avatar Feb 08 '24 17:02 Shalin-AngloAmerican

Is there a workaround for this that can be used until the next release?

danzajork avatar Feb 20 '24 14:02 danzajork

Is there a workaround for this that can be used until the next release?

I was able to work around this using the REST API directly.

danzajork avatar Feb 20 '24 15:02 danzajork

Any idea on when this ships?

YannickBR avatar Feb 27 '24 15:02 YannickBR

Even though I see that this issue has been closed and merged, I am still seeing the deserialization problem with the execution data with Azure.ResourceManager 1.11.0 and Azure.ResourceMangaer.AppContainers 1.1.1. Please advise. To note, my workaround is to take the raw response of the Execution Response and use Newtonsoft to parse the JSON to get the values.

msoliver-dev avatar Mar 25 '24 19:03 msoliver-dev

Issue fixed, expected to ship in the next release.

Any news for the next release?

AttackOnMorty avatar May 30 '24 22:05 AttackOnMorty

@AttackOnMorty I created a quick and dirty workaround that fixes up the incorrectly parsed fields.

https://gist.github.com/WikkidEdd/daff060aa1b36fdab83213d96f6a557c

WikkidEdd avatar May 31 '24 07:05 WikkidEdd