Skip to content

enhance terminted pod handle#955

Merged
BSWANG merged 4 commits intoAliyunContainerService:mainfrom
l1b0k:main
Dec 31, 2025
Merged

enhance terminted pod handle#955
BSWANG merged 4 commits intoAliyunContainerService:mainfrom
l1b0k:main

Conversation

@l1b0k
Copy link
Collaborator

@l1b0k l1b0k commented Dec 30, 2025

Note

Improves robustness and correctness around pod lifecycle and IP management, and updates CRDv2 initialization.

  • daemon: ReleaseIP now ignores non-NotFound pod errors and proceeds; refactors resource lookups to use podID; uses podIpStickTime safely; GetIPInfo no longer queries the API and derives IPType from daemonMode only
  • k8s: add GetRestConfig; introduce shouldHandlePod to filter pods (same node, not ignored, not hostNetwork); GetPod returns NotFound for unhandled pods and only persists when IPStickTime>0; GetLocalPods/PodExist exclude Succeeded/Failed and hostNetwork pods; simplify podNetworkType(daemonMode)
  • eni/crdv2: change NewCRDV2 to accept rest.Config; pod cache filters out Succeeded/Failed and prunes fields/labels for hostNetwork pods
  • builder: pass k8s.GetRestConfig() to eni.NewCRDV2
  • tests: extensive updates/coverage for new behaviors across daemon, k8s, eni manager/crdv2; add mocks; fix minor test formatting
  • tooling/docs: add AGENTS.md; Makefile adds test-quick target

Written by Cursor Bugbot for commit e9b3585. Configure here.

@l1b0k l1b0k requested a review from BSWANG December 30, 2025 10:54
Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
…ated tests

Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
@l1b0k l1b0k force-pushed the main branch 2 times, most recently from 557083f to 2e8169c Compare December 30, 2025 11:27
…filtering logic

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

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 75.51020% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.46%. Comparing base (c1afe28) to head (e9b3585).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/k8s/k8s.go 60.00% 6 Missing and 2 partials ⚠️
pkg/eni/crdv2.go 66.66% 3 Missing ⚠️
daemon/builder.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #955      +/-   ##
==========================================
+ Coverage   61.30%   61.46%   +0.15%     
==========================================
  Files         133      133              
  Lines       16639    16635       -4     
==========================================
+ Hits        10201    10224      +23     
+ Misses       5231     5205      -26     
+ Partials     1207     1206       -1     
Flag Coverage Δ
unittests 61.46% <75.51%> (+0.15%) ⬆️

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.

@l1b0k
Copy link
Collaborator Author

l1b0k commented Dec 31, 2025

cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!

@BSWANG BSWANG merged commit 9539028 into AliyunContainerService:main Dec 31, 2025
10 checks passed
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.

2 participants