[BUG] KustoDatabaseCollection CreateOrUpdateAsync returning ResourceNotFound - false failure
See original GitHub issueLibrary name and version
Azure.ResourceManager.Kusto 1.3.0
Describe the bug
when calling the KustoDatabaseCollection.CreateOrUpdateAsync with WaitUntil.Completed we are getting this exception: The resource with identifier ‘/subscriptions/**/resourceGroups/**/providers/Microsoft.Kusto/Clusters/**/Databases/**’ is not found. Status: 404 (Not Found) ErrorCode: ResourceNotFound
at Azure.Core.OperationInternal1.GetResponseFromState(OperationState
1 state)
at Azure.Core.OperationInternal1.<UpdateStatusAsync>d__20.MoveNext() at System.Threading.Tasks.ValueTask
1.get_Result()
at Azure.Core.OperationInternalBase.<UpdateStatusAsync>d__13.MoveNext()
at System.Threading.Tasks.ValueTask1.get_Result() at Azure.Core.OperationPoller.<WaitForCompletionAsync>d__11.MoveNext() at System.Threading.Tasks.ValueTask
1.get_Result()
at Azure.Core.OperationInternalBase.<WaitForCompletionResponseAsync>d__19.MoveNext()
at System.Threading.Tasks.ValueTask1.get_Result() at Azure.Core.OperationInternal
1.<WaitForCompletionAsync>d__19.MoveNext()
at System.Threading.Tasks.ValueTask1.get_Result() at Azure.Core.OperationInternal
1.<WaitForCompletionAsync>d__15.MoveNext()
at System.Threading.Tasks.ValueTask`1.get_Result()
at Azure.ResourceManager.Kusto.KustoDatabaseCollection.<CreateOrUpdateAsync>d__7.MoveNext()
but after waiting 1 minute, the database was actually successfully created!
Expected behavior
when WaitUntil.Completed is provided, the operation is expected to be awaited until the long-running operation has completed without unexpected errors.
Actual behavior
exception is thrown, but the operation is actually succeeded after waiting up to one additional minute.
Reproduction Steps
initialize ArmClient with token credentials and define the cluster resource identifier then :
var kustoClusterResource = new ArmClient(tokenCredentials).GetKustoClusterResource(clusterResourceIdentifier); await kustoClusterResource.GetKustoDatabases().CreateOrUpdateAsync(WaitUntil.Completed,databaseName,databaseData);
Environment
No response
Issue Analytics
- State:
- Created 5 months ago
- Comments:16 (7 by maintainers)
Top GitHub Comments
Hi everyone, This was an error on the Kusto backend side (unrelated to c# SDK client) Mostly affecting internal Microsoft consumers.
We are deploying a HF by the end of the week, fixing the issue
The root cause is from service response.
LRO is working like this:
From the log of @adelKhatib, it keeps polling of the operation status until it’s completed. And when it tries to get the created database back, it returns 404 from server side, which is not expected.
And the strange thing is, I did not get 404 after creation as mentioned above. Not sure what is causing different responses from server side.