Skip to content

Fix shared UDP connection ID error limit configuration - #2087

Merged
josecelano merged 5 commits into
torrust:developfrom
josecelano:2083-move-max-connection-id-errors-per-ip-to-udp-tracker-server
Aug 24, 2026
Merged

josecelano merged 5 commits into
torrust:developfrom
josecelano:2083-move-max-connection-id-errors-per-ip-to-udp-tracker-server

Conversation

@josecelano

Copy link
Copy Markdown
Member

Summary

Move the v3 max_connection_id_errors_per_ip configuration from each UDP listener to the shared [udp_tracker_server] section. This reflects the deliberately shared BanService boundary and removes listener-order-dependent configuration semantics.

  • add the documented server-wide default of 10
  • reject the removed per-listener v3 field and cover default, round-trip, and two-listener schema behaviour
  • update generated v3 defaults and the v2-to-v3 migration guide

Validation

  • cargo test -p torrust-tracker-configuration
  • linter all
  • ./contrib/dev-tools/git/hooks/pre-commit.sh
  • cargo test --tests --benches --examples --workspace --all-targets --all-features
  • ./contrib/dev-tools/git/hooks/pre-push.sh

Follow-up

Production v3 consumer migration, including wiring the server-wide value through AppContainer and a cross-listener runtime test, remains explicitly assigned to #1980.

Related to #2083

Copilot AI lite review requested due to automatic review settings August 24, 2026 15:13
@josecelano josecelano self-assigned this Aug 24, 2026
@josecelano
josecelano force-pushed the 2083-move-max-connection-id-errors-per-ip-to-udp-tracker-server branch from 2b23be2 to c92f9e4 Compare August 24, 2026 15:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the v3 configuration contract for the UDP connection-ID error limit by moving max_connection_id_errors_per_ip from per-listener [[udp_trackers]] to the shared [udp_tracker_server] section, matching the shared BanService boundary and eliminating listener-order-dependent semantics.

Changes:

  • Remove the v3 per-listener max_connection_id_errors_per_ip field and add it as a server-wide field under UdpTrackerServer with default 10.
  • Add/adjust v3 configuration tests to cover defaulting, round-trip serialization, two-listener behavior, and rejection of the removed listener-scoped key.
  • Update v3 documentation/examples and the v2→v3 migration guide to reflect the new placement.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/configuration/src/v3_0_0/udp_tracker.rs Removes the listener-scoped error-limit field from the v3 UDP listener schema.
packages/configuration/src/v3_0_0/udp_tracker_server.rs Introduces the shared server-wide error-limit field, default, and targeted unit tests.
packages/configuration/src/v3_0_0/mod.rs Updates generated default TOML + adds configuration regression tests for the new contract and rejection behavior.
docs/issues/open/2083-1978-move-max-connection-id-errors-per-ip-to-udp-tracker-server.md Updates the subissue spec progress/evidence to match the implemented schema/test changes.
docs/issues/open/1978-configuration-overhaul-epic/configuration-v2-to-v3-migration.md Documents the new v3 placement (and renumbers steps) in the migration guide.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@josecelano

Copy link
Copy Markdown
Member Author

ACK 7f77edd

@josecelano

Copy link
Copy Markdown
Member Author

The failing Testing / Unit (nightly) check is caused by an upstream Clippy internal compiler error, not by this PR:

The maintainer indicates the fix is expected in nightly-2026-08-25: rust-lang/rust-clippy#17622 (comment)

Other checks remain green. I will temporarily bypass this known-broken nightly check to allow the PR to merge, then re-enable and rerun it once the fixed nightly is available. No workflow or product-code workaround is included in this PR.

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.82%. Comparing base (cf1c7a1) to head (7f77edd).
⚠️ Report is 62 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2087      +/-   ##
===========================================
+ Coverage    82.66%   83.82%   +1.15%     
===========================================
  Files          349      349              
  Lines        25732    26444     +712     
  Branches     25732    26444     +712     
===========================================
+ Hits         21271    22166     +895     
+ Misses        4151     3942     -209     
- Partials       310      336      +26     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano

Copy link
Copy Markdown
Member Author

ACK 7f77edd

@josecelano
josecelano merged commit bb29f2c into torrust:develop Aug 24, 2026
16 of 18 checks passed

This branch was previously deployed

1 inactive deployment
coverage — 7f77edd0 Deployed Aug 24, 2026 by josecelano via Generate Coverage Report #1806
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.

2 participants