Skip to content

Conversation

chlins
Copy link
Member

@chlins chlins commented Aug 25, 2025

This pull request adds support for managing and tracking a new ProxyPort field across the client, manager, and scheduler components. The changes ensure that the proxy port is properly initialized, propagated, and tested throughout the system, enabling enhanced network configuration and host management.

ProxyPort support across components:

  • Client: Added daemonProxyPort to the announcer struct, updated the Announcer.New constructor and related calls to accept and store the proxy port, and included the proxy port in host announcement requests. Tests were updated to cover the new field. [1] [2] [3] [4] [5] [6] [7] [8] [9]

  • Manager: Added ProxyPort to the Peer model, request/query types, and service logic for creating and retrieving peers. Updated tests and peer synchronization logic to handle the new field. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

  • Scheduler: Added ProxyPort to both persistent cache and standard host representations, constructors, and host manager loading logic. Updated related tests to verify correct handling of the proxy port. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Dependency updates:

  • Updated dependencies in go.mod to use newer versions of d7y.io/api/v2 and google.golang.org/protobuf. [1] [2]

Description

Related Issue

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@chlins chlins added the enhancement New feature or request label Aug 25, 2025
@chlins chlins force-pushed the feat/proxy-port branch 2 times, most recently from c836ee5 to ca7b2e5 Compare August 26, 2025 06:47
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 35.33333% with 97 lines in your changes missing coverage. Please review.
✅ Project coverage is 32.62%. Comparing base (fb93f29) to head (4009e58).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
scheduler/resource/persistentcache/host_manager.go 12.98% 66 Missing and 1 partial ⚠️
scheduler/service/service_v2.go 66.66% 15 Missing ⚠️
manager/service/persistent_cache_task.go 0.00% 8 Missing ⚠️
client/daemon/daemon.go 0.00% 2 Missing ⚠️
manager/job/sync_peers.go 0.00% 2 Missing ⚠️
manager/service/peer.go 0.00% 2 Missing ⚠️
client/daemon/announcer/announcer.go 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4283   +/-   ##
=======================================
  Coverage   32.62%   32.62%           
=======================================
  Files         349      349           
  Lines       41368    41401   +33     
=======================================
+ Hits        13496    13508   +12     
- Misses      26996    27014   +18     
- Partials      876      879    +3     
Flag Coverage Δ
unittests 32.62% <35.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
api/manager/docs.go 0.00% <ø> (ø)
scheduler/resource/persistentcache/host.go 100.00% <100.00%> (ø)
scheduler/resource/standard/host.go 88.33% <100.00%> (+0.09%) ⬆️
scheduler/scheduling/scheduling.go 61.91% <100.00%> (+0.05%) ⬆️
scheduler/service/service_v1.go 85.35% <100.00%> (+0.02%) ⬆️
client/daemon/announcer/announcer.go 9.30% <66.66%> (+0.38%) ⬆️
client/daemon/daemon.go 0.00% <0.00%> (ø)
manager/job/sync_peers.go 0.00% <0.00%> (ø)
manager/service/peer.go 0.00% <0.00%> (ø)
manager/service/persistent_cache_task.go 0.00% <0.00%> (ø)
... and 2 more

... and 2 files with indirect coverage changes

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

@chlins chlins force-pushed the feat/proxy-port branch 4 times, most recently from e153b0d to c8b7216 Compare August 27, 2025 06:22
Signed-off-by: chlins <chlins.zhang@gmail.com>
@chlins chlins enabled auto-merge (squash) August 27, 2025 08:54
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi added this to the v2.4.0 milestone Aug 27, 2025
Copy link
Contributor

@LunaWhispers LunaWhispers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chlins chlins merged commit 212c64d into main Aug 27, 2025
16 of 17 checks passed
@chlins chlins deleted the feat/proxy-port branch August 27, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants