Skip to content
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

[2.16] Enables Podman and Docker Windows quarkus-container-image-docker testing #31491

Closed
wants to merge 4 commits into from

Conversation

Karm
Copy link
Member

@Karm Karm commented Feb 28, 2023

This is a backport of #31490 (Quarkus 2.16 test runs below)

This PR addresses problems I experienced trying to run quarkus-container-image-docker driven tests on Windows with Podman for Windows and with Docker Desktop for Windows.

I used the changes to Quarkus 2.16 branch to integrate Quarkus PrimeFaces test run that uses a builder image to compile a Linux native executable and then builds a runtime image and runs it for tests. It enables people who work with Windows to test the native workflow despite the fact we do not support Windows MSVC toolchain with e.g. AWT dependency.

Notes

  • quarkus.docker.executable-name and quarkus.native.container-runtime, the former actually comes from
    the quarkus-container-image-docker and the latter from the core. It is used instead of the hardcoded "docker"

  • Caused by: java.nio.file.FileSystemException: target\quarkus.log: The process cannot access the file because it is being used by another process
    is now wrapped in a try block with a logged warning.

  • Logs from the container: The former logic did not work for me on Windows, the log was left in the container
    and there was nothing to pipe to a file. Was it formerly used with mounting the volume? I added -i so as the container
    pours the log to stdout and capture that. WDYT @geoand 🤔?

  • Added quarkus-container-image-docker based test to the AWT extension test to try these changes.

Testing

I used the AWT integration test like this to test Podman and Docker on Linux and Windows:

mvnw clean verify -f integration-tests/pom.xml -pl awt -Ddocker -Dnative
  -Dnative.surefire.skip
  -Dquarkus.native.container-build=true
  -Dquarkus.container-image.build=true
  -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
  -Dquarkus.native.container-runtime=podman
  -Dquarkus.docker.executable-name=podman

(with docker in docker variants)

Logs for Quarkus 2.16:

System Podman Docker
CentOS 8 4.0.2 ✔️ logs 20.10.21 ✔️ logs
Windows 10 4.1.0 ✔️ logs 20.10.22 ✔️ logs

@Karm Karm requested review from zakkak and geoand February 28, 2023 23:42
@quarkus-bot
Copy link

quarkus-bot bot commented Feb 28, 2023

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

@quarkus-bot
Copy link

quarkus-bot bot commented Feb 28, 2023

/cc @galderz (awt), @zakkak (awt)

@quarkus-bot

This comment has been minimized.

@Karm
Copy link
Member Author

Karm commented Mar 1, 2023

I am on the results, gonna refactor.

@Karm Karm force-pushed the issue-31307-q-2.16 branch from 03bd4de to 2cd3fd1 Compare March 6, 2023 10:00
@quarkus-bot

This comment has been minimized.

@gsmet
Copy link
Member

gsmet commented Mar 7, 2023

@Karm Not sure what to do with this PR. It doesn't seem like an obvious change given how CI reacted and I'm not sure I want to backport something risky to 2.16.

Karm added 4 commits March 7, 2023 15:13
Enables enforcing podman on systems where both podman and docker are available
e.g.
Before:

```
WARN  [io.qua.run.uti.ContainerRuntimeUtil] (main) Command "docker" exited with error code 1. Rootless container runtime detection might not be reliable.
```

after:

```
WARN  [io.qua.run.uti.ContainerRuntimeUtil] (main) Command "docker info" exited with error code 1. Rootless container runtime detection might not be reliable or the container service is not running at all.
```
plus with `-Dquarkus.log.level=DEBUG` it logs:

```
DEBUG [io.qua.run.uti.ContainerRuntimeUtil] (main) Command "docker info" output: Client:
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.16.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  scan: Docker Scan (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-scan

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
```
@Karm Karm force-pushed the issue-31307-q-2.16 branch from 2cd3fd1 to c6b4412 Compare March 7, 2023 14:13
@Karm
Copy link
Member Author

Karm commented Mar 7, 2023

@gsmet It is being polished in #31490
I fixed the problem with Config provider.
Looking into the remaining fails...

@quarkus-bot
Copy link

quarkus-bot bot commented Mar 7, 2023

Failing Jobs - Building c6b4412

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
✔️ Gradle Tests - JDK 11 Windows
JVM Tests - JDK 11 Build Failures Logs Raw logs
JVM Tests - JDK 11 Windows Build Failures Logs Raw logs
✔️ JVM Tests - JDK 17
✔️ JVM Tests - JDK 18
✔️ Maven Tests - JDK 11
Maven Tests - JDK 11 Windows ⚠️ Check → Logs Raw logs
Native Tests - Misc4 Build ⚠️ Check → Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.AddExtensionToModuleInMultiModuleKtsProjectTest.testBasicMultiModuleBuild line 35 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting actual:

⚙️ JVM Tests - JDK 11 #

- Failing: integration-tests/container-image/maven-invoker-way 

📦 integration-tests/container-image/maven-invoker-way

Failed to execute goal org.apache.maven.plugins:maven-invoker-plugin:3.2.2:run (integration-tests) on project quarkus-integration-test-container-image-invoker: 1 build failed. See console output above for details.


⚙️ JVM Tests - JDK 11 Windows #

- Failing: extensions/reactive-routes/deployment 
! Skipped: extensions/agroal/deployment extensions/avro/deployment extensions/csrf-reactive/deployment and 227 more

📦 extensions/reactive-routes/deployment

io.quarkus.vertx.web.context.DuplicatedContextTest.testThatRoutesAreCalledOnDuplicatedContext line 58 - More details - Source on GitHub

io.smallrye.mutiny.TimeoutException
	at io.smallrye.mutiny.operators.uni.UniBlockingAwait.await(UniBlockingAwait.java:64)
	at io.smallrye.mutiny.groups.UniAwait.atMost(UniAwait.java:65)

@gsmet
Copy link
Member

gsmet commented Mar 25, 2023

Included in #32132 with the other commits. Thanks!

@gsmet gsmet closed this Mar 25, 2023
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Mar 25, 2023
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.

2 participants