Skip to content

Demo Standardization Kit #292

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
wants to merge 7 commits into from
Closed

Demo Standardization Kit #292

wants to merge 7 commits into from

Conversation

vlussenburg
Copy link
Collaborator

@vlussenburg vlussenburg commented Jul 7, 2025

✨ PR Description

Purpose: Add order history functionality and API documentation to the e-commerce microservices system.

Main changes:

  • Added GET /api/orders/history endpoint with database persistence in OrderController
  • Implemented getOrderHistory() frontend function for retrieving and displaying user order history
  • Added Swagger documentation using swagger-jsdoc and swagger-ui-express to document API endpoints
  • Enhanced error handling in login process with specific error messages

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

@chris-ghyzel-linearb
Copy link

/gs review

Copy link

@gitstream-cm gitstream-cm bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ PR Review

The PR adds database persistence and order history functionality across multiple services. However, there are potential concurrency and transaction consistency issues that need attention.

2 issues detected:

🐞 Bug - Multiple threads can simultaneously access and modify the same file without synchronization, leading to data corruption or lost billing records.

Details: The file-based billing queue system lacks proper synchronization. Concurrent requests could corrupt the JSON file when multiple threads simultaneously read, modify, and write the same user's billing data.
File: services/billing-csharp/Controllers/BillingController.cs

🐞 Bug - Billing operation succeeds but order storage can fail independently, leaving the system in an inconsistent state where users are charged without corresponding order records.

Details: The order placement logic charges the user first, then attempts to store the order. If order storage fails, the user has been charged but no order record exists, creating an inconsistent state.
File: services/orders-java/src/main/java/com/example/orders/controller/OrderController.java

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants