Repository navigation
Description
Part of EPIC: #1978 — Configuration Overhaul (schema v3.0.0)
EPIC position: Subissue #9 of 9 — must be last. Depends on ALL other subissues being complete.
Spec: docs/issues/drafts/configuration-overhaul-final-cleanup.md
Goal
After all v3 schema changes are implemented, perform the final cleanup:
- Migrate all consumers from global re-exports (
pub type Core = v2_0_0::core::Core) to explicit versioned imports (use torrust_tracker_configuration::v3_0_0::core::Core) - Remove the global re-exports from
packages/configuration/src/lib.rs - Remove the crate-root
packages/configuration/src/logging.rs(now duplicated insidev2_0_0/andv3_0_0/) - Apply any other cleanup discovered during the EPIC implementation
Background
The packages/configuration/src/lib.rs currently re-exports all v2 types as global aliases. These re-exports silently couple consumers to a specific schema version. When the EPIC switches the default to v3, consumers that use torrust_tracker_configuration::Core would silently get a different type — potentially breaking at compile time in confusing ways.
The decision is to remove all global re-exports and force consumers to import from explicit versioned paths. This is a breaking change appropriate for the major version bump accompanying this EPIC.
Scope
In Scope
- Migrate all ~30 consumer files from global re-exports to explicit
v3_0_0imports - Remove global type aliases from
packages/configuration/src/lib.rs - Remove crate-root
packages/configuration/src/logging.rs - Ensure all tests pass after migration
- Any additional cleanup items discovered during EPIC implementation
Out of Scope
- Removing
v2_0_0/module (it stays deprecated for backward compatibility) - Changes to the v3 schema itself (already done in previous subissues)
Implementation Plan
| ID | Task | Notes |
|---|---|---|
| T1 | Migrate all consumer imports to explicit v3_0_0 paths |
~30 files; see Consumer Migration Map in spec |
| T2 | Remove global type aliases from lib.rs |
pub type Configuration = ... etc. |
| T3 | Remove crate-root logging.rs |
Already copied into v2_0_0/ and v3_0_0/ |
| T4 | Remove pub mod logging; from lib.rs |
Or redirect to versioned module if needed |
| T5 | Apply any additional cleanup discovered during EPIC | Document in progress log |
| T6 | Run linter all and full test suite |
Acceptance Criteria
- All consumer imports use explicit
v3_0_0paths (no global re-export usage remains) - Global type aliases removed from
packages/configuration/src/lib.rs - Crate-root
packages/configuration/src/logging.rsremoved - All tests pass with the new import paths
-
v2_0_0module remains available (deprecated but not removed) -
linter allexits with code0
Activity
docs(configuration): address Copilot PR review comments
docs(configuration): address Copilot PR review comments
Merge #1982: docs(configuration): add Configuration Overhaul EPIC spe…
feat(configuration): copy v2_0_0 schema to v3_0_0 as baseline (torrus…
Merge #1999: feat(configuration): copy v2_0_0 schema to v3_0_0 as bas…
Merge #2005: fix(configuration): correct TLS naming in v3 schema
Merge #2014: feat(configuration): move v3 network settings per tracke…
docs(issues): start #1417; mark #1640 done in EPIC
Merge #2029: feat(udp): add IP-ban cleanup configuration and job
test(udp-server): add disabled-policy scenario group tests (T8) (torr…
docs(epic): mark subissue 7 as IN_REVIEW (PR torrust#2032)
3 remaining items
Merge #2037: feat(configuration): add configurable trace style and re…
Merge #2063: feat(http): validate announce query IP overrides
josecelano commentedon Aug 21, 2026
Planning update: #1980 follows the preceding API-token secrecy work in #2079 and #1490 v3 database decomposition. #2079 establishes the
Secret<String>convention for API tokens; #1490 uses it for the new isolated v3 database password.\n\nFor implementation planning, the Git-tracked specification is the source of truth:docs/issues/open/1980-1978-configuration-overhaul-final-cleanup.md. The GitHub issue body is informational and may be stale.Merge #2078: docs(issues): replan database secret handling (#1490)
Merge #2085: docs(issues): add #2083 UDP error-limit specification
Merge #2084: feat(configuration): decompose v3 database configuration
docs(issues): record torrust#1980 UDP wiring handoff
Merge #2087: Fix shared UDP connection ID error limit configuration
Merge #2098: docs(configuration): define optional persistence activat…
Merge #2099: feat(configuration): make v3 persistence optional
Merge #2103: feat(configuration): activate v3 runtime configuration
josecelano commentedon Aug 27, 2026
Implemented via #2103
Merge #2108: docs(issues): add specification for #2107