Skip to content

Commit

Permalink
Merge branch '1.13.x-next' into mergeNextOnRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
spolti committed Sep 5, 2023
2 parents eff9c82 + 1e5d48f commit 05aa6ad
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 85 deletions.
4 changes: 2 additions & 2 deletions .ci/jenkins/Jenkinsfile.deploy
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ pipeline {
JAVA_HOME = "${GRAALVM_HOME}"

// Linked to node label
CONTAINER_ENGINE='docker'
CONTAINER_ENGINE_TLS_OPTIONS=''
CONTAINER_ENGINE = 'docker'
CONTAINER_ENGINE_TLS_OPTIONS = ''

OPENSHIFT_API = credentials('OPENSHIFT_API')
OPENSHIFT_REGISTRY = credentials('OPENSHIFT_REGISTRY')
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr-backporting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Pull Request Backporting
on:
pull_request_target:
types: [closed, labeled]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -31,8 +30,11 @@ jobs:
matrix:
target-branch: ${{ fromJSON(needs.compute-targets.outputs.target-branches) }}
fail-fast: false
env:
REVIEWERS: ${{ toJSON(github.event.pull_request.requested_reviewers) }}
steps:
- name: Backporting
uses: kiegroup/kie-ci/.ci/actions/backporting@main
with:
target-branch: ${{ matrix.target-branch }}
additional-reviewers: ${REVIEWERS}
3 changes: 2 additions & 1 deletion modules/kogito-openjdk/11-headless/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ envs:

packages:
install:
- java-11-openjdk-headless
- tzdata-java # Fix for new openjdk installations. See https://bugzilla.redhat.com/show_bug.cgi?id=2224411
- java-11-openjdk-headless
3 changes: 2 additions & 1 deletion modules/kogito-openjdk/11/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ execute:

packages:
install:
- java-11-openjdk-devel
- tzdata-java # Fix for new openjdk installations. See https://bugzilla.redhat.com/show_bug.cgi?id=2224411
- java-11-openjdk-devel

2 changes: 1 addition & 1 deletion modules/rhpam-kogito-prod-profile/module.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
schema_version: 1
name: org.kie.kogito.rhpam.prod.profile
version: '7.13.3'
version: '7.13.4'
description: Holds custom configurations for productized Kogito images. Add as first module to be installed.

envs:
Expand Down
4 changes: 2 additions & 2 deletions rhpam-kogito-builder-rhel8-overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version: 1

name: "rhpam-7/rhpam-kogito-builder-rhel8"
version: "7.13.3"
version: "7.13.4"
from: "registry.redhat.io/ubi8/ubi-minimal:latest"
description: "RHPAM Platform for building Kogito based on Quarkus or SpringBoot"

Expand Down Expand Up @@ -43,7 +43,7 @@ ports:
modules:
install:
- name: org.kie.kogito.rhpam.prod.profile
version: "7.13.3"
version: "7.13.4"
- name: org.kie.kogito.image.dependencies
- name: org.kie.kogito.system.user
- name: org.kie.kogito.logging
Expand Down
18 changes: 9 additions & 9 deletions rhpam-kogito-imagestream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ items:
openshift.io/provider-display-name: Kie Group.
spec:
tags:
- name: '7.13.3'
- name: '7.13.4'
annotations:
description: RHPAM Runtime image for Kogito based on Quarkus or SpringBoot JVM image
iconClass: icon-jbpm
tags: rhpam-kogito,runtime,kogito,quarkus,springboot,jvm
supports: quarkus
version: '7.13.3'
version: '7.13.4'
referencePolicy:
type: Local
from:
kind: DockerImage
name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-jvm-rhel8:7.13.3
name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-jvm-rhel8:7.13.4
- kind: ImageStream
apiVersion: v1
metadata:
Expand All @@ -36,18 +36,18 @@ items:
openshift.io/provider-display-name: Kie Group.
spec:
tags:
- name: '7.13.3'
- name: '7.13.4'
annotations:
description: RHPAM Runtime image for Kogito based on Quarkus native image
iconClass: icon-jbpm
tags: rhpam-kogito,runtime,kogito,quarkus,native
supports: quarkus
version: '7.13.3'
version: '7.13.4'
referencePolicy:
type: Local
from:
kind: DockerImage
name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-native-rhel8:7.13.3
name: registry.redhat.io/rhpam-7/rhpam-kogito-runtime-native-rhel8:7.13.4
- kind: ImageStream
apiVersion: v1
metadata:
Expand All @@ -57,16 +57,16 @@ items:
openshift.io/provider-display-name: Kie Group.
spec:
tags:
- name: '7.13.3'
- name: '7.13.4'
annotations:
description: RHPAM Platform for building Kogito based on Quarkus or SpringBoot
iconClass: icon-jbpm
tags: rhpam-kogito,builder,kogito,quarkus,springboot
supports: quarkus
version: '7.13.3'
version: '7.13.4'
referencePolicy:
type: Local
from:
kind: DockerImage
name: registry.redhat.io/rhpam-7/rhpam-kogito-builder-rhel8:7.13.3
name: registry.redhat.io/rhpam-7/rhpam-kogito-builder-rhel8:7.13.4

2 changes: 1 addition & 1 deletion rhpam-kogito-runtime-jvm-rhel8-overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version: 1

name: "rhpam-7/rhpam-kogito-runtime-jvm-rhel8"
version: "7.13.3"
version: "7.13.4"
from: "registry.redhat.io/ubi8/ubi-minimal:latest"
description: "RHPAM Runtime image for Kogito based on Quarkus or SpringBoot JVM image"

Expand Down
2 changes: 1 addition & 1 deletion rhpam-kogito-runtime-native-rhel8-overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version: 1

name: "rhpam-7/rhpam-kogito-runtime-native-rhel8"
version: "7.13.3"
version: "7.13.4"
from: "registry.redhat.io/ubi8/ubi-minimal:latest"
description: "RHPAM Runtime image for Kogito based on Quarkus native image"

Expand Down
3 changes: 0 additions & 3 deletions scripts/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ def update_module_version(module_dir, target_version):
:param target_version: version to set into the module
"""

image_version = retrieve_image_version()
file_updated = False

try:
module_file = os.path.join(module_dir, "module.yaml")
with open(module_file) as module:
Expand Down
19 changes: 11 additions & 8 deletions tests/features/common-dynamic-resources.feature
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Feature: Common tests for Kogito images
Scenario: Verify if the properties were correctly set using DEFAULT MEM RATIO
When container is started with args
| arg | value |
| command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" |
| mem_limit | 1073741824 |
| env_json | {"SCRIPT_DEBUG":"true", "JAVA_MAX_MEM_RATIO": 80, "JAVA_INITIAL_MEM_RATIO": 25} |
Then container log should match regex -Xms205m
Expand All @@ -31,30 +32,32 @@ Feature: Common tests for Kogito images
Scenario: Verify if the DEFAULT MEM RATIO properties are overridden with different values
When container is started with args
| arg | value |
| command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" |
| mem_limit | 1073741824 |
| env_json | {"SCRIPT_DEBUG":"true", "JAVA_MAX_MEM_RATIO": 50, "JAVA_INITIAL_MEM_RATIO": 10} |
Then container log should match regex -Xms51m
And container log should match regex -Xmx512m

Scenario: Verify if the properties were correctly set when aren't passed
When container is started with args
| arg | value |
| mem_limit | 1073741824 |
| env_json | {"SCRIPT_DEBUG":"true"} |
| arg | value |
| command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" |
| mem_limit | 1073741824 |
| env_json | {"SCRIPT_DEBUG":"true"} |
Then container log should match regex -Xms128m
And container log should match regex -Xmx512m

Scenario: Verify if Java Remote Debug is correctly configured
When container is started with env
| variable | value |
| SCRIPT_DEBUG | true |
| JAVA_DEBUG | true |
|JAVA_DEBUG_PORT | 9222 |
When container is started with args
| arg | value |
| command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" |
| env_json | {"SCRIPT_DEBUG":"true", "JAVA_DEBUG":"true", "JAVA_DEBUG_PORT":"9222"} |
Then container log should match regex -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9222

Scenario: Verify if the DEFAULT MEM RATIO properties are overridden with different values from user provided Xmx and Xms
When container is started with args
| arg | value |
| command | bash -c "sleep 2s; /home/kogito/kogito-app-launch.sh" |
| mem_limit | 1073741824 |
| env_json | {"SCRIPT_DEBUG":"true", "JAVA_MAX_MEM_RATIO": 50, "JAVA_INITIAL_MEM_RATIO": 10, "JAVA_OPTIONS":"-Xms4000m -Xmx8000m"} |
Then container log should match regex -Xms4000m
Expand Down
26 changes: 6 additions & 20 deletions tests/features/kogito-builder-native.feature
Original file line number Diff line number Diff line change
Expand Up @@ -83,32 +83,19 @@ Feature: kogito-builder image native build tests
# And s2i build log should contain '/home/kogito/bin/persons.proto' -> '/home/kogito/data/protobufs/persons.proto'
# And s2i build log should contain -J-Xmx5153960755

Scenario: Perform a incremental s2i build for native test
Scenario: Perform an incremental s2i build for native test
Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x
| variable | value |
| RUNTIME_TYPE | quarkus |
| NATIVE | false |
Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
And file /home/kogito/bin/quarkus-run.jar should exist
And check that page is served
| property | value |
| port | 8080 |
| path | /hello |
| request_method | POST |
| content_type | application/json |
| request_body | {"strings":["hello"]} |
| wait | 80 |
| expected_phrase | ["hello","world"] |

# Since the same image is used we can do a subsequent incremental build and verify if it is working as expected.
Scenario:Perform a second incremental s2i build for native scenario, this time, with native enabled
Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x
And s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x
| variable | value |
| RUNTIME_TYPE | quarkus |
| NATIVE | true |
| LIMIT_MEMORY | 6442450944 |
Then s2i build log should contain Expanding artifacts from incremental build...
And s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
And s2i build log should contain Expanding artifacts from incremental build...
And s2i build log should contain -J-Xmx5153960755
And file /home/kogito/bin/rules-quarkus-helloworld-runner should exist
And check that page is served
| property | value |
Expand All @@ -118,8 +105,7 @@ Feature: kogito-builder image native build tests
| content_type | application/json |
| request_body | {"strings":["hello"]} |
| wait | 80 |
| expected_phrase | ["hello","world"] |
And s2i build log should contain -J-Xmx5153960755
| expected_phrase | ["hello","world"] |

Scenario: Verify that the Kogito Maven archetype is generating the project and compiling it correctly using native build
Given s2i build /tmp/kogito-examples from dmn-example using 1.13.x and runtime-image quay.io/kiegroup/kogito-runtime-native:latest
Expand Down
52 changes: 17 additions & 35 deletions tests/features/kogito-common-builder-jvm.feature
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,17 @@ Feature: kogito-builder image JVM build tests
| expected_phrase | ["hello","world"] |
And file /home/kogito/bin/quarkus-run.jar should exist

Scenario: Perform a incremental s2i build using quarkus runtime type
Scenario: Perform an incremental s2i build using quarkus runtime type
Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x
| variable | value |
| RUNTIME_TYPE | quarkus |
| NATIVE | false |
Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
And file /home/kogito/bin/quarkus-run.jar should exist
And check that page is served
| property | value |
| port | 8080 |
| path | /hello |
| request_method | POST |
| content_type | application/json |
| request_body | {"strings":["hello"]} |
| wait | 80 |
| expected_phrase | ["hello","world"] |

# Since the same image is used we can do a subsequent incremental build and verify if it is working as expected.
Scenario: Perform a second incremental s2i build using quarkus runtime type
Given s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x
And s2i build https://github.com/kiegroup/kogito-examples.git from rules-quarkus-helloworld with env and incremental using 1.13.x
| variable | value |
| RUNTIME_TYPE | quarkus |
| NATIVE | false |
Then s2i build log should contain Expanding artifacts from incremental build...
And s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
Then s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
And s2i build log should contain Expanding artifacts from incremental build...
And file /home/kogito/bin/quarkus-run.jar should exist
And check that page is served
| property | value |
Expand All @@ -121,7 +107,6 @@ Feature: kogito-builder image JVM build tests
| wait | 80 |
| expected_phrase | ["hello","world"] |


#### SpringBoot Scenarios

Scenario: Verify if the s2i build is finished as expected with debug enabled
Expand Down Expand Up @@ -198,30 +183,27 @@ Feature: kogito-builder image JVM build tests
And container log should contain Started KogitoSpringbootApplication
And run sh -c 'echo $JAVA_OPTIONS' in container and immediately check its output for -Ddebug=true

Scenario: Perform a incremental s2i build using springboot runtime type
Given s2i build https://github.com/kiegroup/kogito-examples.git from ruleunit-springboot-example with env and incremental using 1.13.x
Scenario: Perform an incremental s2i build using springboot runtime type
Given s2i build https://github.com/kiegroup/kogito-examples.git from process-springboot-example with env and incremental using 1.13.x
# Leave those here as placeholder for scripts adding variable to the test. No impact on tests if empty.
| variable | value |
| RUNTIME_TYPE | springboot |
Then check that page is served
| property | value |
| port | 8080 |
| path | /find-approved |
| wait | 80 |
| request_method | POST |
| request_body | {"maxAmount":5000,"loanApplications":[{"id":"ABC10001","amount":2000,"deposit":100,"applicant":{"age":45,"name":"John"}}]} |
| content_type | application/json |
| expected_status_code | 200 |
And file /home/kogito/bin/ruleunit-springboot-example.jar should exist

# Since the same image is used we can do a subsequent incremental build and verify if it is working as expected.
Scenario: Perform a second incremental s2i build using springboot runtime type
Given s2i build https://github.com/kiegroup/kogito-examples.git from ruleunit-springboot-example with env and incremental using 1.13.x
And s2i build https://github.com/kiegroup/kogito-examples.git from process-springboot-example with env and incremental using 1.13.x
# Leave those here as placeholder for scripts adding variable to the test. No impact on tests if empty.
| variable | value |
| RUNTIME_TYPE | springboot |
Then s2i build log should contain Expanding artifacts from incremental build...
And s2i build log should not contain WARNING: Clean build will be performed because of error saving previous build artifacts
And file /home/kogito/bin/process-springboot-example.jar should exist
And check that page is served
| property | value |
| port | 8080 |
| path | /orders |
| wait | 80 |
| request_method | POST |
| request_body | {"approver" : "john", "order" : {"orderNumber" : "12345", "shipped" : false}} |
| content_type | application/json |
| expected_status_code | 201 |

Scenario: Verify if the s2i build is finished as expected with uber-jar package type built
Given s2i build https://github.com/kiegroup/kogito-examples.git from ruleunit-quarkus-example using 1.13.x and runtime-image quay.io/kiegroup/kogito-runtime-jvm:latest
Expand Down

0 comments on commit 05aa6ad

Please sign in to comment.