Closed
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #557 +/- ##
========================================
Coverage 77.71% 77.71%
========================================
Files 158 158
Lines 8711 8711
========================================
Hits 6770 6770
Misses 1941 1941 ☔ View full report in Codecov by Sentry. |
8accd9f to
38d81ee
Compare
Member
|
Relates to: #343 |
00c329c to
558c8c9
Compare
558c8c9 to
b2e22e7
Compare
b2e22e7 to
808a004
Compare
808a004 to
04c5cae
Compare
04c5cae to
b53a219
Compare
b53a219 to
186669f
Compare
186669f to
ac3004c
Compare
ac3004c to
ab4e10c
Compare
ab4e10c to
f545d29
Compare
da2ce7
added a commit
that referenced
this pull request
Jan 4, 2024
13140f6 dev: cleanup service bootstraping (Cameron Garnham) Pull request description: Extracted from: - #557 Closes #560 ACKs for top commit: da2ce7: ACK 13140f6 Tree-SHA512: 70eb31e6a0c8bb93c48ca90227763c33c4c90055cacb11bc4dfc73ab9813c0833bcdfb7c731b85169d7366774671cdf72e2cc91e51b1ce289708494fc90e4e54
f545d29 to
c92ca99
Compare
c92ca99 to
571c27f
Compare
ea992a8 to
e6809bd
Compare
207a1eb to
39170fd
Compare
39170fd to
d4b47b3
Compare
d4b47b3 to
53246e1
Compare
53246e1 to
274374e
Compare
274374e to
c47f548
Compare
c47f548 to
9d37ecc
Compare
9d37ecc to
dccfb22
Compare
josecelano
added a commit
that referenced
this pull request
Jan 17, 2024
3f0dcea dev: add tests to health check (Cameron Garnham) b310c75 dev: extract config from health check (Cameron Garnham) 3b49257 dev: extract config from core::tracker (Cameron Garnham) Pull request description: This is the first three commits from #557 It includes an significant improvement of the Heath Check logic, as it now takes the active port from the binding, instead of the configuration. ACKs for top commit: josecelano: ACK 3f0dcea Tree-SHA512: 5076583618bf68dd7fe016b55da5a14490be2ec4e3416efe7d3bcd27c73fedbe5a219cd9f5bcc62c526007d1ae17fab7323b2199aa14fd9542bbe52eba2b6b38
dccfb22 to
c7b28de
Compare
Member
|
Hi @da2ce7 I think in the past we have discussed having two types of configuration structs:
In the Index I've recently introduced a validation for the configuration: I wanted the application to fail if you use an invalid tracker configuration. In this case, you can't not have a public UDP tracker. We don't support it. I'm still using the same struct. For the time being, I've just added a validate function. /// # Errors
///
/// Will return an error if the configuration is invalid.
pub async fn validate(&self) -> Result<(), ValidationError> {
self.validate_tracker_config().await
}
/// # Errors
///
/// Will return an error if the `tracker` configuration section is invalid.
pub async fn validate_tracker_config(&self) -> Result<(), ValidationError> {
let settings_lock = self.settings.read().await;
let tracker_mode = settings_lock.tracker.mode.clone();
let tracker_url = settings_lock.tracker.url.clone();
let tracker_url = match parse_url(&tracker_url) {
Ok(url) => url,
Err(err) => {
return Err(ValidationError::InvalidTrackerUrl {
source: Located(err).into(),
})
}
};
if tracker_mode.is_close() && (tracker_url.scheme() != "http" && tracker_url.scheme() != "https") {
return Err(ValidationError::UdpTrackersInPrivateModeNotSupported);
}
Ok(())
} |
Member
|
Relates to: #790 |
Contributor
Author
|
closed by #401 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.