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

kie-tools-issues#2641: Upgrade Patternfly to v5 #2853

Open
wants to merge 126 commits into
base: main
Choose a base branch
from

Conversation

kumaradityaraj
Copy link
Contributor

@kumaradityaraj kumaradityaraj commented Jan 13, 2025

Closes #1877
Closes #2641

Upgrade Patternfly from v4 to v5 to the full repository following PatternFly's migration.

guide: https://www.patternfly.org/get-started/upgrade/#patternfly-5

Updated packages
@kie-tools-core/editor
@kie-tools-examples/base64png-editor
@kie-tools-examples/uniforms-patternfly
@kie-tools-examples/webapp
@kie-tools/boxed-expression-component
@kie-tools/dashbuilder-component-table
@kie-tools/dashbuilder-component-uniforms
@kie-tools/dashbuilder-component-victory-charts
@kie-tools/dashbuilder-editor
@kie-tools/dashbuilder-viewer
@kie-tools/dashbuilder-viewer-deployment-webapp
@kie-tools/dev-deployment-dmn-form-webapp
@kie-tools/dmn-editor
@kie-tools/dmn-editor-envelope
@kie-tools/dmn-editor-standalone
@kie-tools/dmn-runner
@kie-tools/form
@kie-tools/form-dmn
@kie-tools/import-java-classes-component
@kie-tools/kie-bc-editors
@kie-tools/online-editor
@kie-tools/pmml-editor
@kie-tools/runtime-tools-components
@kie-tools/runtime-tools-management-console-webapp
@kie-tools/runtime-tools-process-dev-ui-webapp
@kie-tools/runtime-tools-process-enveloped-components
@kie-tools/runtime-tools-shared-enveloped-components
@kie-tools/runtime-tools-shared-webapp-components
@kie-tools/runtime-tools-swf-enveloped-components
@kie-tools/runtime-tools-swf-webapp-components
@kie-tools/runtime-tools-task-console-webapp
@kie-tools/scesim-editor
@kie-tools/serverless-logic-web-tools
@kie-tools/serverless-workflow-combined-editor
@kie-tools/serverless-workflow-dev-ui-webapp
@kie-tools/serverless-workflow-text-editor
@kie-tools/sonataflow-management-console-webapp
@kie-tools/text-editor
@kie-tools/uniforms-patternfly
@kie-tools/unitables
@kie-tools/unitables-dmn
@kie-tools/yard-editor
sonataflow-deployment-webapp

See more: https://docs.google.com/spreadsheets/d/1V1LxLuu4Vv6-V8ncOMKH7vXHog5fQiwcnMw-glLq32k/edit?gid=1948850227#gid=1948850227

kumaradityaraj and others added 30 commits October 7, 2024 13:14
@jomarko
Copy link
Contributor

jomarko commented Jan 20, 2025

14 Folder Toolbar Icons

Please compare group icon size in main:
Screenshot 2025-01-20 145046

vs PR:
Screenshot 2025-01-20 145040

@jomarko
Copy link
Contributor

jomarko commented Jan 20, 2025

15 Include model styling

is different on main:
Screenshot 2025-01-20 145400

vs in PR:
Screenshot 2025-01-20 145337

also the background for included model cards is different on main:
Screenshot 2025-01-20 145604

vs pr:
Screenshot 2025-01-20 145609

@jomarko
Copy link
Contributor

jomarko commented Jan 20, 2025

16 Create github gist

Has some unexpected content if we compare main:
image

with PR:
Screenshot 2025-01-20 160435

The same issue we see for github repository when we compare main:
image

with PR:
image

Copy link
Contributor

@jomarko jomarko left a comment

Choose a reason for hiding this comment

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

I will stop my review here. I think I tested quite well 2 of three componenets I was asked:

  • online-editor ✔️
  • dmn-editor ✔️
  • dev-deployment-dmn-form-webapp 🚫

I think I could test also runtime-tools-process-dev-ui-webapp however will do maybe in secound round of review.

dev-deployment-dmn-form-webapp

The problem I have for testing dev-deployment-dmn-form-webapp is I never used it as standalone and locally

I made this build:

  • KIE_TOOLS_BUILD__buildContainerImages=true pnpm -F @kie-tools/dev-deployment-kogito-quarkus-blank-app-image... build:prod
  • KIE_TOOLS_BUILD__buildContainerImages=true pnpm -F @kie-tools/dev-deployment-dmn-form-webapp-image... build:prod

Then started:

  • docker run -p 8080:8080 -e DEV_DEPLOYMENT__UPLOAD_SERVICE_API_KEY=dev docker.io/apache/incubator-kie-sandbox-dev-deployment-kogito-quarkus-blank-app:main
  • docker run -d -p 8081:8081 -e DEV_DEPLOYMENT_DMN_FORM_WEBAPP_QUARKUS_APP_ORIGIN=http://localhost:8080 docker.io/apache/incubator-kie-sandbox-dev-deployment-dmn-form-webapp:main

And tried to deploy DMN as:

  • curl -X POST -H "Content-Type: multipart/form-data" -F "myFile=/home/jomarko/kie-tools/examples/process-compact-architecture/src/main/resources/assets.zip" 'http://localhost:8080/upload?apiKey=dev'

However always get some error, I need more guidance how to deploy some dmn on the running images.

[dev-deployment-upload-service] ℹ️  Upload arrived...
[dev-deployment-upload-service] ❌ ERROR: Reading uploaded file failed:
[dev-deployment-upload-service] ❌ ERROR: http: no such file
2025/01/20 15:53:33 http: panic serving 172.17.0.1:50788: runtime error: invalid memory address or nil pointer dereference
goroutine 49 [running]:
net/http.(*conn).serve.func1()
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:1903 +0xbe
panic({0x667c00?, 0x8c0d60?})
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/runtime/panic.go:770 +0x132
main.main.func3({0x727320, 0xc0002ba000}, 0xc0002ac000)
        /home/jomarko/kie-tools/packages/dev-deployment-upload-service/main.go:169 +0x7d5
net/http.HandlerFunc.ServeHTTP(0x8cce50?, {0x727320?, 0xc0002ba000?}, 0x10?)
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0x40e745?, {0x727320, 0xc0002ba000}, 0xc0002ac000)
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:2688 +0x1ad
net/http.serverHandler.ServeHTTP({0x7266a0?}, {0x727320?, 0xc0002ba000?}, 0x6?)
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc000296000, {0x727840, 0xc000200210})
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 19
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:3290 +0x4b4
[dev-deployment-upload-service] ⚠️  Upload arrived, but another arrived earlier. Server should be in the process of gracefully shutting down.

Please let me know once the PR is ready for my another review round. Once more, thank you for this huge effort!

@fantonangeli
Copy link
Contributor

@jomarko Thanks a lot for your review. Regarding the tests for dev-deployment-dmn-form-webapp, is it enough to test with this command only?
pnpm -F dev-deployment-dmn-form-webapp start
then open:
http://localhost:9008/

I will stop my review here. I think I tested quite well 2 of three componenets I was asked:

* `online-editor` ✔️

* `dmn-editor` ✔️

* `dev-deployment-dmn-form-webapp` 🚫

I think I could test also runtime-tools-process-dev-ui-webapp however will do maybe in secound round of review.

dev-deployment-dmn-form-webapp

The problem I have for testing dev-deployment-dmn-form-webapp is I never used it as standalone and locally

I made this build:

* `KIE_TOOLS_BUILD__buildContainerImages=true pnpm -F @kie-tools/dev-deployment-kogito-quarkus-blank-app-image... build:prod`

* `KIE_TOOLS_BUILD__buildContainerImages=true pnpm -F @kie-tools/dev-deployment-dmn-form-webapp-image... build:prod`

Then started:

* `docker run -p 8080:8080 -e DEV_DEPLOYMENT__UPLOAD_SERVICE_API_KEY=dev docker.io/apache/incubator-kie-sandbox-dev-deployment-kogito-quarkus-blank-app:main`

* `docker run -d -p 8081:8081 -e DEV_DEPLOYMENT_DMN_FORM_WEBAPP_QUARKUS_APP_ORIGIN=http://localhost:8080 docker.io/apache/incubator-kie-sandbox-dev-deployment-dmn-form-webapp:main`

And tried to deploy DMN as:

* `curl -X POST -H "Content-Type: multipart/form-data" -F "myFile=/home/jomarko/kie-tools/examples/process-compact-architecture/src/main/resources/assets.zip" 'http://localhost:8080/upload?apiKey=dev'`

However always get some error, I need more guidance how to deploy some dmn on the running images.

[dev-deployment-upload-service] ℹ️  Upload arrived...
[dev-deployment-upload-service] ❌ ERROR: Reading uploaded file failed:
[dev-deployment-upload-service] ❌ ERROR: http: no such file
2025/01/20 15:53:33 http: panic serving 172.17.0.1:50788: runtime error: invalid memory address or nil pointer dereference
goroutine 49 [running]:
net/http.(*conn).serve.func1()
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:1903 +0xbe
panic({0x667c00?, 0x8c0d60?})
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/runtime/panic.go:770 +0x132
main.main.func3({0x727320, 0xc0002ba000}, 0xc0002ac000)
        /home/jomarko/kie-tools/packages/dev-deployment-upload-service/main.go:169 +0x7d5
net/http.HandlerFunc.ServeHTTP(0x8cce50?, {0x727320?, 0xc0002ba000?}, 0x10?)
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0x40e745?, {0x727320, 0xc0002ba000}, 0xc0002ac000)
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:2688 +0x1ad
net/http.serverHandler.ServeHTTP({0x7266a0?}, {0x727320?, 0xc0002ba000?}, 0x6?)
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc000296000, {0x727840, 0xc000200210})
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 19
        /nix/store/frc5188kgv3ws0n999c7cy5vi2f8k4jp-go-1.22.9/share/go/src/net/http/server.go:3290 +0x4b4
[dev-deployment-upload-service] ⚠️  Upload arrived, but another arrived earlier. Server should be in the process of gracefully shutting down.

Please let me know once the PR is ready for my another review round. Once more, thank you for this huge effort!

Copy link
Contributor

@fantonangeli fantonangeli left a comment

Choose a reason for hiding this comment

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

Thanks a lot @kumaradityaraj, I'm leaving some points here and I will continue reviewing this PR

Copy link
Contributor

@fantonangeli fantonangeli left a comment

Choose a reason for hiding this comment

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

Thank a lot @kumaradityaraj.
Here are some more suggestions, please let me know if you need some clarification.

@@ -467,7 +468,9 @@ function JavaFunctionExpressionLabelCell(props: React.PropsWithChildren<BeeTable
headerContent={label + " example"}
bodyContent={getParameterLabelHelp}
>
<HelpIcon size="sm" className="java-function-parameter-help-icon" />
<Icon size="sm" style={{ marginLeft: "10px", marginTop: "5px" }}>
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -27,36 +26,26 @@ import QuestionIcon from "@patternfly/react-icons/dist/js/icons/question-icon";
import UsersIcon from "@patternfly/react-icons/dist/js/icons/users-icon";
import { AuthProvider } from "./AuthProvidersApi";

export function AuthProviderIcon(props: {
authProvider: AuthProvider | undefined;
size: IconSize | keyof typeof IconSize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Before AuthProviderIcon was accepting a props for the size here.
We can use that property like it was before and pass the size to the Icon tag inside AuthProviderIcon so who call it can decide the size.

return <UsersIcon size={props.size} />;
}

if (props.authProvider.iconPath) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Following my previous comment we can bring back this portion of code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade PatternFly to v5 in all kie-tools packages [uniforms-patternfly] Upgrade @patternfly to v5.0.0
5 participants