Skip to content

Add Product Deployment Precheck#356

Open
Wiesenwischer wants to merge 4 commits intofeature/deployment-precheck-domainfrom
feature/product-precheck
Open

Add Product Deployment Precheck#356
Wiesenwischer wants to merge 4 commits intofeature/deployment-precheck-domainfrom
feature/product-precheck

Conversation

@Wiesenwischer
Copy link
Copy Markdown
Owner

Summary

  • Extend deployment precheck to support product deployments (multiple stacks)
  • New backend endpoint POST /api/environments/{envId}/product-deployments/precheck orchestrates per-stack prechecks in parallel
  • ProductPrecheckPanel UI component with per-stack accordion view on the DeployProduct page
  • Deploy button disabled when any stack has precheck errors

Changes

Backend

  • ProductPrecheckResult domain value object with stack-level aggregation
  • RunProductPrecheckQuery MediatR handler: loads product, merges shared + per-stack variables, dispatches RunDeploymentPrecheckQuery per stack in parallel
  • ProductPrecheckEndpoint FastEndpoints endpoint

Frontend

  • runProductPrecheck() API client in @rsgo/core
  • useProductPrecheck hook for product precheck state management
  • ProductPrecheckPanel component (accordion per stack, errors/warnings expanded)
  • DeployProduct.tsx: hybrid trigger (auto-run on configure + re-check button)

Tests

  • 7 unit tests for ProductPrecheckResult aggregation
  • 10 unit tests for RunProductPrecheckHandler (variable merging, parallel execution, error handling, edge cases)
  • 3 integration tests for ProductPrecheckEndpoint

AMS UI Impact

  • @rsgo/core exports (useProductPrecheck, API types) are shared and immediately available
  • ProductPrecheckPanel UI component needs to be reimplemented in AMS repo with ConsistentUI (deferred)

Test plan

  • dotnet test — 2767 unit tests pass, 402 integration tests pass
  • TypeScript compilation clean
  • Manual: Deploy a product → precheck panel appears with per-stack results
  • Manual: Trigger a port conflict → deploy button is disabled
  • Manual: Re-check button works after fixing variables

Extend PLAN-deployment-precheck.md with product precheck support:
- Feature 8: Backend endpoint + MediatR handler for product precheck
- Feature 9: UI integration with useProductPrecheck hook + DeployProduct.tsx
- Feature 10: Unit, integration, and E2E tests for product precheck
Extend deployment precheck to support product deployments with multiple
stacks. The backend orchestrates per-stack prechecks in parallel via
MediatR and aggregates results. The UI auto-runs precheck on the
DeployProduct page and blocks deployment when any stack has errors.

Backend:
- ProductPrecheckResult domain value object with stack-level aggregation
- RunProductPrecheckQuery handler: loads product, merges variables,
  dispatches RunDeploymentPrecheckQuery per stack in parallel
- POST /api/environments/{envId}/product-deployments/precheck endpoint

Frontend:
- runProductPrecheck() API client in @rsgo/core
- useProductPrecheck hook for product precheck state management
- ProductPrecheckPanel component with per-stack accordion view
- DeployProduct.tsx: hybrid trigger (auto-run + re-check), deploy
  button disabled on errors

Tests:
- 7 unit tests for ProductPrecheckResult aggregation
- 10 unit tests for RunProductPrecheckHandler (variable merging,
  parallel execution, error handling, edge cases)
- 3 integration tests for ProductPrecheckEndpoint
@Wiesenwischer Wiesenwischer added this to the v0.59 milestone Apr 1, 2026
Bug fix: All precheck rules (PortConflict, ImageAvailability,
VolumeStatus, NetworkAvailability) now resolve ${VARIABLE} placeholders
in port mappings, image names, volume sources, and network names before
validation. Previously, unresolved placeholders like ${FRONTEND_PORT}
silently failed int.TryParse and port conflicts were never detected.

UX redesign: Precheck no longer auto-runs on the deploy page. Instead,
a "Run Precheck" button in the sidebar navigates to a dedicated precheck
results page (/deploy/:stackId/precheck, /deploy-product/:productId/precheck).
Deploy button is always enabled — precheck is advisory, not blocking.
Update E2E tests and screenshots to reflect the new precheck workflow:
- Run Precheck button in sidebar instead of auto-run
- Dedicated precheck results page instead of inline panel
- Deploy button always enabled (precheck is advisory)

New screenshots: run-button, results page, recheck, deploy-enabled.
Remove old screenshots from the auto-run inline flow.
Update DE + EN documentation with new step-by-step guide.
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.

1 participant