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

Start in Container tests failing in GradleSingleModMPSIDProjectTest and MavenSingleModMPSIDProjectTest #983

Closed
anusreelakshmi934 opened this issue Sep 19, 2024 · 6 comments
Assignees
Labels
automated tests bug Something isn't working

Comments

@anusreelakshmi934
Copy link
Contributor

anusreelakshmi934 commented Sep 19, 2024

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.

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
Copy link
Contributor Author

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
Copy link
Member

Opened issue against dev mode to track this: OpenLiberty/ci.maven#1830

@turkeylurkey turkeylurkey added bug Something isn't working automated tests labels Sep 19, 2024
@turkeylurkey
Copy link
Member

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
Copy link
Member

@anusreelakshmi934
Copy link
Contributor Author

Updated the LGP and LMP in this PR. Since the container tests are not enabled yet, this issue remains open.

@anusreelakshmi934 anusreelakshmi934 self-assigned this Nov 8, 2024
@anusreelakshmi934
Copy link
Contributor Author

Verified this Issue no longer occurs after enabling the device tests. Hence closing the issue

@github-project-automation github-project-automation bot moved this from In Progress to Sprint Closed in Open Liberty Developer Experience Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated tests bug Something isn't working
Projects
Development

No branches or pull requests

2 participants