refactor(hosting): shared base for the PDS container resources #116

Closed
opened 2026-09-24 12:28:56 +00:00 by Grandiras · 0 comments
Owner

Part of the v0.7.0 update cycle. Removes duplication in ATProtoNet.Aspire.Hosting and keeps every feature.

Scope

  • Introduce a shared abstract base for AtProtoPdsContainerResource and AtProtoTranquilPdsContainerResource: HttpEndpointName, HealthCheckPath, Hostname, JwtSecretParameter, ConnectionStringExpression.
  • Replace the duplicated method pairs with generic With* extensions on the base: WithHostname ×2, WithJwtSecret, the bind-mount/volume setters, the clear-mounts helper, and project wiring (WithAtProtoPds / WithAtProtoTranquilPds share one implementation). Callers stay source-compatible; the binary break is acceptable.
  • Keep the 18 environment-variable convenience methods (WithPlcUrl, WithCrawlers, …) and Tranquil support. This is a consolidation, not a feature removal.
  • Tests: turn the parallel Pds/Tranquil test pairs into theories over the flavour where they test shared behaviour. Share GetEnvironmentAsync / PublishModeBuilder helpers. The Aspire manifest test in CI must keep passing.

Acceptance

  • Behaviour is identical: the same environment, mounts, endpoints and manifest output for both flavours.
  • CHANGELOG: Changed, plus a Breaking changes line if binary signatures move to the base type.
Part of the v0.7.0 update cycle. Removes duplication in `ATProtoNet.Aspire.Hosting` and keeps every feature. ## Scope - [ ] Introduce a shared abstract base for `AtProtoPdsContainerResource` and `AtProtoTranquilPdsContainerResource`: `HttpEndpointName`, `HealthCheckPath`, `Hostname`, `JwtSecretParameter`, `ConnectionStringExpression`. - [ ] Replace the duplicated method pairs with generic `With*` extensions on the base: `WithHostname` ×2, `WithJwtSecret`, the bind-mount/volume setters, the clear-mounts helper, and project wiring (`WithAtProtoPds` / `WithAtProtoTranquilPds` share one implementation). Callers stay source-compatible; the binary break is acceptable. - [ ] **Keep** the 18 environment-variable convenience methods (`WithPlcUrl`, `WithCrawlers`, …) and Tranquil support. This is a consolidation, not a feature removal. - [ ] Tests: turn the parallel Pds/Tranquil test pairs into theories over the flavour where they test shared behaviour. Share `GetEnvironmentAsync` / `PublishModeBuilder` helpers. The Aspire manifest test in CI must keep passing. ## Acceptance - Behaviour is identical: the same environment, mounts, endpoints and manifest output for both flavours. - CHANGELOG: `Changed`, plus a `Breaking changes` line if binary signatures move to the base type.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Grandiras/ATProto.NET#116
No description provided.