Skip to content

Fix/release ip#920

Merged
BSWANG merged 4 commits intoAliyunContainerService:mainfrom
l1b0k:fix/release_ip
Oct 16, 2025
Merged

Fix/release ip#920
BSWANG merged 4 commits intoAliyunContainerService:mainfrom
l1b0k:fix/release_ip

Conversation

@l1b0k
Copy link
Collaborator

@l1b0k l1b0k commented Oct 16, 2025

No description provided.

@l1b0k l1b0k requested a review from BSWANG October 16, 2025 06:32
cursor[bot]

This comment was marked as outdated.

@l1b0k l1b0k force-pushed the fix/release_ip branch 3 times, most recently from 93f499d to 0591509 Compare October 16, 2025 06:44
@l1b0k l1b0k requested a review from Copilot October 16, 2025 06:44
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the IP release and resource management logic in the multi-IP node controller. Key improvements include better separation of concerns between IP allocation and cleanup phases, enhanced observability through additional metrics and events, and improved test infrastructure with reusable test helpers and factories.

  • Separates cleanup logic from pool adjustment, allowing IP operations to proceed independently
  • Adds comprehensive latency metrics and Kubernetes events for better observability
  • Introduces test helper utilities (MockAPIHelper, NodeFactory, ENIFactory) to improve test maintainability

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/controller/multi-ip/node/pool.go Core logic changes: separates cleanup from pool management, adds metrics/events, implements IP deletion verification
pkg/controller/multi-ip/node/metric.go Adds new ReconcileLatency histogram metric for tracking method performance
pkg/controller/multi-ip/node/pool_test.go Refactors tests to use new factory helpers, improving readability and reducing boilerplate
pkg/controller/multi-ip/node/pool_test_mocks_test.go New mock helper utilities for setting up Aliyun API expectations in tests
pkg/controller/multi-ip/node/pool_test_factory_test.go New factory utilities for creating test nodes, ENIs, and reconcilers
pkg/backoff/backoff.go Adds backoff configuration for IP removal wait operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

cursor[bot]

This comment was marked as outdated.

l1b0k added 4 commits October 16, 2025 14:48
…nt waitIPGone function

Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
…ng for IP allocation and ENI operations

Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
@codecov
Copy link

codecov bot commented Oct 16, 2025

Codecov Report

❌ Patch coverage is 77.69784% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.87%. Comparing base (bd72ac0) to head (31dacfe).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/multi-ip/node/pool.go 77.69% 25 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #920      +/-   ##
==========================================
+ Coverage   59.73%   59.87%   +0.13%     
==========================================
  Files         131      131              
  Lines       19795    19888      +93     
==========================================
+ Hits        11825    11907      +82     
- Misses       6807     6812       +5     
- Partials     1163     1169       +6     
Flag Coverage Δ
unittests 59.87% <77.69%> (+0.13%) ⬆️

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.

@BSWANG BSWANG merged commit 1a6e659 into AliyunContainerService:main Oct 16, 2025
10 checks passed
@l1b0k l1b0k deleted the fix/release_ip branch October 16, 2025 08:11
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.

3 participants