OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
12 stars 24 forks source link

Start in Container tests failing in GradleSingleModMPSIDProjectTest and MavenSingleModMPSIDProjectTest #983

Open anusreelakshmi934 opened 1 day ago

anusreelakshmi934 commented 1 day ago

Container tests are only run in linux machines. When tried to run these tests both maven and gradle tests are failing.

Build link - https://github.com/anusreelakshmi934/liberty-tools-intellij/actions/runs/10935101423

It is failing due to - ERROR: "docker buildx build" requires exactly 1 argument. In maven image Same reason in gradle too

Attaching logs - Gradle

cd "/root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP" "/root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP/gradlew" libertyDevc [root@linux-test1 singleMod GradleMP]# cd "/root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP" [root@linux-test1 singleMod GradleMP]# "/root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP/gradlew" libertyDevc > Task :installLiberty > Task :libertyCreate > Task :compileJava > Task :processResources > Task :classes > Task :war > Task :deploy At least one application is not defined in the server configuration but the build file indicates it should be installed in the apps folder. Application configuration is being added to the target server configuration dropins folder by the plug-in. BUILD SUCCESSFUL in 14s 6 actionable tasks: 6 executed > Task :libertyDevc /root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP/build/wlp/usr/servers/defaultServer/configDropins/overrides/liberty-plugin-variable-config.xml file deleted before processing plugin configuration. Building Docker image... docker build --pull -f /root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP/build/.libertyDevc/tempDockerfile6118328961555745 -t singlemod-gradlemp-dev-mode /root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP The RUN features.sh command is detected in the Dockerfile and extra time may be necessary when installing features. ERROR: "docker buildx build" requires exactly 1 argument. See 'docker buildx build --help'. Usage:  docker buildx build [OPTIONS] PATH | URL | - Start a build > Task :libertyDevc FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':libertyDevc'. > io.openliberty.tools.common.plugins.util.PluginExecutionException: Could not build Docker image using Dockerfile: /root/Documents/liberty-tools-intellij/src/test/resources/projects/gradle sample/singleMod GradleMP/Dockerfile. Address the following docker build error and then start dev mode again: ERROR: "docker buildx build" requires exactly 1 argument. RC=1 * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org/ BUILD FAILED in 16s 1 actionable task: 1 executed

Attaching logs - Maven

cd "/root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP" ./mvnw io.openliberty.tools:liberty-maven-plugin:devc [root@linux-test1 singleModMavenMP]# cd "/root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP" [root@linux-test1 singleModMavenMP]# ./mvnw io.openliberty.tools:liberty-maven-plugin:devc [INFO] Scanning for projects... [INFO] [INFO] -----------------------< test:singleModMavenMP >------------------------ [INFO] Building singleModMavenMP 1.0-SNAPSHOT [INFO] --------------------------------[ war ]--------------------------------- [INFO] [INFO] --- liberty-maven-plugin:3.8.2:devc (default-cli) @ singleModMavenMP --- [INFO] The recompileDependencies parameter is set to "false". On a file change only the affected classes will be recompiled. [INFO] Running maven-resources-plugin:resources [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Running maven-compiler-plugin:compile on /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/pom.xml [INFO] Changes detected - recompiling the module! [INFO] Compiling 4 source files to /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/classes [INFO] Running maven-resources-plugin:testResources [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/src/test/resources [INFO] Running maven-compiler-plugin:testCompile on /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/pom.xml [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/test-classes [INFO] Running liberty:deploy [INFO] Copying 2 files to /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/liberty/wlp/usr/servers/defaultServer [WARNING] /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/liberty/wlp/usr/servers/defaultServer/bootstrap.properties file deleted before processing plugin configuration. [INFO] CWWKM2144I: Update server configuration file server.xml from /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/src/main/liberty/config/server.xml. [INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration. [INFO] CWWKM2185I: The liberty-maven-plugin configuration parameter "appsDirectory" value defaults to "apps". [INFO] Application configuration is found in server.xml : singleModMavenMP.war [INFO] CWWKM2160I: Installing application singleModMavenMP.war.xml. [INFO] Copying 2 files to /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/liberty/wlp/usr/servers/defaultServer [WARNING] /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/liberty/wlp/usr/servers/defaultServer/bootstrap.properties file deleted before processing plugin configuration. [INFO] CWWKM2144I: Update server configuration file server.xml from /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/src/main/liberty/config/server.xml. [INFO] CWWKM2144I: Update server configuration file bootstrap.properties from inlined configuration. [INFO] Building Docker image... [INFO] docker build --pull -f /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/target/.libertyDevc/tempDockerfile9097823524567487773 -t singlemodmavenmp-dev-mode /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP [INFO] The RUN features.sh command is detected in the Dockerfile and extra time may be necessary when installing features. [ERROR] ERROR: "docker buildx build" requires exactly 1 argument. [ERROR] See 'docker buildx build --help'. [ERROR] [ERROR] Usage: docker buildx build [OPTIONS] PATH | URL | - [ERROR] [ERROR] Start a build [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.986 s [INFO] Finished at: 2024-09-19T04:02:55-07:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.8.2:devc (default-cli) on project singleModMavenMP: Error starting the server in dev mode.: Could not build Docker image using Dockerfile: /root/Documents/liberty-tools-intellij/src/test/resources/projects/maven sample/singleModMavenMP/Dockerfile. Address the following docker build error and then start dev mode again: ERROR: "docker buildx build" requires exactly 1 argument. RC=1 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

anusreelakshmi934 commented 1 day ago

From further investigation we think this is happening due to the space in the directory name, which is being treated as two arguments.

Found some supporting links - https://forums.docker.com/t/error-docker-buildx-build-requires-exactly-1-argument-with-vs-code/136577/7?u=anusreelakshmi

turkeylurkey commented 1 day ago

Opened issue against dev mode to track this: https://github.com/OpenLiberty/ci.maven/issues/1830

turkeylurkey commented 1 day ago

We need to update the build.gradle files in test cases to use liberty gradle plugin version 3.8.1 or later. For Liberty Maven Plug-in it is 3.10.1 or later.

turkeylurkey commented 1 day ago

https://github.com/OpenLiberty/ci.gradle/releases