--- phase: "03-" plan: 02 subsystem: Gateway tags: [gateway, domain, yarp] dependency_graph: requires: - 03-gateway-cluster-entities provides: - Extended GwTenantRoute entity affects: - PlatformDbContext (needs update to remove deleted entity DbSets) tech_stack: added: - GwTenantRoute new fields (Methods, Hosts, Headers, LoadBalancingPolicy, AuthorizationPolicy, CorsPolicy, Transforms) patterns: - Domain-driven design entity extension key_files: created: [] modified: - Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwTenantRoute.cs deleted: - Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwTenant.cs - Fengling.Platform.Domain/AggregatesModel/GatewayAggregate/GwServiceInstance.cs decisions: - "GwTenant removed - use Platform.Tenant through TenantCode instead" - "GwServiceInstance removed - use GwCluster embedded Destination instead" - "Extended fields use nullable string types for optional YARP configuration" metrics: duration: ~5 minutes completed_date: "2026-03-03" --- # Phase 03 Plan 02: Gateway Route Update Summary ## One-Liner Extended GwTenantRoute with YARP matching fields and removed obsolete GwTenant/GwServiceInstance entities. ## Tasks Completed | Task | Name | Commit | Files | |------|------|--------|-------| | 1 | Extend GwTenantRoute fields | 3fbd9d0 | GwTenantRoute.cs | | 2 | Delete GwTenant entity | 3fbd9d0 | GwTenant.cs | | 3 | Delete GwServiceInstance entity | 3fbd9d0 | GwServiceInstance.cs | ## Summary Successfully completed the Domain layer refactoring for Gateway route entities: - **Extended GwTenantRoute** with new fields for full YARP routing capabilities: - `Methods`, `Hosts`, `Headers` - Route matching - `LoadBalancingPolicy`, `AuthorizationPolicy`, `CorsPolicy` - Policy configuration - `Transforms` - Request/Response transformations - **Removed obsolete entities**: - `GwTenant` - Should use Platform.Tenant aggregate with TenantCode reference instead - `GwServiceInstance` - Should use GwCluster embedded Destination collection instead ## Verification - Domain layer build: **PASSED** (0 errors, 2 warnings) - Infrastructure layer: **Requires update** - references to deleted entities need cleanup in subsequent plans ## Deviations from Plan ### Infrastructure Layer References **Found during:** Build verification **Issue:** Infrastructure layer (PlatformDbContext, InstanceStore, IInstanceStore) still references deleted entities GwTenant and GwServiceInstance **Impact:** Infrastructure layer will fail to build until updated **Decision:** Deferred to subsequent plan - the Domain layer changes are complete per plan scope **Files affected:** PlatformDbContext.cs, IInstanceStore.cs, InstanceStore.cs ## Notes - The deleted entities were part of the initial Gateway implementation but have been superseded by: - Platform.Tenant aggregate for tenant information - GwCluster aggregate's embedded Destination collection for service instances - Infrastructure layer cleanup should be handled in the next plan that covers Infrastructure updates