Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torrent Repository Work #690

Merged
merged 9 commits into from
Mar 25, 2024
Merged

Conversation

da2ce7
Copy link
Contributor

@da2ce7 da2ce7 commented Feb 9, 2024

This pull request is a major refactor of the torrent repository for the tracker. The code for the repository has been extracted and merged into a library package, along side it's benchmarking and testing code.

The supporting clock and time extent, and some other primitives have also been extracted, to avoid circular dependencies.

  • Basic Refactors
  • Selectable Torrent Repository Implementations
  • Move Torrent Repository into a Package
  • Use Criterion for Benchmarking Torrent Repository
  • Move Clock into a Package
  • Test Coverage for the Torrent Repository

Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: Patch coverage is 91.27590% with 80 lines in your changes are missing coverage. Please review.

Project coverage is 77.71%. Comparing base (3bd2a9c) to head (3414e2a).

Files Patch % Lines
packages/primitives/src/peer.rs 75.80% 15 Missing ⚠️
packages/clock/src/clock/stopped/mod.rs 84.09% 14 Missing ⚠️
packages/primitives/src/announce_event.rs 33.33% 10 Missing ⚠️
packages/primitives/src/info_hash.rs 92.30% 7 Missing ⚠️
packages/primitives/src/torrent_metrics.rs 45.45% 6 Missing ⚠️
src/core/mod.rs 92.00% 4 Missing ⚠️
src/lib.rs 75.00% 4 Missing ⚠️
packages/clock/src/clock/working/mod.rs 50.00% 3 Missing ⚠️
packages/configuration/src/lib.rs 25.00% 3 Missing ⚠️
src/servers/http/v1/handlers/announce.rs 76.92% 3 Missing ⚠️
... and 8 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #690      +/-   ##
===========================================
+ Coverage    74.06%   77.71%   +3.64%     
===========================================
  Files          145      158      +13     
  Lines         8958     8711     -247     
===========================================
+ Hits          6635     6770     +135     
+ Misses        2323     1941     -382     

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

@josecelano josecelano added the Needs Rebase Base Branch has Incompatibilities label Feb 22, 2024
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from 840af5b to 7bec6a3 Compare March 2, 2024 21:10
@da2ce7 da2ce7 removed the Needs Rebase Base Branch has Incompatibilities label Mar 2, 2024
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from f922e82 to 65bc3c1 Compare March 15, 2024 20:12
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from 65bc3c1 to 0d35075 Compare March 15, 2024 21:29
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from 087b785 to 9f107e7 Compare March 17, 2024 03:25
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from 7a10305 to d69731b Compare March 19, 2024 04:47
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from d69731b to 3dd693d Compare March 19, 2024 19:11
@da2ce7 da2ce7 force-pushed the 20240209_ordered_repo branch from 43283b7 to 3414e2a Compare March 25, 2024 04:29
@da2ce7 da2ce7 self-assigned this Mar 25, 2024
@da2ce7 da2ce7 marked this pull request as ready for review March 25, 2024 04:51
@da2ce7 da2ce7 requested a review from josecelano March 25, 2024 04:51
Copy link
Member

@josecelano josecelano left a comment

Choose a reason for hiding this comment

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

Hi @da2ce7

This is a lot of work and it was needed. Just a couple of generic comments:

  1. You could have created at least 3 different PRs: two of them to extract the new packages (clock and torrent-repository-xx) and another one for the rest (primitives). Just to avoid wasting time merging potential conflicts. For example, merging this PR before this one.
  2. There are things I would move to independent repos. Basically, the things that can be used in other repos not only the tracker.

But we can do that later. I've created a new issue from one of my old comments about this topic:

#753

Copy link
Member

Choose a reason for hiding this comment

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

Hi @da2ce7 why didn't you move the tests also to the torrust_tracker_primitives crate?

@josecelano
Copy link
Member

ACK 3414e2a

@josecelano josecelano merged commit 07a17b0 into torrust:develop Mar 25, 2024
13 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.

2 participants