Skip to content

Comments

fix(aliyun): enhance EFLO service deletion handling and testing#985

Merged
BSWANG merged 1 commit intoAliyunContainerService:mainfrom
l1b0k:fix/eflo_delete
Feb 11, 2026
Merged

fix(aliyun): enhance EFLO service deletion handling and testing#985
BSWANG merged 1 commit intoAliyunContainerService:mainfrom
l1b0k:fix/eflo_delete

Conversation

@l1b0k
Copy link
Collaborator

@l1b0k l1b0k commented Feb 10, 2026

  • Introduced a backoff strategy for polling the deletion status of Elastic Network Interfaces (ENIs).
  • Updated the DeleteElasticNetworkInterface method to handle various deletion scenarios, including immediate success, errors, and polling timeouts.
  • Enhanced unit tests to cover multiple deletion scenarios and ensure robust error handling.

Note

Medium Risk
Changes ENI deletion behavior by adding polling and new failure modes/timeouts, which could impact cleanup timing and error handling in callers if the EFLO API is slow or returns transient describe errors.

Overview
EFLOService.DeleteElasticNetworkInterface now treats delete as async: after a successful delete request it polls DescribeLeniNetworkInterface (with a new getDeleteCheckBackoff configuration) until the LENI disappears, errors if it enters DeleteFailed, and returns a clearer timeout error; 1011 (not found) continues to be treated as success without polling.

Unit tests are refactored to use a single gomonkey.ApplyFuncSeq for multiple delete responses, override the backoff for fast runs, and add coverage for the new polling behaviors (confirmed deletion, immediate API error, already-deleted, polling timeout, and DeleteFailed).

Written by Cursor Bugbot for commit 32e3e2a. Configure here.

- Introduced a backoff strategy for polling the deletion status of Elastic Network Interfaces (ENIs).
- Updated the DeleteElasticNetworkInterface method to handle various deletion scenarios, including immediate success, errors, and polling timeouts.
- Enhanced unit tests to cover multiple deletion scenarios and ensure robust error handling.

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

l1b0k commented Feb 10, 2026

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 69.23077% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.62%. Comparing base (d39c436) to head (32e3e2a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/aliyun/client/eflo_service.go 69.23% 7 Missing and 1 partial ⚠️

❌ Your project status has failed because you have indirect coverage changes. Learn more about Unexpected Coverage Changes and reasons for indirect coverage changes.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #985      +/-   ##
==========================================
- Coverage   79.63%   79.62%   -0.02%     
==========================================
  Files         120      120              
  Lines       15214    15239      +25     
==========================================
+ Hits        12116    12134      +18     
- Misses       2047     2054       +7     
  Partials     1051     1051              
Flag Coverage Δ
unittests 79.62% <69.23%> (-0.02%) ⬇️

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 634d90b into AliyunContainerService:main Feb 11, 2026
8 of 10 checks passed
@l1b0k l1b0k deleted the fix/eflo_delete branch February 11, 2026 09:24
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