Skip to content

[BUG] - ACA Jobs - Stopping Job .Net SDK throwing The requested operation requires an element of type 'Object', but the target element has type 'String'. #44806

Open
@rahulsingii

Description

@rahulsingii

Library name and version

Azure.ResourceManager.AppContainers 1.2.0

Describe the bug

I have a simple container job which is triggered based on azure service bus. I am successfully able to stop the job replica using the command line. I then tried stopping it through the .Net SDK following the sample mentioned in documentation. It is stopping the job but throwing exception in the final method:-

await containerAppJobExecution.StopExecutionJobAsync(WaitUntil.Completed);

Exception Message -

The requested operation requires an element of type 'Object', but the target element has type 'String'.

Stack Trace -

at System.Text.Json.ThrowHelper.ThrowJsonElementWrongTypeException(JsonTokenType expectedType, JsonTokenType actualType)
at System.Text.Json.JsonDocument.TryGetNamedPropertyValue(Int32 index, ReadOnlySpan1 propertyName, JsonElement& value) at System.Text.Json.JsonElement.TryGetProperty(String propertyName, JsonElement& value) at Azure.Core.NextLinkOperationImplementation.IsFinalState(Response response, HeaderSource headerSource, Nullable1& failureState, String& resourceLocation)
at Azure.Core.NextLinkOperationImplementation.Create(HttpPipeline pipeline, RequestMethod requestMethod, Uri startRequestUri, Response response, OperationFinalStateVia finalStateVia, Boolean skipApiVersionOverride, String apiVersionOverrideValue)
at Azure.ResourceManager.AppContainers.AppContainersArmOperation..ctor(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response, OperationFinalStateVia finalStateVia, Boolean skipApiVersionOverride, String apiVersionOverrideValue)
at Azure.ResourceManager.AppContainers.ContainerAppJobExecutionResource.d__18.MoveNext()

Expected behavior

Job is stopping but SDK shouldn't throw exception.

Actual behavior

Exception is thrown.

Reproduction Steps

  1. Create the container app job provided in the sample.
  2. Try stopping a particular job replica using the .Net SDK.

Environment

Project version - .Net 8

Metadata

Metadata

Assignees

Labels

Container InstancesMgmtThis issue is related to a management-plane library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions