Add Order Service — Place Order, CI/CD#81
Open
npcjake wants to merge 16 commits into
Open
Conversation
10 xUnit tests covering MapOrderTypeToItems (food/beverage/package/unknown), PlaceOrderAsync status logic (Assigned/Pending), and GeocodeAddressAsync fallback to downtown Spokane when Nominatim is unavailable or returns no results. Uses EF Core InMemory and fake HTTP handler — no external dependencies needed.
Replaced shared deliverybotsystem-sql (William-admin) with jacob-orderservice-sql2 where jtonani1 is AAD admin. deliverybot-order-service managed identity is already granted db_owner on OrderServiceDb. Also fixed BotNetApi URL placeholder in workflow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Issue #43 requires tests run before pushing image. Fails fast if any test fails. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #40, #43
Partial #41, #42
What's included
API endpoints (
OrderService/)POST /api/orders— Place an order. Geocodes the delivery address via Nominatim, selects an available bot from BotNetApi, saves to Azure SQL, publishes aRobotOrderAssignmentevent to therobot-inputEvent Hub.GET /api/orders/{id}— Get order status by order ID.GET /api/orders?customerId={id}— Order history.customerIdis formatted as"CustomerName:Phone"— whoever wires up the frontend history page will need to know this.Infrastructure
jacob-orderservice-sql2.database.windows.net / OrderServiceDb). Managed Identity auth —deliverybot-order-serviceis already granteddb_owner. Schema is created automatically on first startup viaDatabase.Migrate().CI/CD (
.github/workflows/orderservice-deploy.yml)mainwith changes underOrderService/**deliverybotcr.azurecr.io→ deploys todeliverybot-order-serviceContainer AppTests (
OrderService.Tests/)Known gaps
#41 and #42 are partially complete. The endpoints exist, are fully wired up, and return real data — the skeleton is done. However, order status will always reflect what it was at placement (
PendingorAssigned) because updating status requires consuming bot telemetry events from the Event Hub, which depends on the read model work (#64–#70). Once those events are being published, the Order Service will need a consumer to update order status toInTransitorDelivered.