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

Feature Flag productCatalogFailure raising errors on Recommendation Service #1710

Closed
julianocosta89 opened this issue Aug 28, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@julianocosta89
Copy link
Member

julianocosta89 commented Aug 28, 2024

Bug Report

Which version of the demo you are using?
52d315a

Symptom

What is the expected behavior?
When enabling the feature flag productCatalogFailure it is expected to have an error generated for GetProduct requests with product ID: OLJCESPC7Z.

image

What is the actual behavior?
Currently the error is also being trigged in requests for recommendation service whenever the product OLJCESPC7Z is returned in the recommendation list.

image

Reproduce

  1. Run the demo
  2. Enable the feature flag productCatalogFailure
  3. Navigate to http://localhost:8080/loadgen/and check the tab Failures.
@julianocosta89 julianocosta89 added the bug Something isn't working label Aug 28, 2024
@julianocosta89
Copy link
Member Author

The more I think about this the more I believe this is working as expected.
The recommendation and the checkout service get the product as well, so when they call GetProduct for product OLJCESPC7Z, the request fails.

This is a great example on how one error can impact multiple services and multiple endpoints.

Not sure if we should work this around for demo purposes.

@reese-lee I'd love to hear your opinion on this.

@julianocosta89
Copy link
Member Author

@reese-lee we have discussed that in the SIG meeting and it seems that this is expected.
The frontend does call the productCatalog once it get the list of products from recommendation service.

https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/frontend/pages/api/recommendations.ts#L21

@reese-lee
Copy link
Member

reese-lee commented Sep 9, 2024

@julianocosta89 I see, I'm trying to understand why recommendationservice isn't impacted by the issue. So, recommendationservice doesn't generate an error, because it's generating the list of products (including the problem product ID) that is then supplied to productcatalogservice when requested by frontend, and since the error doesn't occur until productcatalogservice attempts to give it to frontend, there's no issue for recommendationservice?

Edited to clarify: the span generated by recommendationservice when it executes get_product_list does not result in an error when returning a product list that contains product ID OLJCESPC7Z; the spans generated by frontend, checkoutservice, and productcatalogservice that contain that product ID do.

@julianocosta89
Copy link
Member Author

@reese-lee I must have lost this comment, sorry about that.
I was taking a look at it again and what happens is that the get_product_list returns a list of all product_ids.
Only when get_product with an specific <id> is called the error is raised.
That's the way the error was implemented initially.
Kinda showcasing an error when getting the details of a specific product.

Does that make sense?

@puckpuck
Copy link
Contributor

Closing this, as this error is being raised as expected.

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
Development

No branches or pull requests

3 participants