Skip to content

gha: update to windows 2022 / 2025 #50179

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

Merged
merged 2 commits into from
Jul 8, 2025
Merged

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jun 12, 2025

The hosted Windows 2019 runners reach EOL on June 30; actions/runner-images#12045

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

Oh! We disabled 2019 on PRs; probably should switch that to disable 2022 on PRs

@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 12, 2025

Some failures; could be related to Windows changing error messages?

=== Failed
=== FAIL: github.com/docker/docker/integration/container TestCopyFromContainerPathIsNotDir (0.94s)
    copy_test.go:51: assertion failed: expected error to contain "The filename, directory name, or volume label syntax is incorrect.", got "Error response from daemon: CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid."

Expected; "The filename, directory name, or volume label syntax is incorrect."
Got "The directory name is invalid.":

CreateFile \\\\?\\Volume{d9f06b05-0405-418b-b3e5-4fede64f3cdc}\\windows\\system32\\drivers\\etc\\hosts\\: The directory name is invalid.

Looks like there's a ERROR_INVALID_NAME
https://github.com/dotnet/runtime/blob/7ee91972e27c086d92b7d223f905cf391578b256/src/coreclr/pal/src/misc/errorstrings.cpp#L77

And a ERROR_DIRECTORY
https://github.com/dotnet/runtime/blob/7ee91972e27c086d92b7d223f905cf391578b256/src/coreclr/pal/src/misc/errorstrings.cpp#L99

docs;
https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-

Golang knows about ERROR_INVALID_NAME;

https://github.com/golang/go/blob/d166a0b03e88e3ffe17a5bee4e5405b5091573c6/src/os/root_windows.go#L39-L43
https://github.com/golang/go/blob/d166a0b03e88e3ffe17a5bee4e5405b5091573c6/src/internal/syscall/windows/syscall_windows.go#L41

Doesn't have ERROR_DIRECTORY

The hosted Windows 2019 runners reach EOL on June 30;
actions/runner-images#12045

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Rebased after #50189 was merged, which should fix the test 🤞

@thaJeztah thaJeztah requested review from vvoland and robmry June 13, 2025 13:09
@thaJeztah
Copy link
Member Author

Flaky? Or Legit? ISTR this one was flaky, but saw it fail twice on this PR. Let me try once more

=== Failed
=== FAIL: github.com/docker/docker/integration/container TestExecResize/success (0.01s)
    exec_test.go:145: assertion failed: error is not nil: Error response from daemon: NotFound: exec: 'a2ac185db91392415a29b1193ee4211ea3f24504c02f5418d6caef6559534ec6' in task: '3e83bfb29a2fe29ee94ae669ca30ce5d77e4b90caca782bed6af135990255cb5' not found: not found

@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 17, 2025

Looks like this one continues failing;

=== Failed
=== FAIL: github.com/docker/docker/integration/container TestExecResize/success (0.01s)
    exec_test.go:145: assertion failed: error is not nil: Error response from daemon: NotFound: exec: 'a0fd0e867d9b3251fb6451b333b7cf80d3725edfd12f822c2007e87c4cf129ef' in task: '86cede95385ddb00b14c55b53f21b850f260f5d6097fdb504379c6fac7a869ec' not found: not found

func TestExecResize(t *testing.T) {
ctx := setupTest(t)
apiClient := testEnv.APIClient()
cID := container.Run(ctx, t, apiClient, container.WithTty(true))
defer container.Remove(ctx, t, apiClient, cID, containertypes.RemoveOptions{Force: true})
cmd := []string{"top"}
if runtime.GOOS == "windows" {
cmd = []string{"sleep", "240"}
}
resp, err := apiClient.ContainerExecCreate(ctx, cID, containertypes.ExecOptions{
Tty: true, // Windows requires a TTY for the resize to work, otherwise fails with "is not a tty: failed precondition", see https://github.com/moby/moby/pull/48665#issuecomment-2412530345
Detach: true,
Cmd: cmd,
})
assert.NilError(t, err)
execID := resp.ID
assert.NilError(t, err)
err = apiClient.ContainerExecStart(ctx, execID, containertypes.ExecStartOptions{Detach: true})
assert.NilError(t, err)
t.Run("success", func(t *testing.T) {
err := apiClient.ContainerExecResize(ctx, execID, containertypes.ResizeOptions{
Height: 40,
Width: 40,
})
assert.NilError(t, err)
// TODO(thaJeztah): also check if the resize happened
//
// Note: container inspect shows the initial size that was
// set when creating the container. Actual resize happens in
// containerd, and currently does not update the container's
// config after running (but does send a "resize" event).
})

@vvoland vvoland modified the milestones: 28.3.0, 28.3.1 Jun 20, 2025
@thaJeztah thaJeztah modified the milestones: 28.3.1, 29.0.0 Jun 30, 2025
@thaJeztah
Copy link
Member Author

Failures are probably unrelated; let me try them again;

=== Failed
=== FAIL: github.com/docker/docker/integration/networking TestNatNetworkICC/User_defined_nat_network (9.42s)
    nat_windows_test.go:62: assertion failed: error is not nil: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.51/containers/1d0a07d1a900a39aa05dcbc7f2eedad5a87a96ce1db2a01b2aacf6ce5fc2c3ab/start": context deadline exceeded

=== FAIL: github.com/docker/docker/integration/networking TestNatNetworkICC (17.70s)

=== FAIL: github.com/docker/docker/integration/networking TestFlakyPortMappedHairpinWindows (13.36s)
    nat_windows_test.go:110: assertion failed: error is not nil: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.51/containers/4d3d086fdf72f9379bf420ac0e1e96ddcf46a330acb0e22da791785d03615349/start": context deadline exceeded
    panic.go:636: assertion failed: error is not nil: Error response from daemon: error while removing network: network clientnet has active endpoints (name:"heuristic_meitner" id:"cb186226c4a6")

@thaJeztah
Copy link
Member Author

Those tests are really flaky on Windows;

=== FAIL: github.com/docker/docker/integration/networking TestNatNetworkICC/User_defined_nat_network (9.67s)
    nat_windows_test.go:62: assertion failed: error is not nil: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.51/containers/4357bd24c9b77b955ee961530d1f552ce099b3dcbeb396db599971b2396d8b08/start": context deadline exceeded
    panic.go:636: assertion failed: error is not nil: Error response from daemon: error while removing network: network mynat has active endpoints (name:"ctr2" id:"dc8d597dafef")

=== FAIL: github.com/docker/docker/integration/networking TestNatNetworkICC (18.34s)

=== FAIL: github.com/docker/docker/integration/networking TestFlakyPortMappedHairpinWindows (13.02s)
    nat_windows_test.go:110: assertion failed: error is not nil: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.51/containers/65207ae3d6953d85cd2123feac45af60b059842d570d4f897ea53c813cba3cb4/start": context deadline exceeded
    panic.go:636: assertion failed: error is not nil: Error response from daemon: error while removing network: network clientnet has active endpoints (name:"amazing_visvesvaraya" id:"18add58d415e")

@thaJeztah
Copy link
Member Author

Copy link
Contributor

@vvoland vvoland left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah
Copy link
Member Author

I guess we should just ignore this one; it's super flaky; at least we're down to 1 flaky test this time;

=== Failed
=== FAIL: github.com/docker/docker/integration/networking TestFlakyPortMappedHairpinWindows (14.97s)
    nat_windows_test.go:110: assertion failed: error is not nil: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.51/containers/87f8fff249753623c18a528941fb9c8e7b3652383267db956a02e0a62f314b3d/start": context deadline exceeded
    panic.go:636: assertion failed: error is not nil: Error response from daemon: error while removing network: network clientnet has active endpoints (name:"lucid_maxwell" id:"ba7a512d2ef3")

@thaJeztah thaJeztah merged commit 963e7e6 into moby:master Jul 8, 2025
561 of 610 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: Disable Workflow Than Always Fails
4 participants