Uh oh!
There was an error while loading. Please reload this page.
- 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?
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
7e3924e3df1a7344df562206844c284722c96a4c4a1202fd1388e26f3c0ee6aa48915fe4fc42f19191cdf9082f7bdaa3d3bc23f121f8bb933297cbec9971ce3e87ecb2215260844061f6258e217af67ce5bb0cf2576cf66cb9faa6750024903f02fd83c2fbb6fa5736b12c6514661a97f33dca0File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
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
CollaboratorAuthor 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 | ||
Uh oh!
There was an error while loading. Please reload this page.


Uh oh!
There was an error while loading. Please reload this page.