Description
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, Nullable
1& 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
- Create the container app job provided in the sample.
- Try stopping a particular job replica using the .Net SDK.
Environment
Project version - .Net 8