Skip to content

refactor(http-protocol): decouple from udp-protocol#1839

Merged
josecelano merged 2 commits into
torrust:developfrom
josecelano:1834-decouple-http-protocol-from-udp-protocol
May 27, 2026
Merged

refactor(http-protocol): decouple from udp-protocol#1839
josecelano merged 2 commits into
torrust:developfrom
josecelano:1834-decouple-http-protocol-from-udp-protocol

Conversation

@josecelano
Copy link
Copy Markdown
Member

Summary

  • remove the torrust-tracker-udp-tracker-protocol dependency from packages/http-protocol
  • remove From<torrust_tracker_udp_tracker_protocol::AnnounceEvent> for Event from HTTP announce request parsing
  • keep HTTP announce event mappings via torrust-tracker-primitives::AnnounceEvent
  • update issue/EPIC tracking docs for SI-13 completion

Verification

  • cargo tree -p torrust-tracker-http-tracker-protocol --depth 1
  • rg "torrust_tracker_udp_tracker_protocol::" packages/http-protocol
  • cargo test -p torrust-tracker-http-tracker-protocol
  • cargo test -p torrust-tracker-http-tracker-core
  • cargo test -p torrust-tracker-axum-http-server
  • cargo build --workspace
  • linter all

Issue

Copilot AI review requested due to automatic review settings May 27, 2026 13:30
@josecelano josecelano self-assigned this May 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

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 removes the udp-protocol dependency edge from the HTTP protocol crate, keeping HTTP announce event mappings anchored on torrust-tracker-primitives::AnnounceEvent, and updates EPIC/issue tracking docs to mark SI-13 as complete.

Changes:

  • Removed torrust-tracker-udp-tracker-protocol from torrust-tracker-http-tracker-protocol dependencies.
  • Removed the HTTP Event conversion impl from torrust_tracker_udp_tracker_protocol::AnnounceEvent.
  • Updated SI-13 issue spec and EPIC tracking to reflect completion and updated dependency narrative.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/http-protocol/src/v1/requests/announce.rs Removes UDP→HTTP event conversion, leaving only primitives-based conversions.
packages/http-protocol/Cargo.toml Drops the torrust-tracker-udp-tracker-protocol dependency from the HTTP protocol crate.
docs/issues/open/1834-1669-13-decouple-http-protocol-from-udp-protocol.md Marks tasks/acceptance criteria/verification as DONE with evidence notes.
docs/issues/open/1669-overhaul-packages/EPIC.md Updates dependency narrative and marks SI-13 as completed in EPIC tracking.
Cargo.lock Removes the transitive lock entry for the dropped dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +242 to +243
`torrust-http-tracker-protocol` currently depends on
`torrust-tracker-primitives` and `torrust-udp-tracker-protocol`. The move can be
`torrust-tracker-primitives`. The move can be
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 1657e6e. The EPIC now consistently refers to torrust-tracker-http-tracker-protocol.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.83%. Comparing base (9ed12f8) to head (1657e6e).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1839      +/-   ##
===========================================
+ Coverage    77.80%   77.83%   +0.02%     
===========================================
  Files          380      380              
  Lines        28592    28585       -7     
  Branches     28592    28585       -7     
===========================================
+ Hits         22247    22249       +2     
+ Misses        6033     6023      -10     
- Partials       312      313       +1     

☔ View full report in Codecov by Sentry.
📢 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 1657e6e

@josecelano josecelano merged commit 6d90e1f into torrust:develop May 27, 2026
14 of 15 checks passed
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.

Decouple http-protocol from udp-protocol

2 participants