DurableTaskStorageException: Value for one of the query parameters specified in the request URI is invalid
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 335
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 6
Description
We are running in an issue with DTFx. Sometimes (and only in one region where our service is running - WestEurope), when enqueuing a queue message to start an orchestration, the queueing fails because of a bad parameter in the query string.
Sample query:
https://mystorage.queue.core.windows.net:443/devcenterjobs-control-00/messages?messagettl=%E2%88%921
Error and stacktrace:
> DurableTask.AzureStorage.Storage.DurableTaskStorageException: Value for one of the query parameters specified in the request URI is invalid.
> ---> Microsoft.WindowsAzure.Storage.StorageException: Value for one of the query parameters specified in the request URI is invalid.
> at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteAsyncInternal[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext, CancellationToken token)
> at DurableTask.AzureStorage.Storage.AzureStorageClient.WrapFunctionWithReturnType(Func`3 storageRequest, OperationContext context, CancellationToken cancellationToken) in /_/src/DurableTask.AzureStorage/Storage/AzureStorageClient.cs:line 158
> at DurableTask.AzureStorage.TimeoutHandler.ExecuteWithTimeout[T](String operationName, String account, AzureStorageOrchestrationServiceSettings settings, Func`3 operation, AzureStorageOrchestrationServiceStats stats, String clientRequestId)
> at DurableTask.AzureStorage.Storage.AzureStorageClient.MakeStorageRequest[T](Func`3 storageRequest, String accountName, String operationName, String clientRequestId, Boolean force) in /_/src/DurableTask.AzureStorage/Storage/AzureStorageClient.cs:line 149
Looking at the [code](https://github.com/Azure/durabletask/blob/eada7c1b64ea41edc78eb37133df46aefe294c1d/src/DurableTask.AzureStorage/Storage/Queue.cs#:~:text=TimeSpan%3F%20timeToLive,%23endif) here, the value of the messagettl param should always be -1 (as we are not using NET462). And looking at storage client [code](https://github.com/Azure/azure-storage-net/blob/cbe605f9faa01bfc3003d75fc5a16b2eaccfe102/Lib/ClassLibraryCommon/Queue/Protocol/QueueHttpRequestMessageFactory.cs#L187:~:text=public%20static%20StorageRequestMessage%20AddMessage,%7D), it should append it.
Any help to resolve this issue would be appreciated.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/DurableTask.AzureStorage/Storage/Queue.cs and trace how messagettl is passed into Azure Storage's QueueHttpRequestMessageFactory.cs. Use the reported WestEurope failure and the sample URI to investigate why the parameter becomes invalid, then verify that queue messages can be enqueued without the malformed query value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100