question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] KustoDatabaseCollection CreateOrUpdateAsync returning ResourceNotFound - false failure

See original GitHub issue

Library 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(OperationState1 state) at Azure.Core.OperationInternal1.<UpdateStatusAsync>d__20.MoveNext() at System.Threading.Tasks.ValueTask1.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.ValueTask1.get_Result() at Azure.Core.OperationInternalBase.<WaitForCompletionResponseAsync>d__19.MoveNext() at System.Threading.Tasks.ValueTask1.get_Result() at Azure.Core.OperationInternal1.<WaitForCompletionAsync>d__19.MoveNext() at System.Threading.Tasks.ValueTask1.get_Result() at Azure.Core.OperationInternal1.<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:closed
  • Created 5 months ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelshikh07commented, May 3, 2023

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

1reaction
live1206commented, Apr 25, 2023

The root cause is from service response.

LRO is working like this:

  • Keep polling to get completed status of the operation
  • Get the created resource

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found