diff --git a/server/Tingle.Dependabot/Workflow/UpdateRunner.cs b/server/Tingle.Dependabot/Workflow/UpdateRunner.cs index 236f676b..0c41f804 100644 --- a/server/Tingle.Dependabot/Workflow/UpdateRunner.cs +++ b/server/Tingle.Dependabot/Workflow/UpdateRunner.cs @@ -175,13 +175,7 @@ public async Task DeleteAsync(UpdateJob job, CancellationToken cancellationToken var execution = executions.SingleOrDefault(); if (execution is null) return null; - // this is a temporary workaround - // TODO: remove this after https://github.com/Azure/azure-sdk-for-net/issues/38385 is fixed - var rr = await resource.GetContainerAppJobExecutionAsync(execution.Data.Name, cancellationToken); - var properties = JsonNode.Parse(rr.GetRawResponse().Content.ToString())!.AsObject()["properties"]!; - - //var status = execution.Data.Properties.Status.ToString() switch - var status = properties["status"]!.GetValue() switch + var status = execution.Data.Status.ToString() switch { "Succeeded" => UpdateJobStatus.Succeeded, "Running" => UpdateJobStatus.Running, @@ -200,8 +194,7 @@ public async Task DeleteAsync(UpdateJob job, CancellationToken cancellationToken } // get the period - //DateTimeOffset? start = execution.Data.Properties.StartTime, end = execution.Data.Properties.EndTime; - DateTimeOffset? start = properties["startTime"]?.GetValue(), end = properties["endTime"]?.GetValue(); + DateTimeOffset? start = execution.Data.StartOn, end = execution.Data.EndOn; // create and return state return new UpdateRunnerState(status, start, end);