test(ec2): harden real SG-enforcement test against reconcile-timing flake#1768
Merged
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The new privileged
ec2_sg_enforcement_realtest (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'sdefault-denyrule is still pending — a race.ip daddr <ip> droprule (wait_for_deny_rule) instead of just the table.No production code change — test robustness only.
Test plan
cargo clippy -p fakecloud-e2e --all-targets -- -D warningsclean; the privilegedsg-enforcementjob 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.
ip daddr <ip> droprule ininet fakecloud_ec2before asserting deny; clearer failure if the rule never appears.Written for commit ad4096e. Summary will update on new commits.