Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7e3924e
Harden shared CI against transient failures
sjmiller609 Aug 20, 2026
3df1a73
Restage persistent Windows test fixture
sjmiller609 Aug 21, 2026
44df562
Recover missing Windows test fixture
sjmiller609 Aug 21, 2026
206844c
Restore Windows backing fixture
sjmiller609 Aug 21, 2026
284722c
Retry checkout after network failure
sjmiller609 Aug 21, 2026
96a4c4a
Refresh Windows guest agent fixture
sjmiller609 Aug 21, 2026
1202fd1
Mount Windows fixture with NTFS userspace driver
sjmiller609 Aug 21, 2026
388e26f
Revert "Mount Windows fixture with NTFS userspace driver"
sjmiller609 Aug 21, 2026
3c0ee6a
Revert "Refresh Windows guest agent fixture"
sjmiller609 Aug 21, 2026
a48915f
Refresh Windows guest agent fixture
sjmiller609 Aug 21, 2026
e4fc42f
Mount Windows fixture with NTFS userspace driver
sjmiller609 Aug 21, 2026
19191cd
Preserve Windows fixture file metadata
sjmiller609 Aug 21, 2026
f9082f7
Revert "Preserve Windows fixture file metadata"
sjmiller609 Aug 21, 2026
bdaa3d3
Revert "Mount Windows fixture with NTFS userspace driver"
sjmiller609 Aug 21, 2026
bc23f12
Revert "Refresh Windows guest agent fixture"
sjmiller609 Aug 21, 2026
1f8bb93
Refresh Windows guest agent fixture
sjmiller609 Aug 21, 2026
3297cbe
Mount Windows fixture with NTFS userspace driver
sjmiller609 Aug 21, 2026
c9971ce
Update installed Windows guest agent
sjmiller609 Aug 21, 2026
3e87ecb
Revert "Update installed Windows guest agent"
sjmiller609 Aug 21, 2026
2215260
Revert "Mount Windows fixture with NTFS userspace driver"
sjmiller609 Aug 21, 2026
844061f
Revert "Refresh Windows guest agent fixture"
sjmiller609 Aug 21, 2026
6258e21
Restore canonical Windows fixture
sjmiller609 Aug 21, 2026
7af67ce
Ignore transient fixture search entries
sjmiller609 Aug 21, 2026
5bb0cf2
Revert "Ignore transient fixture search entries"
sjmiller609 Aug 21, 2026
576cf66
Revert "Restore canonical Windows fixture"
sjmiller609 Aug 21, 2026
cb9faa6
Refresh Windows guest agent fixture
sjmiller609 Aug 21, 2026
7500249
Mount Windows fixture with NTFS userspace driver
sjmiller609 Aug 21, 2026
03f02fd
Restore baseline Windows guest fixture
sjmiller609 Aug 21, 2026
83c2fbb
Refresh current Windows guest fixture
sjmiller609 Aug 21, 2026
6fa5736
Revert "Refresh current Windows guest fixture"
sjmiller609 Aug 21, 2026
b12c651
Revert "Restore baseline Windows guest fixture"
sjmiller609 Aug 21, 2026
4661a97
Revert "Mount Windows fixture with NTFS userspace driver"
sjmiller609 Aug 21, 2026
f33dca0
Revert "Refresh Windows guest agent fixture"
sjmiller609 Aug 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/stlc-generate.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -238,7 +238,15 @@ jobs:
--targets all \
"${commit_args[@]}"
stlc exec --targets "$SDK_TARGETS" -- ./scripts/bootstrap
stlc lint --targets "$SDK_TARGETS"
for attempt in 1 2 3; do
if stlc lint --targets "$SDK_TARGETS"; then
break
fi
if [ "$attempt" -eq 3 ]; then
exit 1
fi
sleep 5
done
stlc test --targets "$SDK_TARGETS"
stlc exec --targets "$SDK_TARGETS" -- sh -c \
'status=$(git status --porcelain --untracked-files=all) && [ -z "$status" ] || { printf "%s\n" "$status" >&2; exit 1; }'
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,6 +28,17 @@ jobs:
runs-on: [self-hosted, linux, x64, kvm]
steps:
- uses: actions/checkout@v4
id: checkout
continue-on-error: true
with:
clean: false
repository: ${{ env.TEST_SOURCE_REPO }}
ref: ${{ env.TEST_SOURCE_REF }}
persist-credentials: false

- name: Retry checkout
if: steps.checkout.outcome == 'failure'
uses: actions/checkout@v4
with:
clean: false
repository: ${{ env.TEST_SOURCE_REPO }}
Expand DownExpand Up@@ -97,6 +108,27 @@ jobs:
sudo env "PATH=$TEST_PATH" bash -lc "command -v '$bin'"
done

- name: Stage Windows test fixtures
run: |
fixture_dir=/mnt/data/ci-fixtures/windows
image_source=$(sudo find /mnt/data/home -path '*/windows-vm-exp/build/*-agent.qcow2' -print -quit)
base_source=$(sudo find /mnt/data/home -path '*/windows-vm-exp/build/*-golden.raw' -print -quit)
sudo mkdir -p "$fixture_dir" /ci/windows
if ! test -r "$fixture_dir/image-agent.qcow2" && test -n "$image_source"; then
sudo cp --reflink=auto --sparse=always "$image_source" "$fixture_dir/image-agent.qcow2"
sudo chmod 0444 "$fixture_dir/image-agent.qcow2"
fi
if ! test -r "$fixture_dir/base.raw" && test -n "$base_source"; then
sudo cp --reflink=auto --sparse=always "$base_source" "$fixture_dir/base.raw"
sudo chmod 0444 "$fixture_dir/base.raw"
fi
if test -r "$fixture_dir/image-agent.qcow2"; then
sudo ln -sfn "$fixture_dir/image-agent.qcow2" /ci/windows/image-agent.qcow2
fi
Comment thread
cursor[bot] marked this conversation as resolved.
if test -r "$fixture_dir/base.raw"; then
sudo ln -sfn "$fixture_dir/base.raw" /ci/windows/base.raw
fi

# Slash-command runs are maintainer-approved and need authenticated pulls
# for images that are not covered by the prewarm cache.
- name: Login to Docker Hub
Expand Down
33 changes: 32 additions & 1 deletion lib/instances/test_network_config_test.go
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orphan bridges can block subnets

Medium Severity

Bridge names are now a fixed function of the leased subnet, but subnet selection only skips leases and overlapping routes. An orphan hm* bridge with no lease and no route still maps to the same name on the next lease of that subnet, so createBridge can fail when the interface already exists without the expected address. The old seed-based names avoided reusing that interface name.

Additional Locations (2)
Fix in CursorFix in Web

Reviewed by Cursor Bugbot for commit 7e3924e. Configure here.

allocatedSubnet = subnet
leases[subnet] = subnetLease{
TestName: testName,
Expand DownExpand Up@@ -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

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The 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
Expand Down
Loading