-
Notifications
You must be signed in to change notification settings - Fork 23
Harden shared CI against transient failures #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7e3924e
3df1a73
44df562
206844c
284722c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,7 +161,10 @@ func allocateTestNetworkLease(testName string, seq uint32) (*testNetworkLease, e | |
| return err | ||
| } | ||
|
|
||
| bridgeName = fmt.Sprintf("hm%04x%03x", testNetworkRunSeed&0xffff, seq%0xfff) | ||
| bridgeName, err = testBridgeNameForSubnet(subnet) | ||
| if err != nil { | ||
| return err | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Orphan bridges can block subnetsMedium Severity Bridge names are now a fixed function of the leased subnet, but subnet selection only skips leases and overlapping routes. An orphan Additional Locations (2)Reviewed by Cursor Bugbot for commit 7e3924e. Configure here. |
||
| allocatedSubnet = subnet | ||
| leases[subnet] = subnetLease{ | ||
| TestName: testName, | ||
|
|
@@ -443,6 +446,34 @@ func pruneStaleLeases(leases map[string]subnetLease, routes []hostRoute) { | |
| } | ||
| } | ||
|
|
||
| func testBridgeNameForSubnet(subnet string) (string, error) { | ||
| ip, _, err := net.ParseCIDR(subnet) | ||
| if err != nil { | ||
| return "", fmt.Errorf("parse test subnet %q: %w", subnet, err) | ||
| } | ||
| ip = ip.To4() | ||
| if ip == nil { | ||
| return "", fmt.Errorf("test subnet %q is not IPv4", subnet) | ||
| } | ||
| return fmt.Sprintf("hm%02x%02x", ip[1], ip[2]), nil | ||
| } | ||
|
|
||
| func TestBridgeNameForTestSubnet(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| first, err := testBridgeNameForSubnet("10.200.1.0/24") | ||
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| second, err := testBridgeNameForSubnet("10.200.2.0/24") | ||
| if err != nil { | ||
| t.Fatal(err) | ||
| } | ||
| if first != "hmc801" || second != "hmc802" || first == second { | ||
|
Comment on lines
+461
to
+472
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks like it's just trying two options but that would only decrease but not resolve the issue |
||
| t.Fatalf("unexpected bridge names: %q %q", first, second) | ||
| } | ||
| } | ||
|
|
||
| func bridgeExists(name string) bool { | ||
| if name == "" { | ||
| return false | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recovery find can abort CI
Medium Severity
The Windows fixture staging path is best-effort: missing
sourceonly skips the symlink. The newsudo findruns in that same path under Actions’ defaultbash -e, so a missing/mnt/data/homeor any find error fails the whole step and blocks later tests that do not need the fixture.Reviewed by Cursor Bugbot for commit 44df562. Configure here.