Skip to content

fix: treat InvalidVpcID.NotFound as success in VPC cleanup#769

Merged
ArangoGutierrez merged 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:fix/handle-vpc-not-found
Apr 1, 2026
Merged

fix: treat InvalidVpcID.NotFound as success in VPC cleanup#769
ArangoGutierrez merged 1 commit intoNVIDIA:mainfrom
ArangoGutierrez:fix/handle-vpc-not-found

Conversation

@ArangoGutierrez
Copy link
Copy Markdown
Collaborator

Problem

The periodic cleanup action fails because the Docker action's post-entrypoint re-runs cleanup on VPCs that were already deleted in the main step. The deleteVPC function retries 3 times on InvalidVpcID.NotFound instead of treating it as success.

Root Cause

action.yml has post-entrypoint: 'holodeck' which re-executes the cleanup binary in the post phase. By then, VPCs are already gone → InvalidVpcID.NotFound → 3 retries → failure.

Fix

Treat InvalidVpcID.NotFound as success in deleteVPC(), matching the existing pattern in pkg/provider/aws/delete.go:479. If the VPC doesn't exist, cleanup succeeded.

Also Needed (IAM - manual)

The cnt-ci IAM user is missing ec2:RevokeSecurityGroupIngress and ec2:RevokeSecurityGroupEgress permissions. Without these, the SG cross-reference fix (#766) can only log warnings. This needs to be added to the IAM policy.

Testing

  • Added Ginkgo test should treat InvalidVpcID.NotFound as success
  • All 84 cleanup tests pass

When the Docker action's post-entrypoint re-runs cleanup, VPCs deleted
in the main step are already gone. Treat InvalidVpcID.NotFound as
success instead of retrying 3 times and failing.

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 23841329015

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 46.47%

Totals Coverage Status
Change from base Build 23819829835: 0.02%
Covered Lines: 5101
Relevant Lines: 10977

💛 - Coveralls

@ArangoGutierrez ArangoGutierrez merged commit babab84 into NVIDIA:main Apr 1, 2026
17 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