Skip to content

Conversation

gaius-qi
Copy link
Member

@gaius-qi gaius-qi commented Apr 9, 2025

Description

This pull request makes improvements to the GetResolveSchedulerAddrs function in the dynconfig_manager.go file by simplifying the health check logic and removing redundant code.

Codebase simplification:

  • client/config/dynconfig_manager.go: Removed redundant checks for the scheduler's host address and simplified the logic to only check the scheduler's IP address. This change reduces the complexity and potential duplication in the health check process.

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.

@gaius-qi gaius-qi added the enhancement New feature or request label Apr 9, 2025
@gaius-qi gaius-qi added this to the v2.3.0 milestone Apr 9, 2025
@gaius-qi gaius-qi self-assigned this Apr 9, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner April 9, 2025 12:48
yxxhero
yxxhero previously approved these changes Apr 9, 2025
Signed-off-by: Gaius <gaius.qi@gmail.com>
Copy link

codecov bot commented Apr 9, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 34.51%. Comparing base (4e02af6) to head (f98be14).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
client/config/dynconfig_manager.go 57.14% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3936      +/-   ##
==========================================
- Coverage   34.55%   34.51%   -0.05%     
==========================================
  Files         339      339              
  Lines       39956    39943      -13     
==========================================
- Hits        13807    13785      -22     
- Misses      25244    25249       +5     
- Partials      905      909       +4     
Flag Coverage Δ
unittests 34.51% <57.14%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
client/config/dynconfig_manager.go 50.26% <57.14%> (-4.69%) ⬇️

... 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.

Copy link
Member

@BruceAko BruceAko left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@chlins chlins 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 merged commit e8166e4 into main Apr 10, 2025
27 checks passed
@gaius-qi gaius-qi deleted the feature/check branch April 10, 2025 02:29
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.

5 participants