-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
tests: enable integration test run on windows as baseline #4479
Conversation
13cf1c3
to
54282a9
Compare
I think skipping failing tests on Windows is ok to get a general view of which ones currently do not work. As we move forward, we can move them one by one in a platform specific If we ever manage to enable LCOW support, then we can enable linux specific tests on Windows as well, but until then we need to focus on WCOW. |
"dns": bridgeDNSNetwork, | ||
}), | ||
) | ||
if runtime.GOOS != "windows" { |
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.
Each individual test in testBridgeNetworkingDNSNoRootless
should instead declare that it cannot be run in windows, right?
I want to avoid as many explicit runtime.GOOS != "windows"
checks as possible, they're a little inflexible, and complicate reading the code.
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.
For some reason, even with the line to skip at the beginning of the function, some set up was still being done; so I'd to guard this. Any tips will be appreciated.
Here's the trace:
Error Trace: C:/buildkit/util/testutil/integration/run.go:198
Error: Received unexpected error:
process exited: C:\Users\Administrator\go\bin\buildkitd.exe --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr npipe:////./pipe/containerd-bktest_containerd2165329572 --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --config=C:\Users\ADMINI~1\AppData\Local\Temp\2\bktest_config1965241481\buildkitd.toml --root C:\Users\ADMINI~1\AppData\Local\Temp\2\bktest_buildkitd2000050298 --addr npipe:////./pipe/buildkitd-bktest_buildkitd2000050298 --debug
github.com/moby/buildkit/util/testutil/integration.WaitSocket
C:/buildkit/util/testutil/integration/util.go:111
github.com/moby/buildkit/util/testutil/workers.runBuildkitd
C:/buildkit/util/testutil/workers/util.go:93
github.com/moby/buildkit/util/testutil/workers.(*Containerd).New
C:/buildkit/util/testutil/workers/containerd.go:228
github.com/moby/buildkit/util/testutil/integration.newSandbox
C:/buildkit/util/testutil/integration/sandbox.go:100
github.com/moby/buildkit/util/testutil/integration.Run.func3.1
C:/buildkit/util/testutil/integration/run.go:197
testing.tRunner
C:/Program Files/Go/src/testing/testing.go:1595
runtime.goexit
C:/Program Files/Go/src/runtime/asm_amd64.s:1650
creating worker
github.com/moby/buildkit/util/testutil/integration.newSandbox
C:/buildkit/util/testutil/integration/sandbox.go:102
github.com/moby/buildkit/util/testutil/integration.Run.func3.1
C:/buildkit/util/testutil/integration/run.go:197
testing.tRunner
C:/Program Files/Go/src/testing/testing.go:1595
runtime.goexit
C:/Program Files/Go/src/runtime/asm_amd64.s:1650
Test: TestIntegration/TestBridgeNetworkingDNSNoRootless/worker=containerd/netmode=dns
--- FAIL: TestIntegration/TestBridgeNetworkingDNSNoRootless/worker=containerd/netmode=dns (20.22s)
```
65cee0f
to
8f4aad6
Compare
1ef27eb
to
fe257a5
Compare
The plan is to enable to skip all the failing tests on windows so as to have the CI running on WS2022; and then we will go fixing each tests and enabling them in separate PRs. This is the baseline. This will be a helpful approach as we bring parity between windows and unix. Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
fe257a5
to
4b7c173
Compare
@@ -20,7 +20,7 @@ on: | |||
|
|||
env: | |||
GO_VERSION: "1.21" | |||
TESTFLAGS: "-v --parallel=6 --timeout=30m" | |||
TESTFLAGS: "-v --parallel=6 --timeout=60m" |
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.
not for this PR but if this gets too long we need to split this suite to multiple parallel workers
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.
Sure, for now we just have those 3.
$version = [regex]::Match($goModFileContent, $pattern).Value | ||
mkdir -p .\bin\installs -f | ||
cd .\bin\installs | ||
git clone https://github.com/containerd/containerd.git |
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.
Eventually, this would need to be done with the Dockerfile. Either directly on windows or cross-compiled on linux. Eg. freebsd task in this file does the cross-compile.
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.
Good call out. Eventually, we will need to explore buildkitd running in the container (WCOW).
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.
Yes and same for distribution binaries, can look at this in follow-up 👍
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.
LGTM to start with thanks
As follow-up we should cross comp container/distribution binaries to avoid drifting like freebsd one and most of this logic should be moved to https://github.com/moby/buildkit/blob/master/.github/workflows/.test.yml where we are self-contained and run integration tests through a WCOW container. As I see it we would have a common .test.yml
that would either call a .test-linux.yml
, .test-windows.yml
reusable workflow depending on a new "os" input. We could then also have a .test-freebsd.yml
so we can remove the test-os.yml
workflow.
$version = [regex]::Match($goModFileContent, $pattern).Value | ||
mkdir -p .\bin\installs -f | ||
cd .\bin\installs | ||
git clone https://github.com/containerd/containerd.git |
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.
Yes and same for distribution binaries, can look at this in follow-up 👍
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.
LGTM. The tests directly under ./frontend
might pass. Could you try them out locally and maybe enable them if they do? Would be a shame not to run them if they work.
@crazy-max -- thanks, taking note of that. Adding it as a task on the main tracking issue here #4485 |
The plan is to skip all the failing tests on windows so as to have the CI running on WS2022; and then we will go fixing each tests and enabling them in separate PRs -- see tracking issue here #4485
This will be a helpful approach as we bring parity between windows and unix.