-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
wip: fix Windows tests #295
Conversation
29d6dea
to
8eb4621
Compare
e8b66b0
to
558e093
Compare
Note: some tests are fixed but I'm struggling on the remaining ones involving SSH, failing on both nanoserver and windowsservercore images:
Additionally, there is an error from the nanoserver Docker image build unrelated to this PR, also on master branch: #302 |
064bc68
to
0625765
Compare
Error log with `ssh -v`
|
https://ci.jenkins.io/job/Packaging/job/docker-ssh-agent/view/change-requests/job/PR-295/34/console:
🎉 Now trying with the previous version of OpenSSH, then cleaning up to keep only fixes in this PR. |
This is really frustrating: running the build and tests locally on a Windows 10 machine with https://ci.jenkins.io/job/Packaging/job/docker-ssh-agent/job/PR-295/58/console
Any idea @jenkinsci/team-docker-packaging? |
Create a VM based on the image in the image gallery, that's how I have always debugged failures in jenkinsci/docker. |
+1 with Tim: your Windows 10/11 with Docker Desktop uses a different isolation for containers that a fully fledged Win 2019 / 2022 server with Docker-CE windows containers (not the same kernel, not the same hypervisor and system APIs). |
@timja @dduportal I've spawned a VM using this image : And... All tests passed, including those with Windows Server Core 🎉 😅 🤔 What could I try now? Note that I've tried a replay with |
The last build seemed to pass? |
Many of them are green, but #291 |
About the green builds even with some tests failing:
From #319 (comment) I can put #319 in "ready for review" so it can be merged already, but I don't really know why it restored the ability of failing the build. |
tests/sshAgent.Tests.ps1
Outdated
@@ -92,7 +92,7 @@ Describe "[$global:AGENT_IMAGE] checking image metadata" { | |||
|
|||
Describe "[$global:AGENT_IMAGE] image has correct version of java installed and in the PATH" { | |||
BeforeAll { | |||
docker run --detach --tty --name="$global:CONTAINERNAME" --publish "$global:AGENT_IMAGE" $global:CONTAINERSHELL | |||
docker run --detach --tty --name="$global:CONTAINERNAME" --publish-all "$global:AGENT_IMAGE" $global:CONTAINERSHELL |
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.
docker run --detach --tty --name="$global:CONTAINERNAME" --publish-all "$global:AGENT_IMAGE" $global:CONTAINERSHELL | |
docker run --detach --name="$global:CONTAINERNAME" --publish-all "$global:AGENT_IMAGE" $global:CONTAINERSHELL |
I'm not convinced that this change will solve all problems, but removing the --tty
when the container is executed in background is a good practice (unless an exotic case is done such as running cat
command on a linux container in background), we don't use TTY for background containers
eb1e0cb
to
10ed632
Compare
Should be started over now that all tests pass with nanoserver images and that only the SSH tests are failing for the Windows Server Core images. |
10ed632
to
d04f000
Compare
This reverts commit cf8eb99.
This reverts commit ade2670.
Fixes #292
Explanations:
$global:
fixed it. (ex:PUBLIC_SSH_KEY
,PRIVATE_SSH_KEY
)docker run
was called with--publish
but without specifying any port, calling it with--publish-all
to publish all exposed ports to random ports fixed it.Testing done
Submitter checklist