domhanak commented on issue #2486: URL: https://github.com/apache/incubator-kie-tools/issues/2486#issuecomment-2272727185
### KN Workflow Plugin verification for Apache KIE 10.0.x Environment Fedora 39 Linux amd64 OpenJDK 17 Maven 3.9.3 Podman 4.9.4 Kubernetes in Docker with Knative Serving and Eventing installed running ### Summary Testing done, 10.0.x branch has a good candidate for release, couple of minor issues but nothing of blocking nature. 10.0.x kn-plugin-workflow is verified. ### Build #### Procedure - Build the binaries from release branch ✅ 1. Checkout https://github.com/apache/incubator-kie-tools/tree/10.0.x 2. Run pnpm bootstrap -F '@kie-tools/kn-plugin-workflow...' ✅ 3. Run pnpm -r -F @kie-tools/kn-plugin-workflow... build:prod ✅ ### Automated tests After you have built the whole stack, execute following commands: 1. export KIE_TOOLS_BUILD__runEndToEndTests=true 2. pnpm -r -F @kie-tools/kn-plugin-workflow build:prod #### Procedure - Run automated unit test suites ✅ Tests executed with no failures - 18 tests passed. #### Procedure - Run automated E2E test suites ✅ Prerequisites - Build @kie-tools/sonataflow-devmode-image 1. export KIE_TOOLS_BUILD__buildContainerImages=true 2. pnpm -r -F @kie-tools/sonataflow-devmode-image... build:prod - Run a kubernetes cluster _I used KIND, setup by kn kn quickstart kind --registry --install-eventing --install-serving_ Tests executed without issues - 34 tests passed. ### Installation #### Procedure - Install as a plugin of [Knative CLI](https://knative.dev/docs/client/install-kn/) ✅ Following the guide in [sonataflow documentation](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-install-sw-plugin-kn-cli) 1. Install knative cli using the [binary procedure](https://knative.dev/docs/client/install-kn/#__tabbed_1_2) 2. Use the kn-workflow-linux-amd64 binary that was [built](https://docs.google.com/document/d/1qT5SxhECFCZRTdMJZVDSiwQyTr5mdBHs6z55FyvQDcY/edit#heading=h.58l1if9q841a) from 10.0.x 3. Rename kn-workflow-linux-amd64 to kn-workflow 4. mv kn-workflow-linux-amd64 kn-workflow 5. Run chmod +x kn-workflow to make it executable 6. Move the binary to /usr/local/bin 7. mv kn-workflow /usr/local/bin 8. Validate the installation 9. Run kn plugin list 10. Result: see - kn-workflow : /usr/local/bin/kn-workflow in the output ✅ 11. Run kn workflow 12. Result: see landing text with Manage SonataFlow Projects ✅ 13. Validate the version 14. Run kn workflow -v 15. Result - 10.0.999 ### Functional #### Command - help Missing documentation entry, can be used with any command but that is not clear to the user right away ##### Procedure - Use the –help flag ✅ 1. Run kn workflow create –help 2. Resulting output should provide a brief overview about CLI and its command. ✅ ### Command - create [Documentation](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-create-sw-project-kn-cli) ##### Procedure - Use the –help flag with create command ✅ Not covered by E2E. 1. Run kn workflow create –help 2. Resulting output should provide a brief overview about the workflow project creation procedure. ✅ Dominik: “This seems true, the output is reasonable and up to date”. ##### Procedure - Use the create command to scaffold a project ✅ Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/create_test.go) ##### Procedure - Use the create command –name flag ✅ Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/create_test.go) ##### Procedure - Use the create command with –yaml-workflow flag ✅ Not covered by E2E -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2515) Missing documentation entry - Fixed by [PR](https://github.com/apache/incubator-kie-kogito-docs/pull/667) 1. Run kn workflow create –yaml-workflow 2. Resulting project should contain workflow.sw.yaml file ### Command - run [Documentation](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-build-sw-project-kn-cli) ##### Procedure - Use the –help flag with run command ✅ Not covered by E2E. 1. Run kn workflow run –help 2. Results 3. Output with title Run a SonataFlow project in development mode. ✅ 4. Output with a link pointing to devmode image with 10.0.x version ✅ ❓ ##### Procedure - Use the run command to run the workflow ✅ Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/run_test.go) ##### Procedure - Use the run command with –port flag ✅ Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/run_test.go) ##### Procedure - Use the run command with –open-dev-ui flag ✅ Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/run_test.go) ### Command - deploy [Documentation](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-deploy-sw-project-kn-cli) Missing namespace note -> Fixed by [PR](https://github.com/apache/incubator-kie-kogito-docs/pull/667) Missing operator installation prerequisite -> Fixed by [PR](https://github.com/apache/incubator-kie-kogito-docs/pull/667) Procedure - Use the –help flag with deploy command ✅ Not covered by E2E. 1. Run kn workflow deploy –help 2. Results 3. Resulting output should provide a brief overview about the workflow project deployment procedure. ✅ ##### Procedure - Use the deploy command to deploy the workflow ✅ Not Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/deploy_test.go) currently disabled and not implemented -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2514). 1. Run kn workflow deploy –namespace apache-10 2. Expect to see 🎉 SonataFlow project successfully deployed. ✅ 3. Examine the namespace in cluster using kubectl 4. Run kubectl get pods -n apache-10 5. Result - hello-6c9c9c6dbc-q6n7m 1/1 Running 0 12m 6. Examine the workflow CR in the cluster using kubectl 7. Run kubectl get workflow -n apache-10 8. Result - hello dev 1.0 http://172.24.0.2:31150/hello True ##### Procedure - Use the deploy with –custom-manifests-dir flag ✅ Not Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/deploy_test.go) currently disabled and not implemented -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2514). 1. (Prerequisite) Run kn workflow gen-manifest –namespace apache-10 to generate manifest directory with YAML file 2. Run kn workflow deploy –namespace apache-10 --custom-manifests-dir ./manifests 3. Ensure - ✅ Manifest 01-sonataflow_hello.yaml successfully deployed in namespace apache-10 is shown in logs. 4. Examine the namespace in cluster using kubectl 5. Run kubectl get pods -n apache-10 6. Result - hello-6c9c9c6dbc-q6n7m 1/1 Running 0 12m 7. Examine the workflow CR in the cluster using kubectl 8. Run kubectl get workflow -n apache-10 9. Result - hello dev 1.0 http://172.24.0.2:32590/hello True 10. Run kn workflow deploy –namespace apache-10 11. Ensure - ✅ Manifest 01-sonataflow_hello.yaml successfully undeployed in namespace apache-10 is shown in logs. ##### Procedure - Use the deploy with --custom-generated-manifests-dir flag 🚧 Not Covered by [E2E test](https://github.com/apache/incubator-kie-tools/blob/10.0.x/packages/kn-plugin-workflow/e2e-tests/deploy_test.go) currently disabled and not implemented -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2514). ###### Case 01 - Use JSON format workflow 1. Run 2. Ensure - ✅ Manifest 01-sonataflow_hello.yaml successfully deployed in namespace apache-10 is shown in logs. 3. Ensure there is 01-sonataflow_hello.yaml created in ./ 4. Examine the namespace in cluster using kubectl 5. Run kubectl get pods -n apache-10 6. Result - hello-6c9c9c6dbc-q6n7m 1/1 Running 0 12m 7. Examine the workflow CR in the cluster using kubectl 8. Run kubectl get workflow -n apache-10 9. Result - hello dev 1.0 http://172.24.0.2:32590/hello True ###### Case 02 - Use YAML format workflow ✅ 1. Run kn workflow deploy –namespace apache-10 --custom-generated-manifests-dir ./ 2. Result - ERROR -> UX reported [issue](https://github.com/apache/incubator-kie-tools/issues/2516). 3. - ✅ Manifest 01-sonataflow_hello.yaml successfully deployed in namespace apache-10 4. error: unable to decode "workflow.sw.yaml": Object 'Kind' is missing in '{"description":"Description","id":"hello","name":"Hello World","specVersion":"0.8.0","start":"HelloWorld","states":[{"data":{"message":"Hello World"},"end":true,"name":"HelloWorld","type":"inject"}],"version":"1.0"}' has a errorError: ❌ ERROR: applying deploy: ❌ ERROR: failed to deploy manifest workflow.sw.yaml, ❌ ERROR: failed to execute kubectl apply command for workflow.sw.yaml: exit status 1 5. Failed because no cluster is running locally 6. When run with Kind cluster up, it passes without issues ✅ ##### Procedure - Use the deploy with –subflows-dir flag Not Covered by E2E test currently disabled and not implemented -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2514). Not tested. ##### Procedure - Use the deploy with –specs-dir flag Not Covered by E2E test currently disabled and not implemented -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2514). Not tested. ##### Procedure - Use the deploy with –schemas-dir flag Not Covered by E2E test currently disabled and not implemented -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2514). Not tested #### Command - undeploy ✅ Documentation does not exist. ##### Procedure - Use the –help flag with deploy command ✅ Not covered by E2E. 1. Run kn workflow undeploy –help 2. Results 3. An undeploy help page is shown at beginning, but there is a duplicated output of deploy command help page 🐞 ##### Procedure - Use the undeploy command to undeploy the workflow ✅ Not Covered by E2E test. Not implemented. 1. Run kn workflow undeploy –namespace apache-10 2. Expect to see 🎉 SonataFlow project successfully undeployed. ✅ 3. Examine the namespace in cluster using kubectl 4. Run kubectl get pods -n apache-10 5. Result - no pod with workflow ID in the result 6. Examine the workflow CR in the cluster using kubectl 7. Run kubectl get workflow -n apache-10 8. Result - No resources found in apache-10 namespace ### Command - gen-manifest ✅ Documentation does not exist. -> Fixed by [PR](https://github.com/apache/incubator-kie-kogito-docs/pull/667) Procedure - Use the –help flag with gen-manifest command :construction: Not covered by E2E. 1. Run kn workflow gen-manifest –help 2. Results 3. Resulting output should provide a brief overview about the manifest generation procedure. 🚧 4. Looks like there is a duplication from deploy command 🚧 5. One line is only about deploy command 6. kn workflow deploy --namespace <your_namespace> ##### Procedure - Use the gen-manifest command to generate operator manifest for the workflow project ✅ Not covered by E2E -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2517) 1. 2. Run kn workflow gen-manifest 3. Results 4. A directory named /manifest is created in root directory and contains YAML manifest named 01-sonataflow_hello.yaml 5. Namespace of the YAML file is default ##### Procedure - Use the gen-manifest with –namespace flag ✅ Not covered by E2E -> Reported in [issue](https://github.com/apache/incubator-kie-tools/issues/2517) 1. Run kn workflow gen-manifest –namespace apache-10 2. Results 3. A directory named /manifest is created in root directory and contains YAML manifest named 01-sonataflow_hello.yaml 4. Namespace of the YAML file is apache-10 ### Command - help ✅ Documentation does not directly mention this command as its output matches `kn workflow`. We can link this section or improve it and add a new section just to tell users to use `help. [[1](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-install-sw-plugin-kn-cli)] ##### Procedure - Use the help command ✅ Not covered by E2E. 1. Run kn workflow help 2. Results 3. Help landing page is shown ✅ ### Command - quarkus create ✅ [Documentation](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-create-quarkus-sw-project-kn-cli) ##### Procedure - Use the –help flag with quarkus create command 🐞 1. Run kn workflow quarkus create –help -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2518) 2. Results 3. The title and the follow-up text is OK, however examples show `kn workflow create` instead of kn workflow quarkus create 🐞 ##### Procedure - Use the quarkus create command to scaffold a project ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go) test. ##### Procedure - Use the quarkus create with –name flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go) test. ##### Procedure - Use the quarkus create with –extension flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go) test. ##### Procedure - Use the quarkus create with –quarkus-version flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go) test. ##### Procedure - Use the quarkus create with –quarkus-platform-group-id flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_create_test.go) test. ### Command - quarkus convert ✅ No documentation. -> Report in [issue](https://github.com/apache/incubator-kie-kogito-docs/issues/668) Procedure - Use the –help flag with quarkus create command 🐞 1. Run kn workflow quarkus convert –help 2. Results 3. The title and the follow-up text is OK ✅ ##### Procedure - Use the quarkus convert command to convert SonataFlow project to quarkus base ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go) test. ##### Procedure - Use the quarkus convert command with –extension flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go) test. ##### Procedure - Use the quarkus convert command with –quarkus-platform-group-id flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go) test. ##### Procedure - Use the quarkus convert command with –quarkus-version flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_convert_test.go) test. ### Command - quarkus run ✅ [Documentation](https://sonataflow.org/serverlessworkflow/main/testing-and-troubleshooting/kn-plugin-workflow-overview.html#proc-create-quarkus-sw-project-kn-cli) Procedure - Use the –help flag with quarkus run command :heavy_check_mark: 1. Run kn workflow quarkus run –help 2. Results 3. The title and the follow-up text is OK ✅ ##### Procedure - Use the quarkus run command ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go) test. ##### Procedure - Use the quarkus run command with –port flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go) test. ##### Procedure - Use the quarkus run command with –open-dev-ui flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_run_test.go) test. ### Command - quarkus build ✅ [Documentation](https://sonataflow.org/serverlessworkflow/main/use-cases/advanced-developer-use-cases/getting-started/create-your-first-workflow-service.html#proc-running-application) ##### Procedure - Use the –help flag with quarkus build command ✅ 1. Run kn workflow quarkus build –help 2. Results 3. The title and the follow-up text is OK. ##### Procedure - Use the quarkus build command ✅ Not supported –image flag has to be set. ##### Procedure - Use the quarkus build with –image flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go) test. ##### Procedure - Use the quarkus build with –image-repository flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go) test. ##### Procedure - Use the quarkus build with –jib flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go) test. ##### Procedure - Use the quarkus build with –image-tag flag ✅ Covered by [E2E](https://github.com/apache/incubator-kie-tools/blob/main/packages/kn-plugin-workflow/e2e-tests/quarkus_build_test.go) test. ##### Procedure - Use the quarkus build with –push flag ⚠️ Not tested. Not covered by E2E -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2519) ##### Procedure - Use the quarkus build with –test flag ⚠️ Not tested. Not covered by E2E -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2519) ##### Procedure - Use the quarkus build with –jib-podman flag ⚠️ Not tested. Not covered by E2E -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2519) ##### Procedure - Use the quarkus build with –image-registry flag ⚠️ Not tested. Not covered by E2E -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2519) ### Command - quarkus deploy ✅ [Documentation](https://sonataflow.org/serverlessworkflow/main/use-cases/advanced-developer-use-cases/getting-started/create-your-first-workflow-service.html#proc-running-application) is outdated and does not mention this command at all ##### Procedure - Use the –help flag with quarkus deploy command ✅ 1. Run kn workflow quarkus deploy –help 2. Results 3. The title and the follow-up text is OK. ##### Procedure - Use the quarkus deploy command ✅ Not Covered by E2E test -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2520) 1. Run kn workflow depoy 2. Results 3. 🎉 Quarkus SonataFlow project successfully deployed ##### Procedure - Use the quarkus deploy with –path flag ⚠️ Not Covered by E2E test. -> Reported in [issue.](https://github.com/apache/incubator-kie-tools/issues/2520) Not tested ⚠️ ### Command - completion ⚠️ [Documentation](https://sonataflow.org/serverlessworkflow/main/use-cases/advanced-developer-use-cases/getting-started/create-your-first-workflow-service.html#proc-running-application) is outdated and does not mention this command at all ##### Procedure - Use the –help flag with completion command ✅ 1. Run kn workflow completion –help 2. Results 3. The title and the follow-up text is OK. ##### Procedure - Use the bash option with –help flag and try it 🐞 1. Run kn workflow completion bash –help 2. Results 3. The title and the follow-up text is OK. 4. Procedure seem to have issues 5. source <(kn workflow completion bash) 6. Results 7. Kn workflow command not found 8. Workaround: change to source <(kn-workflow completion bash) 9. Result - completion does not seem to work at all. ##### Procedure - Use the fish option –help flag ✅ 1. Run kn workflow completion fish –help 2. Results 3. The title and the follow-up text is OK. Functionality not tested ⚠️ ##### Procedure - Use the powershell option –help flag ✅ 1. Run kn workflow completion powershell –help 2. Results 3. The title and the follow-up text is OK. Functionality not tested ⚠️ ##### Procedure - Use the powershell option –help flag ✅ 1. Run kn workflow completion powershell –help 2. Results 3. The title and the follow-up text is OK. Functionality not tested ⚠️ ##### Procedure - Use the zsh option –help flag ✅ 1. 2. Run kn workflow completion zsh –help 3. Results 4. The title and the follow-up text is OK. Functionality not tested ⚠️ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
