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#820] Make Drools and Kogito build reproducible #1953

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

gitgabrio
Copy link
Contributor

Fixes apache/incubator-kie-issues#820

apache/incubator-kie-kogito-runtimes#3356 Must be merged before

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.

How to retest this PR or trigger a specific build:
  • for pull request checks
    Please add comment: Jenkins retest this

  • for a specific pull request check
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] tests

  • for quarkus branch checks
    Run checks against Quarkus current used branch
    Please add comment: Jenkins run quarkus-branch

  • for a quarkus branch specific check
    Run checks against Quarkus current used branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] quarkus-branch

  • for quarkus main checks
    Run checks against Quarkus main branch
    Please add comment: Jenkins run quarkus-main

  • for a specific quarkus main check
    Run checks against Quarkus main branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] quarkus-main

  • for quarkus lts checks
    Run checks against Quarkus lts branch
    Please add comment: Jenkins run quarkus-lts

  • for a specific quarkus lts check
    Run checks against Quarkus lts branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] quarkus-lts

  • for native checks
    Run native checks
    Please add comment: Jenkins run native

  • for a specific native check
    Run native checks
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] native

  • for native lts checks
    Run native checks against quarkus lts branch
    Please add comment: Jenkins run native-lts

  • for a specific native lts check
    Run native checks against quarkus lts branch
    Please add comment: Jenkins (re)run [kogito-apps|kogito-examples] native-lts

How to backport a pull request to a different branch?

In order to automatically create a backporting pull request please add one or more labels having the following format backport-<branch-name>, where <branch-name> is the name of the branch where the pull request must be backported to (e.g., backport-7.67.x to backport the original PR to the 7.67.x branch).

NOTE: backporting is an action aiming to move a change (usually a commit) from a branch (usually the main one) to another one, which is generally referring to a still maintained release branch. Keeping it simple: it is about to move a specific change or a set of them from one branch to another.

Once the original pull request is successfully merged, the automated action will create one backporting pull request per each label (with the previous format) that has been added.

If something goes wrong, the author will be notified and at this point a manual backporting is needed.

NOTE: this automated backporting is triggered whenever a pull request on main branch is labeled or closed, but both conditions must be satisfied to get the new PR created.

Quarkus-3 PR check is failing ... what to do ? The Quarkus 3 check is applying patches from the `.ci/environments/quarkus-3/patches`.

The first patch, called 0001_before_sh.patch, is generated from Openrewrite .ci/environments/quarkus-3/quarkus3.yml recipe. The patch is created to speed up the check. But it may be that some changes in the PR broke this patch.
No panic, there is an easy way to regenerate it. You just need to comment on the PR:

jenkins rewrite quarkus-3

and it should, after some minutes (~20/30min) apply a commit on the PR with the patch regenerated.

Other patches were generated manually. If any of it fails, you will need to manually update it... and push your changes.

@gitgabrio
Copy link
Contributor Author

@mariofusco @yesamer @porcelli
Current status

  1. mvn artifact:check-buildplan -> succeed
  2. mvn clean install -DskipTests -Dquickly -> succeed
  3. mvn clean verify -DskipTests -Dquickly artifact:compare -> fails due to

[diffoscope jobs-service/jobs-recipients/job-http-recipient/runtime/target/reference/job-http-recipient-999-SNAPSHOT.jar jobs-service/jobs-recipients/job-http-recipient/runtime/target/job-http-recipient-999-SNAPSHOT.jar

--- jobs-service/jobs-recipients/job-http-recipient/runtime/target/reference/job-http-recipient-999-SNAPSHOT.jar
+++ jobs-service/jobs-recipients/job-http-recipient/runtime/target/job-http-recipient-999-SNAPSHOT.jar
├── zipinfo -v {}
│ @@ -452,15 +452,15 @@
│    minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
│    minimum software version required to extract:   2.0
│    compression method:                             deflated
│    compression sub-type (deflation):               normal
│    file security status:                           not encrypted
│    extended local header:                          no
│    file last modified on (DOS date/time):          2024 Jan 16 00:00:00
│ -  32-bit CRC value (hex):                         e73f1883
│ +  32-bit CRC value (hex):                         329f2ce1
│    compressed size:                                131 bytes
│    uncompressed size:                              145 bytes
│    length of filename:                             37 characters
│    length of extra field:                          0 bytes
│    length of file comment:                         0 characters
│    disk number on which file begins:               disk 1
│    apparent file type:                             binary
│ @@ -510,15 +510,15 @@
│    minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
│    minimum software version required to extract:   2.0
│    compression method:                             deflated
│    compression sub-type (deflation):               normal
│    file security status:                           not encrypted
│    extended local header:                          no
│    file last modified on (DOS date/time):          2024 Jan 16 00:00:00
│ -  32-bit CRC value (hex):                         d1badec1
│ +  32-bit CRC value (hex):                         c14c0898
│    compressed size:                                243 bytes
│    uncompressed size:                              508 bytes
│    length of filename:                             35 characters
│    length of extra field:                          0 bytes
│    length of file comment:                         0 characters
│    disk number on which file begins:               disk 1
│    apparent file type:                             binary
├── META-INF/quarkus-extension.properties
│ @@ -1,3 +1,3 @@
│  #Generated by extension-descriptor
│ -#Thu Jan 18 10:27:20 CET 2024
│ +#Thu Jan 18 10:31:10 CET 2024
│  deployment-artifact=org.kie.kogito\:job-http-recipient-deployment\:999-SNAPSHOT
├── META-INF/quarkus-javadoc.properties
│ @@ -1,4 +1,4 @@
│  #
│ -#Thu Jan 18 10:27:17 CET 2024
│ +#Thu Jan 18 10:31:10 CET 2024
│  org.kie.kogito.job.http.recipient.JobHttpRecipientRuntimeConfiguration.maxTimeoutInMillis=Max accepted timeout to execute HTTP requests for the HttpRecipient when the Job's timeout is configured.\nAttempts to surpass this value will result in a validation error at Job creation time.
│  org.kie.kogito.job.http.recipient.JobHttpRecipientRuntimeConfiguration.timeoutInMillis=Default timeout to execute HTTP requests for the HttpRecipient when the Job's timeout is not configured.

diffoscope jobs-service/jobs-recipients/job-http-recipient/runtime/target/reference/job-http-recipient-999-SNAPSHOT-sources.jar jobs-service/jobs-recipients/job-http-recipient/runtime/target/job-http-recipient-999-SNAPSHOT-sources.jar

--- jobs-service/jobs-recipients/job-http-recipient/runtime/target/reference/job-http-recipient-999-SNAPSHOT-sources.jar
+++ jobs-service/jobs-recipients/job-http-recipient/runtime/target/job-http-recipient-999-SNAPSHOT-sources.jar
├── zipinfo -v {}
│ @@ -568,15 +568,15 @@
│    minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
│    minimum software version required to extract:   2.0
│    compression method:                             deflated
│    compression sub-type (deflation):               normal
│    file security status:                           not encrypted
│    extended local header:                          no
│    file last modified on (DOS date/time):          2024 Jan 16 00:00:00
│ -  32-bit CRC value (hex):                         d1badec1
│ +  32-bit CRC value (hex):                         c14c0898
│    compressed size:                                243 bytes
│    uncompressed size:                              508 bytes
│    length of filename:                             74 characters
│    length of extra field:                          0 bytes
│    length of file comment:                         0 characters
│    disk number on which file begins:               disk 1
│    apparent file type:                             binary
├── org/kie/kogito/job/http/recipient/JobHttpRecipientRuntimeConfiguration.jdp
│ @@ -1,4 +1,4 @@
│  #
│ -#Thu Jan 18 10:27:17 CET 2024
│ +#Thu Jan 18 10:31:10 CET 2024
│  org.kie.kogito.job.http.recipient.JobHttpRecipientRuntimeConfiguration.maxTimeoutInMillis=Max accepted timeout to execute HTTP requests for the HttpRecipient when the Job's timeout is configured.\nAttempts to surpass this value will result in a validation error at Job creation time.
│  org.kie.kogito.job.http.recipient.JobHttpRecipientRuntimeConfiguration.timeoutInMillis=Default timeout to execute HTTP requests for the HttpRecipient when the Job's timeout is not configured.

diff jobs-service/jobs-recipients/job-http-recipient/runtime/target/reference/job-http-recipient-999-SNAPSHOT.buildinfo jobs-service/jobs-recipients/job-http-recipient/runtime/target/job-http-recipient-999-SNAPSHOT.buildinfo

0a1,15
> # https://reproducible-builds.org/docs/jvm/
> buildinfo.version=1.0-SNAPSHOT
> 
> name=Kogito Apps :: Jobs Service :: Job Http Recipient - Runtime
> group-id=org.kie.kogito
> artifact-id=job-http-recipient
> version=999-SNAPSHOT
> 
> # source information
> source.scm.uri=scm:git:https://github.com/apache/incubator-kie-kogito-runtimes.git/kogito-build/kogito-dependencies-bom/kogito-build-no-bom-parent/kogito-build-parent/kogito-apps/kogito-apps-build-parent/jobs-service/jobs-recipients/job-http-recipient-parent/job-http-recipient
> source.scm.tag=HEAD
> 
> # build instructions
> build-tool=mvn
> 
2,3c17,19
< java.version=17 (from MANIFEST.MF Build-Jdk-Spec)
< os.name=Unix (from pom.properties newline)
---
> java.version=17.0.9
> java.vendor=Oracle Corporation
> os.name=Mac OS X
4a21,25
> # Maven rebuild instructions and effective environment
> mvn.version=3.9.6
> 
> # output
> 
11c32
< outputs.1.checksums.sha512=d0deb4df9f846305e2e97bd342bf8d0c804865863b62fc61dd7580044e922f3472ba57263bd1fd70aaf552f40032cf73c605f25e2e50ab7372e9de32d712fd04
---
> outputs.1.checksums.sha512=934fc9a8244aa186b9727cbecb4873bb4bcc0e65b95f27ae0dcaf5d85c60059388b80c4121a81f9864c6f0506e79918e60c89dc5e2dfedb444e136a1dd007ab4
19c40
< outputs.3.checksums.sha512=f5d9e1398a0a761e4dfb407a1df69f503de40fbb776e473ab23eb2aa58f42c470db5305a016c2ae63db42814515cb5656b6ebf3ca604fd4cae78c99a2a8b989c
---
> outputs.3.checksums.sha512=de9249488198d6e307dcceb8e679d83b3a25abe55acebf4d05a9f9879b3620d119a3f31bec73adaa8a56061c98519f4e66e10871b4144942f28c10a23c2bc031

@gitgabrio gitgabrio marked this pull request as ready for review January 18, 2024 10:50
@mariofusco mariofusco merged commit fd3d416 into apache:main Jan 18, 2024
8 of 9 checks passed
@gitgabrio gitgabrio deleted the incubator-kie-issues#820 branch January 19, 2024 13:28
rgdoliveira pushed a commit to rgdoliveira/kogito-apps that referenced this pull request Jan 25, 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.

Make Drools and Kogito build reproducible
3 participants