Skip to content

test(vpc_endpoint): wait for the sync and give deletes 30s - #409

Merged
ack-prow[bot] merged 2 commits into
aws-controllers-k8s:mainfrom
gecube:vpc-endpoint-test-flakes
Nov 16, 2026
Merged

ack-prow[bot] merged 2 commits into
aws-controllers-k8s:mainfrom
gecube:vpc-endpoint-test-flakes

Conversation

@gecube

@gecube gecube commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Issue #, if available: aws-controllers-k8s/community#3159

Description of changes:

Two flakes in test/e2e/tests/test_vpc_endpoint.py, both seen in the required ec2-controller-test job on PRs that do not change this controller. The issue has the logs.

  • test_create_delete, test_crud_tags and test_update_subnets deleted the CR with the acktest default wait: one check, 5 seconds after the delete. On fix(runtime): keep the CR's spec when a delete fails runtime#286 a DeleteVpcEndpoints call took 6.6 seconds and the test failed with assert deleted is True, although the controller removed the finalizer a moment later. These calls now pass 3, 10, like the fixtures in this file and most of the suite.
  • simple_vpc_endpoint and modify_vpc_endpoint returned the CR as soon as it had a status. On Update OWNERS_ALIASES code-generator#764 the create was failing with VpcEndpointLimitExceeded, the status held only conditions, and the test failed with KeyError: 'vpcEndpointID'. The fixtures now wait for ACK.ResourceSynced=True, up to 100 seconds, and read the CR again. If the endpoint still does not exist by then, the fixture fails on that wait, and acktest logs the condition's message.

The other asserted deletes in the suite get the same 3, 10 in #410.

Checked with python3 -m py_compile; the e2e suite itself runs only in CI.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

🤖 Generated with Claude Code

Three tests deleted the CR with the acktest default wait, one check
5 seconds after the delete, and failed when DeleteVpcEndpoints took
longer. They now pass 3, 10 like the fixtures in this file.

The fixtures returned the CR as soon as it had a status, which can hold
only conditions while the create fails (VpcEndpointLimitExceeded), and
the tests failed with KeyError: 'vpcEndpointID'. The fixtures now wait
for ACK.ResourceSynced=True before the tests read the status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ack-prow

ack-prow Bot commented Nov 11, 2026

Copy link
Copy Markdown

Hi @gecube. Thanks for your PR.

I'm waiting for a aws-controllers-k8s member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knottnt knottnt self-assigned this Nov 12, 2026
@gustavodiaz7722

Copy link
Copy Markdown
Member

/ok-to-test

@ack-prow ack-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 13, 2026
@gustavodiaz7722

Copy link
Copy Markdown
Member

/LGTM

@ack-prow ack-prow Bot added lgtm Indicates that a PR is ready to be merged. approved labels Nov 13, 2026
ack-prow Bot pushed a commit that referenced this pull request Nov 13, 2026
Issue #, if available: aws-controllers-k8s/community#3159

Description of changes:

42 calls in 14 e2e test files deleted a CR with the acktest default wait (`wait_periods=1, period_length=5`: one check, 5 seconds after the delete) and then asserted that the CR was gone. A delete that takes a little longer, or waits in the queue behind another delete of the same kind, fails the test although the controller completes it. That is how `TestVpcEndpoint` failed on aws-controllers-k8s/runtime#286 (details in the issue).

These calls now pass `3, 10` (up to 30 seconds), as most calls in the suite already do. Only the arguments change. The wait returns as soon as the CR is gone, so a test that passed before still passes; a delete that finishes within 5 seconds now waits for the first check at 10 seconds instead of 5.

Not changed:

- `test_vpc_endpoint.py`: #409 changes it, together with a fix for its fixtures.
- Six calls in `test_security_group.py` that do not check the result and sleep after the delete.

Checked with `python3 -m py_compile` on every changed file; the e2e suite itself runs only in CI.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
The modify fixture waited 100 s for ACK.ResourceSynced=True, but the
interface endpoint it creates stays pending for about 5.5 minutes, so
test_update_subnets and test_update_security_groups failed in setup.
Wait as long as test_update_security_groups already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ack-prow ack-prow Bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 14, 2026
@gecube

gecube commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

@gustavodiaz7722 the modify fixture waited only 100 s for the interface endpoint, which stays pending for about 5.5 minutes; 1e1b134 makes it wait as long as test_update_security_groups does. ec2-kind-e2e is green now (110 passed). Could you kindly take another look?

@gustavodiaz7722

Copy link
Copy Markdown
Member

/LGTM

@ack-prow ack-prow Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 16, 2026
@ack-prow

ack-prow Bot commented Nov 16, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gecube, gustavodiaz7722

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ack-prow
ack-prow Bot merged commit 6b53741 into aws-controllers-k8s:main Nov 16, 2026
9 checks passed
ack-prow Bot pushed a commit that referenced this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants