-
Notifications
You must be signed in to change notification settings - Fork 20
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
Configuration overhaul: version 2 for the configuration toml file (breaking changes) #631
Merged
josecelano
merged 9 commits into
torrust:develop
from
josecelano:591-configuration-overhaul-version-2-for-the-configuration-toml-file-breaking-changes
Jun 13, 2024
Merged
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
9 tasks
Normalize TrackerMode enum to use the same values as in the Tracker. ```rust pub enum TrackerMode { /// Will track every new info hash and serve every peer. #[serde(rename = "public")] Public, /// Will only track whitelisted info hashes. #[serde(rename = "listed")] Listed, /// Will only serve authenticated peers #[serde(rename = "private")] Private, /// Will only track whitelisted info hashes and serve authenticated peers #[serde(rename = "private_listed")] PrivateListed, } ``` That will enable to use the TrackerMode defined in https://crates.io/crates/torrust-tracker-primitives for TrackerMode in the future when a new version of that crate is released.
fd0814c
to
12010f1
Compare
Old: ```toml log_level = "info" [website] name = "Torrust" ``` New: ```toml [logging] log_level = "info" [website] name = "Torrust" ``` And the value is not Optional anymore. It was a Optional<LogLevel> but when it was None it defaulted to LogLevel::Info. In practice that means is mandatory but with the `Info` default value.
49c964b
to
50ebb9a
Compare
…iguration From: ```toml [auth] email_on_signup = "Optional" max_password_length = 64 min_password_length = 6 secret_key = "MaxVerstappenWC2021" ``` To: ```toml [auth] email_on_signup = "Optional" secret_key = "MaxVerstappenWC2021" [auth.password_constraints] max_password_length = 64 min_password_length = 6 ```
7124d58
to
cd8248a
Compare
From: ```toml [mail] email_verification_enabled = false from = "example@email.com" password = "" port = 25 reply_to = "noreply@email.com" server = "" username = "" ``` To: ```toml [mail] email_verification_enabled = false from = "example@email.com" reply_to = "noreply@email.com" [mail.smtp] port = 25 server = "" [mail.smtp.credentials] password = "" username = "" ```
not only the port. Old: ```toml [net] port = 3001 ``` New: ```toml [net] bind_address = "0.0.0.0:3001" ```
…ly the port Old: ```toml [net] port = 3001 ``` New: ```toml [net] bind_address = "0.0.0.0:3001" ```
We should produce always the same TOML file from the same configuration deterministically.
ACK 35a125e |
This was referenced Jun 13, 2024
This was referenced Jun 13, 2024
josecelano
added a commit
to torrust/torrust-index-gui
that referenced
this pull request
Jun 13, 2024
d2343f6 feat: [#574] update Index config files (Jose Celano) Pull request description: The Index has introduced some [breaking changes in the TOML config files](torrust/torrust-index#631). ACKs for top commit: josecelano: ACK d2343f6 Tree-SHA512: f29fcbb1ef36047e44f27295066c1564e86009b343f76105c561bd68affc2e297b91b244269d9842242e744dff769e6eafa796c922ca114d4e237419335e8dde
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.
A set of breaking changes in the TOML config file to improve readability and validation.
Subtasks
TrackerMode
enum to use the same values as the Tracker.auth::email_on_signup
config option variants.auth::email_on_signup::None
variant toauth::email_on_signup::Ingored
.log_lovel
option in the new sectionlogging
and make it mandatory withinfo
default value.auth
).mail
).net
).Notes
base_url
(sectionnet
) already exists in the current version. It's not changed in the new version. It's optional. If it's not present it uses the request headers to get the current host.Current toml version
New toml version