-
Notifications
You must be signed in to change notification settings - Fork 42
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
Tracker Checker: check UDP trackers #664
Tracker Checker: check UDP trackers #664
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #664 +/- ##
===========================================
- Coverage 73.71% 73.05% -0.66%
===========================================
Files 138 143 +5
Lines 9065 9164 +99
===========================================
+ Hits 6682 6695 +13
- Misses 2383 2469 +86 ☔ View full report in Codecov by Sentry. |
aabfedb
to
82ec491
Compare
82ec491
to
7225dbe
Compare
The output for the UDP tracker checks are now the same as the HTTP tracker checks. But not implemented yet (TODO). ```output Running checks for trackers ... UDP trackers ... ✓ - Announce at 127.0.0.1:6969 is OK ✓ - Scrape at 127.0.0.1:6969 is OK HTTP trackers ... ✓ - Announce at http://127.0.0.1:7070/ is OK (TODO) ✓ - Scrape at http://127.0.0.1:7070/ is OK (TODO) Health checks ... ✓ - Health API at http://127.0.0.1:1313/health_check is OK ```
…eck UDP servers It will be used in teh Tracker Checker too.
for serialization to JSON.
ce9e2e8
to
1b92b77
Compare
It allows simplifying the wasy we build InfoHashes from hex strings: ```rust let info_hash = InfoHash(hex!("9c38422213e30bff212b30c360d26f9a02136422")); // # DevSkim: ignore DS173237 ```
This is the first working implementation. WIP. TODO: - Refactor: reorganize code: big functions, etc. - Bugs: if the UDP server is down the checker waits forever. Probably there is a missing timeout for the connection request. And in general for all requests.
The generic UDP client does not have timeouts. When the server is down it waits forever for responses. This client has been using only for testing where the server was always up, but now it's using in production code by the Tracker Checker. For the time being, I keep the panicking behavior of the UdpClient when something is wrong. However we should return an error when the operation times out. For the Tracker Checker, it means that when the checker can't connect to a UDP server the checker is going to panic after 5 seconds. That is not the intended behavior for the checker. It should always return a full reprot of all checks. In order to implement that behavior we need to change the UdpClient to return errors. Since that's a bug refactor I open a new issue.
ACK 873f98d |
Hi @da2ce7 there is still a lot to improve but I want to merge this PR asap because this version runs all the checks: HTTP tracker, UDP Tracker and Health Checks. This PR adds the UDP checks. We are running the checker in the E2E tests and this ensures that the UDP service is working correctly. I will open a new epic issue with all the improvements/changes we can make in the short and long term. |
Add checks for UDP trackers to the Tracker Checker.
The output will look like the following:
See subtasks in #639