-
Notifications
You must be signed in to change notification settings - Fork 44
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
Config overhaul: improve admin experience #941
Merged
josecelano
merged 4 commits into
torrust:develop
from
josecelano:935-config-overhaul-improve-admin-experience
Jul 1, 2024
Merged
Config overhaul: improve admin experience #941
josecelano
merged 4 commits into
torrust:develop
from
josecelano:935-config-overhaul-improve-admin-experience
Jul 1, 2024
Conversation
This file contains 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
Member
josecelano
commented
Jul 1, 2024
•
edited
Loading
edited
- Add a warning when the configuration does not enable any service (UDP tracker, HTTP tracker, or tracker API). It does not make sense to run the app without services enabled.
- Write the final used config to the logs when the tracker starts. We are only writing the config values when the source is an env var. We should do it always and print out the final configuration after merging sources (defaults -> TOML file -> env vars).
That migth be a config error.
- No '.' full stop at the end. - Start message wirh uppercase.
We will print to logs the final configuration used to run the tracker (after Figment processes all sources): ```output Loading extra configuration from file: `storage/tracker/etc/tracker.toml` ... 2024-07-01T15:29:09.785334Z INFO torrust_tracker::bootstrap::logging: Logging initialized 2024-07-01T15:29:09.785862Z INFO torrust_tracker::bootstrap::app: Configuration: { "logging": { "log_level": "info" }, "core": { "announce_policy": { "interval": 120, "interval_min": 120 }, "database": { "driver": "Sqlite3", "path": "./storage/tracker/lib/database/sqlite3.db" }, "inactive_peer_cleanup_interval": 600, "listed": false, "net": { "external_ip": "0.0.0.0", "on_reverse_proxy": false }, "private": true, "tracker_policy": { "max_peer_timeout": 900, "persistent_torrent_completed_stat": false, "remove_peerless_torrents": true }, "tracker_usage_statistics": true }, "udp_trackers": null, "http_trackers": null, "http_api": null, "health_check_api": { "bind_address": "127.0.0.1:1313" } } 2024-07-01T15:29:09.785879Z WARN torrust_tracker::app: No services enabled in configuration 2024-07-01T15:29:09.785920Z INFO torrust_tracker::app: No UDP blocks in configuration 2024-07-01T15:29:09.785923Z INFO torrust_tracker::app: No HTTP blocks in configuration 2024-07-01T15:29:09.785924Z INFO torrust_tracker::app: No API block in configuration 2024-07-01T15:29:09.785941Z INFO HEALTH CHECK API: Starting on: http://127.0.0.1:1313 2024-07-01T15:29:09.786035Z INFO HEALTH CHECK API: Started on: http://127.0.0.1:1313 ```
We print to logs the final configuration used to run the tracker (after Figment processes all sources): ```output Loading extra configuration from file: `storage/tracker/etc/tracker.toml` ... 2024-07-01T15:29:09.785334Z INFO torrust_tracker::bootstrap::logging: Logging initialized 2024-07-01T15:29:09.785862Z INFO torrust_tracker::bootstrap::app: Configuration: { "logging": { "log_level": "info" }, "core": { "announce_policy": { "interval": 120, "interval_min": 120 }, "database": { "driver": "Sqlite3", "path": "./storage/tracker/lib/database/sqlite3.db" }, "inactive_peer_cleanup_interval": 600, "listed": false, "net": { "external_ip": "0.0.0.0", "on_reverse_proxy": false }, "private": true, "tracker_policy": { "max_peer_timeout": 900, "persistent_torrent_completed_stat": false, "remove_peerless_torrents": true }, "tracker_usage_statistics": true }, "udp_trackers": null, "http_trackers": null, "http_api": null, "health_check_api": { "bind_address": "127.0.0.1:1313" } } 2024-07-01T15:29:09.785879Z WARN torrust_tracker::app: No services enabled in configuration 2024-07-01T15:29:09.785920Z INFO torrust_tracker::app: No UDP blocks in configuration 2024-07-01T15:29:09.785923Z INFO torrust_tracker::app: No HTTP blocks in configuration 2024-07-01T15:29:09.785924Z INFO torrust_tracker::app: No API block in configuration 2024-07-01T15:29:09.785941Z INFO HEALTH CHECK API: Starting on: http://127.0.0.1:1313 2024-07-01T15:29:09.786035Z INFO HEALTH CHECK API: Started on: http://127.0.0.1:1313 ```
3244e53
to
397ef0f
Compare
ACK 397ef0f |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #941 +/- ##
===========================================
- Coverage 77.47% 77.41% -0.07%
===========================================
Files 183 183
Lines 9666 9674 +8
===========================================
Hits 7489 7489
- Misses 2177 2185 +8 ☔ View full report in Codecov by Sentry. |
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.