Skip to content

test(ec2): harden real SG-enforcement test against reconcile-timing flake#1768

Merged
vieiralucas merged 1 commit into
mainfrom
worktree-ec2-harden-enforcement-test
Jun 18, 2026
Merged

test(ec2): harden real SG-enforcement test against reconcile-timing flake#1768
vieiralucas merged 1 commit into
mainfrom
worktree-ec2-harden-enforcement-test

Conversation

@vieiralucas

@vieiralucas vieiralucas commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary

The new privileged ec2_sg_enforcement_real test (from #1765) flaked on a loaded CI runner: the deny step pinged once fakecloud's nft table merely existed, but the table can appear from one instance's reconcile while the other instance's default-deny rule is still pending — a race.

  • Wait for the target instance's specific ip daddr <ip> drop rule (wait_for_deny_rule) instead of just the table.
  • Widen the ping poll window to ~30s for slow runners.

No production code change — test robustness only.

Test plan

  • cargo clippy -p fakecloud-e2e --all-targets -- -D warnings clean; the privileged sg-enforcement job exercises it.

Summary by cubic

Hardened the real EC2 SG enforcement test to remove reconcile-timing flakes by waiting for the target instance’s specific default-deny rule and extending the ping poll window to ~30s. No production code changes; test reliability only.

  • Bug Fixes
    • Wait for the target instance’s ip daddr <ip> drop rule in inet fakecloud_ec2 before asserting deny; clearer failure if the rule never appears.
    • Increase ping retry window from ~10s to ~30s for slow CI runners.

Written for commit ad4096e. Summary will update on new commits.

Review in cubic

…lake

The deny step pinged once fakecloud's nft table merely existed, but the table
can appear from one instance's reconcile while the other's default-deny rule is
still pending — a race that flakes on a loaded CI runner. Wait for the target
instance's specific `ip daddr <ip> drop` rule instead, and widen the ping
poll window to ~30s.
@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@vieiralucas vieiralucas merged commit 505bd2a into main Jun 18, 2026
53 of 54 checks passed
@vieiralucas vieiralucas deleted the worktree-ec2-harden-enforcement-test branch June 18, 2026 23:18
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.

1 participant