Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/e2e-testing/manual/grafana-verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,8 @@ docker exec <grafana_container_id> env | grep GF_SECURITY_ADMIN_PASSWORD
This was a bug where the configured password wasn't being passed from the environment config to the `.env` file. It was fixed by updating:

- `UserInputs::with_tracker()` to accept optional Prometheus/Grafana configs
- `EnvironmentContext::with_working_dir_and_tracker()` to pass configs through
- `Environment::with_working_dir_and_tracker()` to accept configs
- `EnvironmentContext::create()` to pass configs through
- `Environment::create()` to accept configs
- Create handler to pass configs instead of using defaults

**Solution:**
Expand Down
33 changes: 17 additions & 16 deletions docs/issues/281-strengthen-domain-invariant-enforcement.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Issue**: [#281](https://github.com/torrust/torrust-tracker-deployer/issues/281)
**Type**: Refactor
**Status**: In Progress
**Status**: ✅ Completed

## Overview

Expand Down Expand Up @@ -34,27 +34,28 @@ See: [`docs/refactors/plans/strengthen-domain-invariant-enforcement.md`](../refa
- [x] `TryFrom<HttpApiSection> for HttpApiConfig`
- [x] Documentation and ADRs

### Phase 1: Tracker Configuration Types
### Phase 1: Tracker Configuration Types

- [ ] `UdpTrackerConfig` - validated constructor, private fields, getters
- [ ] `HttpTrackerConfig` - validated constructor, private fields, getters
- [ ] `HealthCheckApiConfig` - validated constructor, private fields, getters
- [ ] `TryFrom` implementations for each DTO section
- [x] `UdpTrackerConfig` - validated constructor, private fields, getters
- [x] `HttpTrackerConfig` - validated constructor, private fields, getters
- [x] `HealthCheckApiConfig` - validated constructor, private fields, getters
- [x] `TryFrom` implementations for each DTO section

### Phase 2: Cross-Cutting Invariants
### Phase 2: Cross-Cutting Invariants

- [ ] `TrackerCoreConfig` - database configuration validation
- [ ] `TrackerConfig` - validates at construction (socket conflicts)
- [ ] `UserInputs` - validated constructor (Grafana requires Prometheus)
- [x] `TrackerCoreConfig` - database configuration validation
- [x] `TrackerConfig` - validates at construction (socket conflicts)
- [x] `UserInputs` - validated constructor (Grafana requires Prometheus)
- [x] `HttpsConfig` - validated constructor (email validation)

## Acceptance Criteria

- [ ] All domain configuration types use validated constructors
- [ ] All fields are private with getter methods
- [ ] All types implement custom `Deserialize` with validation
- [ ] All DTO→Domain conversions use `TryFrom` trait
- [ ] Validation logic moved from application to domain layer
- [ ] Pre-commit checks pass: `./scripts/pre-commit.sh`
- [x] All domain configuration types use validated constructors
- [x] All fields are private with getter methods
- [x] All types implement custom `Deserialize` with validation
- [x] All DTO→Domain conversions use `TryFrom` trait
- [x] Validation logic moved from application to domain layer
- [x] Pre-commit checks pass: `./scripts/pre-commit.sh`

## Contributing Guide

Expand Down
Loading
Loading