Skip to content

A 404 from raise event is inaccurately described as instance not found #30161

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

Closed
waltervos opened this issue May 1, 2023 · 6 comments · May be fixed by Azure/azure-functions-durable-python#435
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Functions needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Service This issue points to a problem in the service.

Comments

@waltervos
Copy link
Contributor

The python implementation has a hardcoded error message for a 404 on context.raise_event(...) that says that the instance ID could not be found. Today I noticed however that I'm getting the same error message when using an event name that contains (presumably) illegal characters. My guess is that the python implementation constructs an invalid URL when the event name contains characters such as slashes and/or asterixes and therefore the API returns a 404. The resulting error message is very confusing though.

From looking through the DurableOrchestrationClient code, no sanitizing of input is being performed. That looks to me like a good place to fix this issue, because why wouldn't an event name with special characters be permitted? The HTTP API docs say nothing about what is and isn't a valid event name.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 1, 2023
@waltervos
Copy link
Contributor Author

After thinking it over a little, I guess there are two seperate issues:

  1. DurableOrchestrationClient.raise_event() is a bit naive in the way that it handles HTTP errors. A 404 obviously has more error cases than just "No instance with ID {instance_id} found." It would be better if such methods used the actual HTTP reason phrase (which is available from aiohttp)
  2. Where allowed, functions preparing URLs should quote URL parts. One example being DurableOrchestrationClient._get_raise_event_url()

@xiangyan99 xiangyan99 added Mgmt This issue is related to a management-plane library. Functions and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels May 2, 2023
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label May 2, 2023
@github-actions
Copy link

github-actions bot commented May 2, 2023

Thank you for your feedback. This has been routed to the support team for assistance.

@PramodValavala-MSFT PramodValavala-MSFT added Service Attention Workflow: This issue is responsible by Azure service team. Service This issue points to a problem in the service. bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed Mgmt This issue is related to a management-plane library. CXP Attention question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 3, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @ahmedelnably @fabiocav.

@PramodValavala-MSFT
Copy link
Contributor

@waltervos Thanks for the feedback! I see that you are already working with the team concerned here. So, routing as such.

@lmazuel
Copy link
Member

lmazuel commented May 8, 2023

cc @vrdmr

@vrdmr
Copy link
Member

vrdmr commented May 8, 2023

Thanks, @lmazuel. This looks like a azure-functions-durable-python specific issue. @davidmrdavid - could you please take a look?

This is being discussed at Azure/azure-functions-durable-python#435.

@lmazuel lmazuel closed this as completed Aug 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Functions needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team. Service This issue points to a problem in the service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants