Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into kie-issues-1493
Browse files Browse the repository at this point in the history
  • Loading branch information
ljmotta committed Sep 27, 2024
2 parents 167dd1f + 275c07d commit 03884de
Show file tree
Hide file tree
Showing 177 changed files with 5,529 additions and 534 deletions.
21 changes: 21 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
github:
enabled_merge_buttons:
squash: true
merge: true
rebase: false
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-builder
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml'
defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst'
sh """#!/bin/bash -el
rm -rf "${defaultSettingsFile}"
cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}"
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/release-jobs/Jenkinsfile.kogito-swf-devmode
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ pipeline {
steps {
dir('kie-tools') {
script {
defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/settings.xml'
defaultSettingsFile = 'packages/sonataflow-image-common/resources/modules/kogito-maven/common/maven/maven-m2-repo-via-http-settings.xml.envsubst'
sh """#!/bin/bash -el
rm -rf "${defaultSettingsFile}"
cp "${env.MAVEN_SETTINGS_PATH}" "${defaultSettingsFile}"
Expand Down
2 changes: 1 addition & 1 deletion .ci/jenkins/shared-scripts/buildUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def pnpmUpdateProjectVersion(String projectVersion) {
*/
def pnpmUpdateKogitoVersion(String kogitoVersion, String imagesTag) {
sh """#!/bin/bash -el
pnpm update-kogito-version-to --maven ${kogitoVersion} --images-tag ${imagesTag}
pnpm update-kogito-version-to --maven ${kogitoVersion}
""".trim()
}

Expand Down
19 changes: 19 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,25 @@ runs:
gir1.2-appindicator3-0.1
fi
- name: "Setup xmllint (Ubuntu Only)"
shell: bash
run: |
echo "STEP: Setup xmllint library (Ubuntu Only)"
cd ${{ inputs.working_dir }}
if [ "${{ runner.os }}" == "Linux" ]; then
sudo apt-get install -y \
libxml2-utils > /dev/null 2>&1
fi
- name: "Update bash for macOS (macOS Only)"
shell: bash
if: runner.os == 'macOS'
run: |
echo "STEP: Update bash for macOS (macOS Only)"
brew update
brew install bash
echo "/usr/local/bin" >> $GITHUB_PATH
- name: "Print storage usage (after setup)"
shell: bash
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/supporting-files/ci/partitions/partition1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ chrome-extension-serverless-workflow-editor
vscode-extension-dashbuilder-editor
yard-vscode-extension
swf-vscode-extension
@kie-tools/sonataflow-management-console-image
@kie-tools/sonataflow-management-console-image
@kie/kogito-jit-runner-image
@kie/kogito-jobs-service-allinone-image
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ packages/scesim-marshaller/**/ts-gen
!packages/sonataflow-builder-image/test-resources/
!packages/sonataflow-devmode-image/test-resources/

# kogito-images: excluding test-resources
!packages/kogito-data-index-ephemeral-image/test-resources/
!packages/kogito-data-index-postgresql-image/test-resources/
!packages/kogito-jobs-service-ephemeral-image/test-resources/
!packages/kogito-jobs-service-postgresql-image/test-resources/
!packages/kogito-jobs-service-allinone-image/test-resources/
!packages/kogito-jit-runner-image/test-resources/

__pycache__
packages/python-venv/venv

Expand Down
2 changes: 1 addition & 1 deletion KOGITO_UPGRADE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ You can find an example of the Quarkus upgrade in [this PR](https://github.com/a

# Upgrading Kogito

In the root directory, run `pnpm update-kogito-version-to --maven [version] --images-tag [tag]`.
In the root directory, run `pnpm update-kogito-version-to --maven [version]`.

Of course, a new Kogito version may lead to incompatibilities in the code and with other dependencies. In such a case, an investigation and evetually a fix is required to complete the process.

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ To build and test all packages of the Apache KIE Tools project, you're going to
- Python `3.12` _(To install, follow these instructions: https://www.python.org/downloads/)_
- Helm `3.13.3` _(To install, follow these instructions: https://helm.sh/docs/intro/install/)_
- Make
- xmllint _(To install, follow these instructions: https://www.baeldung.com/linux/xmllint)_
- bash `5.x` _(On Linux or Nix you should be fine. On macOS, follow these instructions to use zsh: https://support.apple.com/102360)_

> **ℹ️ NOTE**
>
Expand Down
3 changes: 2 additions & 1 deletion devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"kubernetes-helm": "3.13.3",
"gnumake": "4.4.1",
"go": "1.21.9",
"python": "3.12.2"
"python": "3.12.2",
"libxml2": "2.13.3"
},
"env": {
"PLAYWRIGHT_BROWSERS_PATH": "0",
Expand Down
106 changes: 105 additions & 1 deletion devbox.lock
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,110 @@
}
}
},
"[email protected]": {
"last_modified": "2024-09-12T11:58:09Z",
"resolved": "github:NixOS/nixpkgs/280db3decab4cbeb22a4599bd472229ab74d25e1#libxml2",
"source": "devbox-search",
"version": "2.13.3",
"systems": {
"aarch64-darwin": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/7gi1kd2mz9jc8ya4lkqhlv9vklc5qr2j-libxml2-2.13.3-bin",
"default": true
},
{
"name": "dev",
"path": "/nix/store/mnij865rdzrrnxqmhj4s0abmd1xx771v-libxml2-2.13.3-dev"
},
{
"name": "devdoc",
"path": "/nix/store/80bkizndgvrqiq42ig681irxswsf4kxv-libxml2-2.13.3-devdoc"
},
{
"name": "out",
"path": "/nix/store/sr8lnkgivqcd06113nsk5p3jz2xcx7rp-libxml2-2.13.3"
}
],
"store_path": "/nix/store/7gi1kd2mz9jc8ya4lkqhlv9vklc5qr2j-libxml2-2.13.3-bin"
},
"aarch64-linux": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/gxpp5r2nbs3s0n5rw0jbnm1k5lhxrx13-libxml2-2.13.3-bin",
"default": true
},
{
"name": "devdoc",
"path": "/nix/store/0qnymx6l3c7998yscwvr1q64iz447hfc-libxml2-2.13.3-devdoc"
},
{
"name": "out",
"path": "/nix/store/da857dg9ip02lkci5nicgvkzf419jzc7-libxml2-2.13.3"
},
{
"name": "py",
"path": "/nix/store/qfpnqradhvhicl1hm70w7891bk95lkad-libxml2-2.13.3-py"
},
{
"name": "dev",
"path": "/nix/store/dph7mh2dhl8sl4i44wlgnmsrwdlcv0bc-libxml2-2.13.3-dev"
}
],
"store_path": "/nix/store/gxpp5r2nbs3s0n5rw0jbnm1k5lhxrx13-libxml2-2.13.3-bin"
},
"x86_64-darwin": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/gg4x2l8wy3lkd94bxpl0z7gnn9pa365i-libxml2-2.13.3-bin",
"default": true
},
{
"name": "dev",
"path": "/nix/store/pzakdvnmm99gic3mqyg8375b08dvkqxm-libxml2-2.13.3-dev"
},
{
"name": "devdoc",
"path": "/nix/store/xa27lhlrc2ya3i67g7nz53g64l3wqvjw-libxml2-2.13.3-devdoc"
},
{
"name": "out",
"path": "/nix/store/ac73mddfvraxgvd816r9h57df35mm6gd-libxml2-2.13.3"
}
],
"store_path": "/nix/store/gg4x2l8wy3lkd94bxpl0z7gnn9pa365i-libxml2-2.13.3-bin"
},
"x86_64-linux": {
"outputs": [
{
"name": "bin",
"path": "/nix/store/2y4a178s4w60v4m8749xhaawf8ga7cw5-libxml2-2.13.3-bin",
"default": true
},
{
"name": "dev",
"path": "/nix/store/v40g7q9zix1ycpyara08brd50m00471n-libxml2-2.13.3-dev"
},
{
"name": "devdoc",
"path": "/nix/store/cs49b70qkgygx0wxcl04dpy1d1g5vb91-libxml2-2.13.3-devdoc"
},
{
"name": "out",
"path": "/nix/store/nr8mh99sfsb1gw1b1qmrwhzmxbhj84j7-libxml2-2.13.3"
},
{
"name": "py",
"path": "/nix/store/p17nrcsmvb0q7b9g6347imljapbfcsb1-libxml2-2.13.3-py"
}
],
"store_path": "/nix/store/2y4a178s4w60v4m8749xhaawf8ga7cw5-libxml2-2.13.3-bin"
}
}
},
"[email protected]": {
"last_modified": "2024-03-22T11:26:23Z",
"resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#maven",
Expand Down Expand Up @@ -304,7 +408,7 @@
},
"[email protected]": {
"last_modified": "2024-03-22T11:26:23Z",
"plugin_version": "0.0.3",
"plugin_version": "0.0.4",
"resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#python312",
"source": "devbox-search",
"version": "3.12.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = composeEnv([rootEnv], {
description: "Tag version of this image. E.g., `main` or `10.0.x` or `10.0.0",
},
DEV_DEPLOYMENT_KOGITO_QUARKUS_BLANK_APP_IMAGE__mavenM2RepoViaHttpImage: {
default: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.tag}`,
default: `${mavenM2RepoViaHttpImageEnv.registry}/${mavenM2RepoViaHttpImageEnv.account}/${mavenM2RepoViaHttpImageEnv.name}:${mavenM2RepoViaHttpImageEnv.buildTag}`,
description: "The image tag for the Maven M2 Repo via HTTP. Used during the build only.",
},
}),
Expand Down
30 changes: 30 additions & 0 deletions packages/dmn-editor/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

const { config, babelTransform, typescriptTransform } = require("@kie-tools/jest-base/jest.config");

/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
...config,
testEnvironment: "node",
transform: {
...babelTransform,
...typescriptTransform,
},
};
10 changes: 9 additions & 1 deletion packages/dmn-editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
],
"scripts": {
"build:dev": "rimraf dist && pnpm copy:css && tsc -p tsconfig.json",
"build:prod": "rimraf dist && pnpm copy:css && pnpm lint && tsc -p tsconfig.json && pnpm test-e2e",
"build:prod": "rimraf dist && pnpm copy:css && pnpm lint && tsc -p tsconfig.json && pnpm test-e2e && pnpm test",
"build:storybook": "storybook build -o dist-storybook",
"copy:css": "copyfiles -u 1 \"src/**/*.{sass,scss,css}\" dist/",
"lint": "run-script-if --bool \"$(build-env linters.run)\" --then \"kie-tools--eslint ./src\"",
"start": "run-script-os",
"start:linux:darwin": "cross-env STORYBOOK_PORT=$(build-env dmnEditor.storybook.port) pnpm kie-tools--storybook --storybookArgs=\"dev --no-open\"",
"start:win32": "pnpm powershell \"cross-env STORYBOOK_PORT=$(build-env dmnEditor.storybook.port) pnpm kie-tools--storybook --storybookArgs='dev --no-open'",
"test": "run-script-if --ignore-errors \"$(build-env tests.ignoreFailures)\" --bool \"$(build-env tests.run)\" --then \"jest --silent --verbose --passWithNoTests\"",
"test-e2e": "run-script-if --ignore-errors \"$(build-env endToEndTests.ignoreFailures)\" --bool \"$(build-env endToEndTests.run)\" --then \"pnpm rimraf ./dist-tests-e2e\" \"pnpm test-e2e:run\"",
"test-e2e:open": "pnpm exec playwright show-report dist-tests-e2e/reports",
"test-e2e:run": "pnpm exec playwright test"
Expand Down Expand Up @@ -65,6 +66,7 @@
"@babel/preset-typescript": "^7.22.5",
"@kie-tools-core/webpack-base": "workspace:*",
"@kie-tools/eslint": "workspace:*",
"@kie-tools/jest-base": "workspace:*",
"@kie-tools/playwright-base": "workspace:*",
"@kie-tools/root-env": "workspace:*",
"@kie-tools/storybook-base": "workspace:*",
Expand All @@ -79,6 +81,8 @@
"@storybook/react-webpack5": "^7.3.2",
"@types/d3-drag": "^3.0.3",
"@types/d3-selection": "^3.0.6",
"@types/jest": "^29.5.12",
"@types/jest-when": "^3.5.5",
"@types/lodash": "^4.14.168",
"@types/node": "^20.14.2",
"@types/react": "^17.0.6",
Expand All @@ -89,11 +93,15 @@
"cross-env": "^7.0.3",
"deep-object-diff": "^1.1.9",
"file-loader": "^6.2.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"jest-when": "^3.6.0",
"lodash": "^4.17.21",
"rimraf": "^3.0.2",
"run-script-os": "^1.1.6",
"start-server-and-test": "^2.0.3",
"storybook": "^7.3.2",
"ts-jest": "^29.1.5",
"typescript": "^5.5.3",
"webpack": "^5.94.0",
"webpack-cli": "^4.10.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export function BoxedExpressionScreen({ container }: { container: React.RefObjec
const dmnEditorStoreApi = useDmnEditorStoreApi();

const thisDmn = useDmnEditorStore((s) => s.dmn);
const diagram = useDmnEditorStore((s) => s.diagram);

const activeDrgElementId = useDmnEditorStore((s) => s.boxedExpressionEditor.activeDrgElementId);
const isPropertiesPanelOpen = useDmnEditorStore((s) => s.boxedExpressionEditor.propertiesPanel.isOpen);
Expand Down
15 changes: 2 additions & 13 deletions packages/dmn-editor/src/mutations/updateExpressionWidths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,9 @@ export function updateExpressionWidths({
drdIndex: number;
widthsById: Map<string, number[]>;
}): void {
const { widthsExtension, widths } = addOrGetDrd({ definitions, drdIndex });
const componentWidthsMap = widths.reduce(
(acc, e) =>
e["@_dmnElementRef"]
? acc.set(
e["@_dmnElementRef"],
(e["kie:width"] ?? []).map((vv) => vv.__$$text)
)
: acc,
new Map<string, number[]>()
);
const { widthsExtension } = addOrGetDrd({ definitions, drdIndex });

widthsById.forEach((v, k) => componentWidthsMap.set(k, v));
widthsExtension["kie:ComponentWidths"] = [...componentWidthsMap.entries()].map(([k, v]) => ({
widthsExtension["kie:ComponentWidths"] = [...widthsById.entries()].map(([k, v]) => ({
"@_dmnElementRef": k,
"kie:width": v.map((vv) => ({ __$$text: vv })),
}));
Expand Down
Loading

0 comments on commit 03884de

Please sign in to comment.