Skip to content

Refactor: extract type ServiceBinding - #1423

Merged
josecelano merged 2 commits into
torrust:developfrom
josecelano:1422-refactor-extract-type-servicebinding
Mar 31, 2025
Merged

Refactor: extract type ServiceBinding#1423
josecelano merged 2 commits into
torrust:developfrom
josecelano:1422-refactor-extract-type-servicebinding

Conversation

@josecelano

@josecelano josecelano commented Mar 28, 2025

Copy link
Copy Markdown
Member

Refactor: extract type ServiceBinding.

It's the protocol + socket binding address for a service.

  • Protocols are only: udp, http and https (protocols used by the tracker
    now).
  • The port must be greater than zero (already assigned).
  • Any protocol and port combination is possible. For example: http
    protocol with a port different than 80.

@josecelano josecelano self-assigned this Mar 28, 2025
@josecelano
josecelano requested a review from da2ce7 March 28, 2025 17:14
@josecelano josecelano linked an issue Mar 28, 2025 that may be closed by this pull request
@codecov

codecov Bot commented Mar 28, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 94.20290% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.29%. Comparing base (7fef3e9) to head (29fa324).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
packages/primitives/src/service_binding.rs 92.30% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1423      +/-   ##
===========================================
+ Coverage    83.15%   83.29%   +0.14%     
===========================================
  Files          233      234       +1     
  Lines        17090    17147      +57     
  Branches     17090    17147      +57     
===========================================
+ Hits         14211    14283      +72     
+ Misses        2611     2593      -18     
- Partials       268      271       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano
josecelano marked this pull request as ready for review March 28, 2025 18:41
@josecelano
josecelano force-pushed the 1422-refactor-extract-type-servicebinding branch from 38cddf9 to 0071103 Compare March 28, 2025 18:47
@josecelano
josecelano marked this pull request as draft March 28, 2025 19:26
@josecelano

Copy link
Copy Markdown
Member Author

It's almost done. I only have to fix two tests because the service URL and the service check URL are not the same.

@josecelano
josecelano force-pushed the 1422-refactor-extract-type-servicebinding branch from 33e76d3 to a48e275 Compare March 31, 2025 09:21
@josecelano
josecelano force-pushed the 1422-refactor-extract-type-servicebinding branch from a48e275 to f08d620 Compare March 31, 2025 10:08
@josecelano
josecelano marked this pull request as ready for review March 31, 2025 10:08
Refactor: extract type `ServiceBinding`.

It's the protocol + socket binding address for a service.

- Protocols are only: udp, http and https (protocols used by the tracker
  now).
- The port must be greater than zero (already assigned).
- Any protocol and port combination is possible. For example: http
  protocol with a port different than 80.
@josecelano
josecelano force-pushed the 1422-refactor-extract-type-servicebinding branch from f08d620 to 29fa324 Compare March 31, 2025 10:09
@josecelano

Copy link
Copy Markdown
Member Author

ACK 29fa324

@josecelano
josecelano merged commit 9e74449 into torrust:develop Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: extract type ServiceBinding

1 participant