dev: extract tls optional before TLS setup (supersedes #1429)#1735
Merged
josecelano merged 1 commit intotorrust:developfrom May 7, 2026
Merged
Conversation
a780564 to
9723099
Compare
There was a problem hiding this comment.
Pull request overview
This PR supersedes #1429 by updating the TLS setup flow so make_rust_tls is only invoked after unwrapping the optional TLS configuration at call sites, and by changing make_rust_tls to accept a concrete TslConfig reference.
Changes:
- Updated
make_rust_tlsto take&TslConfiginstead of&Option<TslConfig>. - Updated tracker job and server/environment call sites to unwrap
Option<TslConfig>before callingmake_rust_tls. - Adjusted axum-server TLS unit tests to match the new
make_rust_tlssignature.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/bootstrap/jobs/tracker_apis.rs | Unwraps optional TLS config before calling make_rust_tls when starting the Tracker API job. |
| src/bootstrap/jobs/http_tracker.rs | Unwraps optional TLS config before calling make_rust_tls when starting the HTTP tracker job. |
| packages/axum-server/src/tsl.rs | Changes make_rust_tls signature to accept &TslConfig and updates tests accordingly. |
| packages/axum-rest-tracker-api-server/src/server.rs | Updates test TLS setup to unwrap optional TLS config before calling make_rust_tls. |
| packages/axum-rest-tracker-api-server/src/environment.rs | Updates environment initialization TLS setup to unwrap optional TLS config before calling make_rust_tls. |
| packages/axum-http-tracker-server/src/server.rs | Updates test TLS setup to unwrap optional TLS config before calling make_rust_tls. |
| packages/axum-http-tracker-server/src/environment.rs | Updates environment initialization TLS setup to unwrap optional TLS config before calling make_rust_tls. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1735 +/- ##
===========================================
+ Coverage 79.60% 79.64% +0.03%
===========================================
Files 368 368
Lines 27049 27057 +8
Branches 27049 27057 +8
===========================================
+ Hits 21532 21549 +17
+ Misses 5238 5227 -11
- Partials 279 281 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- extract optional TLS config before TLS setup\n- update bootstrap job call sites to pass concrete TslConfig references\n- preserve behavior when TLS is not configured
9723099 to
ddb4cfb
Compare
Member
Author
|
ACK ddb4cfb |
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.
Summary
developmake_rust_tlsreceive a concreteTslConfigmake_rust_tlsWhy
PR #1429 no longer applies cleanly to current
develop. This PR carries the same behavioral intent while resolving code drift in current call sites.Validation
cargo test -p torrust-axum-server -p torrust-axum-http-tracker-server -p torrust-axum-rest-tracker-api-server