Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect error message in DurableOrchestrationClient.terminate() #430

Closed
kogad opened this issue Mar 29, 2023 · 0 comments · Fixed by #431
Closed

Incorrect error message in DurableOrchestrationClient.terminate() #430

kogad opened this issue Mar 29, 2023 · 0 comments · Fixed by #431
Labels
bug Something isn't working

Comments

@kogad
Copy link
Contributor

kogad commented Mar 29, 2023

🐛 Describe the bug

DurableOrchestrationClient.terminate() throws following exception when specified non-existent instance_id.

[2023-03-29T13:32:06.034Z] Exception: Exception: <function DurableOrchestrationClient.terminate.<locals>.<lambda>.<locals>.<lambda> at 0x7fac48898d30>
[2023-03-29T13:32:06.035Z] Stack:   File "/usr/lib/azure-functions-core-tools-4/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 444, in _handle__invocation_request
[2023-03-29T13:32:06.035Z]     call_result = await self._run_async_func(
[2023-03-29T13:32:06.036Z]   File "/usr/lib/azure-functions-core-tools-4/workers/python/3.9/LINUX/X64/azure_functions_worker/dispatcher.py", line 697, in _run_async_func
[2023-03-29T13:32:06.036Z]     return await ExtensionManager.get_async_invocation_wrapper(
[2023-03-29T13:32:06.036Z]   File "/usr/lib/azure-functions-core-tools-4/workers/python/3.9/LINUX/X64/azure_functions_worker/extension.py", line 147, in get_async_invocation_wrapper
[2023-03-29T13:32:06.036Z]     result = await function(**args)
[2023-03-29T13:32:06.036Z]   File "/home/foo/TestExceptionWhenTerminate/__init__.py", line 8, in main
[2023-03-29T13:32:06.036Z]     await client.terminate("dummyinstanceid", "foo")
[2023-03-29T13:32:06.036Z]   File "/home/foo/.venv/lib/python3.9/site-packages/azure/durable_functions/models/DurableOrchestrationClient.py", line 481, in terminate
[2023-03-29T13:32:06.036Z]     raise Exception(error_message)

🤔 Expected behavior

The error message should be like No instance with ID 'dummyinstanceid' found.

Steps to reproduce

What Durable Functions patterns are you using, if any?

Durable Functions HTTP starter

Any minimal reproducer we can use?

The following code reproduces this bug:

import azure.durable_functions as df
import azure.functions as func


async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
    client = df.DurableOrchestrationClient(starter)

    await client.terminate("dummyinstanceid", "foo")

    return func.HttpResponse(status_code=200)

Are you running this locally or on Azure?

I am running this locally with following versions.

azure-functions==1.13.3
azure-functions-durable==1.2.2

If deployed to Azure

We have access to a lot of telemetry that can help with investigations. Please provide as much of the following information as you can to help us investigate!

  • Timeframe issue observed:
  • Function App name:
  • Function name(s):
  • Azure region:
  • Orchestration instance ID(s):
  • Azure storage account name:

If you don't want to share your Function App or storage account name GitHub, please at least share the orchestration instance ID. Otherwise it's extremely difficult to look up information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants