Skip to content

Conversation

@huangchenzhao
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

In #2449, SetDiscoveryConfig is modified, in which this function is only called in non-local mode for yurtadm join. as the following figure.

image

However, when use in local mode, yurtadm also need call SetDiscoveryConfig to configure discovery file, then kubeadm-config contains this discovery to perfom joining a node.

Which issue(s) this PR fixes:

Fixes #2449

Special notes for your reviewer:

Does this PR introduce a user-facing change?


other Note

@huangchenzhao huangchenzhao requested a review from a team as a code owner October 27, 2025 04:11
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

❌ Patch coverage is 47.16981% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.09%. Comparing base (3f83586) to head (e9fcfa7).
⚠️ Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
pkg/yurtadm/cmd/join/phases/prepare.go 47.16% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2471      +/-   ##
==========================================
+ Coverage   42.96%   43.09%   +0.12%     
==========================================
  Files         396      396              
  Lines       26298    26337      +39     
==========================================
+ Hits        11300    11350      +50     
+ Misses      13941    13930      -11     
  Partials     1057     1057              
Flag Coverage Δ
unittests 43.09% <47.16%> (+0.12%) ⬆️

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

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

@sonarqubecloud
Copy link

@huangchenzhao
Copy link
Member Author

@zyjhtangtang This PR is originally for fixing the calling logic of function SetDiscoveryConfig. However, for passing Codecov, I refactor prepare.go with interface abstraction and add prepare_test.go. Please take a look, thank you.

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.

1 participant