Skip to content

Conversation

zhengxiexie
Copy link
Contributor

@zhengxiexie zhengxiexie commented Oct 17, 2025

It's a bit hard to debug clean failure when triggered by wcp, so added as many logs as possible to make debugging easier in the future.

Test done

2025-10-21 03:41:34.000 INFO policy_tree.go:607 Successfully deleted resource resourceID=3732355e-448e-42f3-9dfa-fa7bb2d28ae7 resourceName=3732355e-448e-42f3-9dfa-fa7bb2d28ae7 resourceType=Domain
2025-10-21 03:41:34.000 INFO policy_tree.go:676 Batch deletion succeeded batch=1/1 batchResourceCount=1 cumulativeSuccess=1 resourceType=Domain
2025-10-21 03:41:34.000 INFO policy_tree.go:688 Batch deletion completed failedCount=0 resourceType=Domain successCount=1 totalResources=1
2025-10-21 03:41:34.000 INFO clean_service.go:287 Starting health status resource cleanup clusterID=9c7786fd-21aa-52c9-b9e9-ed762f8b5cbd status=attempting
2025-10-21 03:41:34.000 INFO clean_service.go:287 Attempting to delete health status resource clusterID=9c7786fd-21aa-52c9-b9e9-ed762f8b5cbd url=api/v1/systemhealth/container-cluster/9c7786fd-21aa-52c9-b9e9-ed762f8b5cbd/ncp/status
2025-10-21 03:41:34.000 DEBUG cluster.go:432 DELETE url url=https://10.159.175.234/api/v1/systemhealth/container-cluster/9c7786fd-21aa-52c9-b9e9-ed762f8b5cbd/ncp/status
2025-10-21 03:41:34.000 INFO clean_service.go:287 Successfully deleted health status resource from NSX clusterID=9c7786fd-21aa-52c9-b9e9-ed762f8b5cbd status=success
2025-10-21 03:41:34.000 INFO main.go:86 Cleanup NSX resources successfully

Change-Id: Ia958b9b6cd50ac617369e9605cd99bac0dcb2305

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 77.30263% with 69 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.52%. Comparing base (60b8737) to head (dd84629).

Files with missing lines Patch % Lines
pkg/nsx/services/common/policy_tree.go 88.39% 11 Missing and 2 partials ⚠️
pkg/clean/clean_service.go 64.51% 9 Missing and 2 partials ⚠️
pkg/clean/clean_lb_infra.go 79.06% 6 Missing and 3 partials ⚠️
pkg/nsx/services/subnetbinding/cleanup.go 50.00% 4 Missing and 1 partial ⚠️
pkg/nsx/services/subnetipreservation/cleanup.go 50.00% 4 Missing and 1 partial ⚠️
pkg/clean/clean_health.go 0.00% 4 Missing ⚠️
pkg/nsx/services/nsxserviceaccount/cluster.go 73.33% 3 Missing and 1 partial ⚠️
pkg/nsx/services/subnetport/cleanup.go 60.00% 3 Missing and 1 partial ⚠️
pkg/nsx/services/vpc/clean_avi.go 71.42% 3 Missing and 1 partial ⚠️
pkg/nsx/services/ipaddressallocation/cleanup.go 25.00% 3 Missing ⚠️
... and 3 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1268      +/-   ##
==========================================
+ Coverage   74.42%   74.52%   +0.09%     
==========================================
  Files         147      147              
  Lines       23637    23894     +257     
==========================================
+ Hits        17593    17808     +215     
- Misses       4952     4980      +28     
- Partials     1092     1106      +14     
Flag Coverage Δ
unit-tests 74.52% <77.30%> (+0.09%) ⬆️
Files with missing lines Coverage Δ
pkg/clean/clean.go 88.11% <100.00%> (+1.93%) ⬆️
pkg/nsx/services/inventory/inventory.go 60.17% <88.88%> (+0.57%) ⬆️
pkg/nsx/services/ipaddressallocation/cleanup.go 46.15% <25.00%> (-6.23%) ⬇️
pkg/nsx/services/staticroute/cleanup.go 48.14% <25.00%> (-6.40%) ⬇️
pkg/nsx/services/subnet/cleanup.go 52.17% <25.00%> (-8.94%) ⬇️
pkg/clean/clean_health.go 0.00% <0.00%> (ø)
pkg/nsx/services/nsxserviceaccount/cluster.go 78.94% <73.33%> (-0.15%) ⬇️
pkg/nsx/services/subnetport/cleanup.go 82.60% <60.00%> (-17.40%) ⬇️
pkg/nsx/services/vpc/clean_avi.go 93.44% <71.42%> (-6.56%) ⬇️
pkg/nsx/services/subnetbinding/cleanup.go 65.21% <50.00%> (-14.79%) ⬇️
... and 4 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zhengxiexie zhengxiexie force-pushed the topic/zhengxie/main/clean_more branch 2 times, most recently from e93aec0 to 908af6f Compare October 21, 2025 03:52
@zhengxiexie zhengxiexie force-pushed the topic/zhengxie/main/clean_more branch 2 times, most recently from 95f754e to bca7a21 Compare October 21, 2025 05:55
yanjunz97
yanjunz97 previously approved these changes Oct 21, 2025
Copy link
Contributor

@yanjunz97 yanjunz97 left a comment

Choose a reason for hiding this comment

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

LGTM

It's a bit hard to debug clean failure when triggered by wcp,
so added as many logs as possible to make debugging easier in the future.

Change-Id: Ia958b9b6cd50ac617369e9605cd99bac0dcb2305
@zhengxiexie zhengxiexie force-pushed the topic/zhengxie/main/clean_more branch from 4e1da05 to dd84629 Compare October 21, 2025 06:23
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.

4 participants