Skip to content

fix: give the correct connection string to customer micro service. - #75

Merged
NethmikaKekuu merged 1 commit into
mainfrom
fix/customer-db-issue
Apr 22, 2026
Merged

NethmikaKekuu merged 1 commit into
mainfrom
fix/customer-db-issue

Conversation

@san-rat

@san-rat san-rat commented Apr 22, 2026

Copy link
Copy Markdown
Owner

Description

This PR fixes the dev deployment gap that was causing customerservice-dev to fail activation in Azure Container Apps.

CustomerService was starting with its image-default local SQL connection string (localhost,1433) because the dev CD workflow did not configure ConnectionStrings__DefaultConnection for customerservice-dev. Since the service opens a database connection during startup, the container crashed before ingress could become healthy.

This change updates the dev workflow so customerservice-dev receives its Azure SQL connection string and required internal service endpoints during deployment, then adds direct smoke tests to catch future regressions.

Changes Made

  • Added a Configure CustomerService DB connection and service endpoints step to .github/workflows/cd-dev.yml
  • Set ConnectionStrings__DefaultConnection for customerservice-dev from customer-db-conn
  • Set ServiceEndpoints__ProductService=http://productservice-dev
  • Set ServiceEndpoints__OrderService=http://orderservice-dev
  • Added a Resolve CustomerService URL step in the dev workflow
  • Added direct CustomerService smoke tests for:
    • /health
    • /api/commerce/products?pageNumber=1&pageSize=1
  • Left live Azure resources unchanged; this PR only updates the deployment workflow

How to Test

  1. Trigger the CD Dev — Migrate, Build & Push all services, Deploy to Azure workflow.
  2. Confirm the new Configure CustomerService DB connection and service endpoints step succeeds.
  3. Confirm the new Resolve CustomerService URL step succeeds.
  4. Confirm the new Smoke tests — CustomerService direct endpoints step returns 200 for both endpoints.
  5. Verify customerservice-dev no longer starts with the fallback localhost,1433 SQL configuration and the revision becomes healthy after deployment.

Screenshots / Logs (if applicable)

  • Previous failure in Azure logs:
    • An error occurred using the connection to database 'insighterp_db' on server 'localhost,1433'
    • A network-related or instance-specific error occurred while establishing a connection to SQL Server

Related Issues / Tickets

  • Fixes the customerservice-dev activation failure caused by missing dev deployment configuration for CustomerService

@NethmikaKekuu
NethmikaKekuu merged commit d0db99f into main Apr 22, 2026
1 check passed
@san-rat
san-rat deleted the fix/customer-db-issue branch April 22, 2026 03:25
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.

2 participants