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

Config overhaul: split tracker mode #934

Merged

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Jul 1, 2024

Replace mode core config option with private and listed flags:

From:

[core]
mode = "public"
tracker_usage_statistics = true
inactive_peer_cleanup_interval = 600

To:

[core]
inactive_peer_cleanup_interval = 600
listed = false
private = false
tracker_usage_statistics = true

When you format a toml file with a linter it sorts the keys
alphabetically. It's good to have the same order in the code.

It's also a common practice for JSON. This helps to make serialization
deterministic.
@josecelano josecelano force-pushed the 932-config-overhaul-split-tracker-mode branch from 09731e5 to 195d87e Compare July 1, 2024 10:30
@josecelano josecelano added this to the v3.0.0 milestone Jul 1, 2024
@josecelano josecelano linked an issue Jul 1, 2024 that may be closed by this pull request
@josecelano josecelano added the Code Cleanup / Refactoring Tidying and Making Neat label Jul 1, 2024
@josecelano josecelano self-assigned this Jul 1, 2024
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 77.63158% with 17 lines in your changes missing coverage. Please review.

Project coverage is 77.47%. Comparing base (5f1fdbd) to head (b6b841d).

Files Patch % Lines
packages/configuration/src/v1/core.rs 81.48% 5 Missing ⚠️
src/core/mod.rs 80.00% 4 Missing ⚠️
src/lib.rs 0.00% 4 Missing ⚠️
packages/test-helpers/src/configuration.rs 66.66% 3 Missing ⚠️
src/app.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #934      +/-   ##
===========================================
+ Coverage    77.29%   77.47%   +0.18%     
===========================================
  Files          183      183              
  Lines         9689     9666      -23     
===========================================
  Hits          7489     7489              
+ Misses        2200     2177      -23     

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

…and `listed` flags

From:

```toml
[core]
mode = "public"
tracker_usage_statistics = true
inactive_peer_cleanup_interval = 600
```

To:

```toml
[core]
inactive_peer_cleanup_interval = 600
listed = false
private = false
tracker_usage_statistics = true
```
@josecelano josecelano force-pushed the 932-config-overhaul-split-tracker-mode branch from 195d87e to ca31c83 Compare July 1, 2024 11:26
@josecelano josecelano force-pushed the 932-config-overhaul-split-tracker-mode branch from b5d9ad8 to f61c7c3 Compare July 1, 2024 12:06
@josecelano josecelano marked this pull request as ready for review July 1, 2024 12:24
@josecelano josecelano requested a review from da2ce7 July 1, 2024 12:25
@josecelano
Copy link
Member Author

ACK b6b841d

@josecelano josecelano merged commit 5aad462 into torrust:develop Jul 1, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup / Refactoring Tidying and Making Neat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config overhaul: split tracker mode
1 participant