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

[incubator-kie-issues#1534] Remove mvn and gradlew wrapper from source #3724

Merged
merged 1 commit into from
Nov 2, 2024

Conversation

mcruzdev
Copy link
Contributor

@mcruzdev mcruzdev commented Oct 15, 2024

Many thanks for submitting your Pull Request ❤️!

Closes apache/incubator-kie-issues#1534

Description:

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to this configuration
  • Pull Request title is properly formatted: Issue-XYZ Subject
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Issue-XYZ Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.

build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

@mcruzdev mcruzdev changed the title [incubator-kie-i1534] Remove mvn and gradlew wrapper from source [incubator-kie-issues#1534] Remove mvn and gradlew wrapper from source Oct 15, 2024
@mcruzdev
Copy link
Contributor Author

cc: @tiagobento @porcelli

@tiagobento
Copy link
Contributor

Multiple failures on PR checks... need to investigate here and merge when green.

@mcruzdev
Copy link
Contributor Author

I will investigate it as soon as I get some time

@kie-ci3
Copy link
Contributor

kie-ci3 commented Oct 18, 2024

PR job #4 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3724 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3724/4/display/redirect

Test results:

  • PASSED: 3382
  • FAILED: 1

Those are the test failures:

PR check / Build projects / org.kie.kogito.it.JDBCPersistenceIT.testAsyncWIH Assertion condition defined as a org.kie.kogito.it.PersistenceTest 1 expectation failed.
Expected status code <404> but was <200>.
within 10 seconds.

@porcelli
Copy link
Member

@mcruzdev you have this failure:

2024-10-16T14:55:24.4117300Z [INFO] Kogito :: Integration Tests :: Quarkus :: Gradle ... FAILURE [ 1.166 s]

2024-10-16T14:55:24.4669025Z [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.1:exec (integration-test) on project integration-tests-quarkus-gradle: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
2024-10-16T14:55:24.4672736Z org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.1:exec (integration-test) on project integration-tests-quarkus-gradle: Command execution failed.
2024-10-16T14:55:24.4675195Z     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
2024-10-16T14:55:24.4676597Z     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
2024-10-16T14:55:24.4677942Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
2024-10-16T14:55:24.4679269Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
2024-10-16T14:55:24.4680599Z     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
2024-10-16T14:55:24.4681957Z     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
2024-10-16T14:55:24.4683623Z     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
2024-10-16T14:55:24.4685280Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
2024-10-16T14:55:24.4687118Z     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
2024-10-16T14:55:24.4688980Z     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
2024-10-16T14:55:24.4690997Z     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
2024-10-16T14:55:24.4693061Z     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
2024-10-16T14:55:24.4694338Z     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
2024-10-16T14:55:24.4695373Z     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
2024-10-16T14:55:24.4696381Z     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
2024-10-16T14:55:24.4697380Z     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
2024-10-16T14:55:24.4698329Z     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
2024-10-16T14:55:24.4699235Z     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
2024-10-16T14:55:24.4700261Z     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
2024-10-16T14:55:24.4701599Z     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
2024-10-16T14:55:24.4703272Z     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
2024-10-16T14:55:24.4704543Z     at java.lang.reflect.Method.invoke (Method.java:569)
2024-10-16T14:55:24.4705688Z     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
2024-10-16T14:55:24.4707076Z     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
2024-10-16T14:55:24.4708485Z     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
2024-10-16T14:55:24.4709926Z     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
2024-10-16T14:55:24.4711216Z Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
2024-10-16T14:55:24.4712374Z     at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:462)
2024-10-16T14:55:24.4713832Z     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
2024-10-16T14:55:24.4715373Z     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
2024-10-16T14:55:24.4716760Z     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
2024-10-16T14:55:24.4718131Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
2024-10-16T14:55:24.4719472Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
2024-10-16T14:55:24.4720842Z     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
2024-10-16T14:55:24.4722185Z     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
2024-10-16T14:55:24.4723852Z     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
2024-10-16T14:55:24.4725394Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
2024-10-16T14:55:24.4726997Z     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
2024-10-16T14:55:24.4728821Z     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
2024-10-16T14:55:24.4730818Z     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
2024-10-16T14:55:24.4732739Z     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
2024-10-16T14:55:24.4734148Z     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
2024-10-16T14:55:24.4735346Z     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
2024-10-16T14:55:24.4736441Z     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
2024-10-16T14:55:24.4737412Z     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
2024-10-16T14:55:24.4738345Z     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
2024-10-16T14:55:24.4739254Z     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
2024-10-16T14:55:24.4740312Z     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
2024-10-16T14:55:24.4741663Z     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
2024-10-16T14:55:24.4743399Z     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
2024-10-16T14:55:24.4744608Z     at java.lang.reflect.Method.invoke (Method.java:569)
2024-10-16T14:55:24.4745753Z     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
2024-10-16T14:55:24.4747132Z     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
2024-10-16T14:55:24.4748547Z     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
2024-10-16T14:55:24.4750915Z     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
2024-10-16T14:55:24.4751778Z Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
2024-10-16T14:55:24.4752841Z     at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
2024-10-16T14:55:24.4754151Z     at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
2024-10-16T14:55:24.4755308Z     at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:881)
2024-10-16T14:55:24.4756196Z     at org.codehaus.mojo.exec.ExecMojo.executeCommandLine (ExecMojo.java:841)
2024-10-16T14:55:24.4757327Z     at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:447)
2024-10-16T14:55:24.4758509Z     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
2024-10-16T14:55:24.4759629Z     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
2024-10-16T14:55:24.4760795Z     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
2024-10-16T14:55:24.4761775Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
2024-10-16T14:55:24.4762843Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
2024-10-16T14:55:24.4763644Z     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
2024-10-16T14:55:24.4764422Z     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
2024-10-16T14:55:24.4765304Z     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
2024-10-16T14:55:24.4766206Z     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
2024-10-16T14:55:24.4767140Z     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
2024-10-16T14:55:24.4768397Z     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
2024-10-16T14:55:24.4770428Z     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
2024-10-16T14:55:24.4772283Z     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
2024-10-16T14:55:24.4773760Z     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
2024-10-16T14:55:24.4774523Z     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
2024-10-16T14:55:24.4775128Z     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
2024-10-16T14:55:24.4783661Z     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
2024-10-16T14:55:24.4784384Z     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
2024-10-16T14:55:24.4784986Z     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
2024-10-16T14:55:24.4785600Z     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
2024-10-16T14:55:24.4786400Z     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
2024-10-16T14:55:24.4787319Z     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
2024-10-16T14:55:24.4788034Z     at java.lang.reflect.Method.invoke (Method.java:569)
2024-10-16T14:55:24.4788706Z     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
2024-10-16T14:55:24.4789532Z     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
2024-10-16T14:55:24.4790349Z     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
2024-10-16T14:55:24.4791168Z     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
2024-10-16T14:55:24.4791689Z [ERROR] ```

@mcruzdev
Copy link
Contributor Author

mcruzdev commented Oct 19, 2024

I got the issue, the maven calls ./gradlew and the ./gradlew needs the:

  • gradle/wrapper/gradle-wrapper.jar
  • gradle/wrapper/gradle-wrapper.properties

I will try to solve it downloading/using/deleting... or in another way...

Maybe we can run gradle without calling ./gradlew, I do not know if gradle is available at the pipeline, we need to test.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Oct 19, 2024

PR job #5 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3724 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3724/5/display/redirect

Test results:

  • PASSED: 2472
  • FAILED: 1

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testEventBasedSplit2
expected: 2
but was: 1

@mcruzdev
Copy link
Contributor Author

mcruzdev commented Oct 20, 2024

Okay, gradle is not available ;/

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.1.1:exec (run-gradle) on project integration-tests-quarkus-gradle: Command execution failed. Cannot run program "gradle" (in directory "/home/jenkins/jenkins-agent/workspace/_jobs_kogito-runtimes-pr_PR-3724@2/kogito-pipelines/bc/apache_incubator-kie-kogito-runtimes/quarkus/integration-tests/integration-tests-quarkus-gradle/integration-tests-quarkus-gradle-project"): error=2, No such file or directory -> [Help 1]

@porcelli can I add gradle to pipeline? Or do you prefer to download it in build time... we need gradle just for this case in specific.

@mcruzdev
Copy link
Contributor Author

mcruzdev commented Oct 28, 2024

As discussed in apache/incubator-kie-issues#1577 weekly! I removed the integration tests for gradle.

cc: @lucamolteni

@porcelli
Copy link
Member

porcelli commented Nov 1, 2024

Test failure seems unrelated.

2024-11-01T20:57:04.0011185Z [ERROR] Tests run: 49, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 5.665 s <<< FAILURE! -- in org.jbpm.bpmn2.StandaloneBPMNProcessTest
2024-11-01T20:57:04.0017658Z [ERROR] org.jbpm.bpmn2.StandaloneBPMNProcessTest.testEventBasedSplit2 -- Time elapsed: 0.526 s <<< FAILURE!
2024-11-01T20:57:04.0019079Z org.opentest4j.AssertionFailedError: 
2024-11-01T20:57:04.0019634Z 
2024-11-01T20:57:04.0019879Z expected: 2
2024-11-01T20:57:04.0020336Z  but was: 1
2024-11-01T20:57:04.0021329Z 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2024-11-01T20:57:04.0023222Z 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
2024-11-01T20:57:04.0025449Z 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2024-11-01T20:57:04.0027886Z 	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
2024-11-01T20:57:04.0029586Z 	at org.jbpm.bpmn2.StandaloneBPMNProcessTest.testEventBasedSplit2(StandaloneBPMNProcessTest.java:405)
2024-11-01T20:57:04.0031047Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
2024-11-01T20:57:04.0032060Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-11-01T20:57:04.0033071Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-11-01T20:57:04.0037528Z 
2024-11-01T20:57:04.0596934Z [INFO] 
2024-11-01T20:57:04.0597398Z [INFO] Results:
2024-11-01T20:57:04.0597800Z [INFO] 
2024-11-01T20:57:04.0598136Z [ERROR] Failures: 
2024-11-01T20:57:04.0598859Z [ERROR]   StandaloneBPMNProcessTest.testEventBasedSplit2:405 
2024-11-01T20:57:04.0599983Z expected: 2
2024-11-01T20:57:04.0600356Z  but was: 1
2024-11-01T20:57:04.0600716Z [INFO] 
2024-11-01T20:57:04.0601241Z [ERROR] Tests run: 466, Failures: 1, Errors: 0, Skipped: 33

Copy link
Contributor

@martinweiler martinweiler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @mcruzdev !

@mcruzdev
Copy link
Contributor Author

mcruzdev commented Nov 1, 2024

I am here to help! And prepared to the next :)

@porcelli porcelli merged commit 92d9570 into apache:main Nov 2, 2024
5 of 6 checks passed
@pibizza
Copy link
Contributor

pibizza commented Nov 2, 2024

@mcruzdev thank you for the PR! Can you backport this to 10.0.x branch? We need this to move forward the release for 10.0.0.

@porcelli
Copy link
Member

porcelli commented Nov 2, 2024

@pibizza im taking care of the backport

rgdoliveira pushed a commit to rgdoliveira/kogito-runtimes that referenced this pull request Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Maven and Gradle wrapper from source
6 participants