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-issues#1584: [kn-plugin-workflow] added --wait to kn workflow deploy #2800

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

Conversation

treblereel
Copy link
Contributor

@treblereel treblereel requested review from ricardozanini and removed request for tiagobento December 12, 2024 02:28
@treblereel
Copy link
Contributor Author

workflow:

  1. Deploy the project to Kubernetes.
  2. Wait until the deployment is successfully deployed.
  3. Create a port-forward from the pod of the deployment (8080->8080).
  4. Inform the user to press "CTRL+C" to stop the port-forwarding.
  5. Open the default browser with the URL "http://127.0.0.1:8080/q/dev-ui".
  6. Destroy the port-forwarding on user command.

@ricardozanini
Copy link
Member

I think you should copy the operator.yaml from your node-modules to the build dir and run the tests from there, not committing it.

@treblereel
Copy link
Contributor Author

@ricardozanini as far as I see, we don't have minikube or kind to run pure tests in gh actions ...

@domhanak
Copy link
Contributor

@treblereel to get them working here:

  1. Run this: https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/main/hack/ci/create-kind-cluster-with-registry.sh
  2. Apply operator there
  3. Run tests

I think we want to have same thing as in operator e2e workflow we had, https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/main/.github/workflows/e2e.yml

Anyway, apologies for me being so not ready here, will provide review by the EOW.

@treblereel
Copy link
Contributor Author

@domhanak thank you. Totally fine, I'm just not sure it's ok to run kind for tests. If it's allowed, I will be more than happy to use it

@ricardozanini
Copy link
Member

@treblereel see: https://github.com/apache/incubator-kie-tools/blob/main/packages/sonataflow-operator/package.json#L41

You can have something slightly simpler since we don't need to replicate the heavy tests here. But we are already using KIND in GHA.

@treblereel treblereel force-pushed the apache_issues_1584 branch 2 times, most recently from 045c78f to 26f38c1 Compare December 23, 2024 05:06
@domhanak
Copy link
Contributor

domhanak commented Jan 6, 2025

  • Run kn workflow deploy --wait on fresh project.
    Results in couple of errors:
E0106 11:07:16.646991 1105259 portforward.go:385] "Unhandled Error" err="error copying from remote stream to local connection: readfrom tcp4 127.0.0.1:8080->127.0.0.1:37664: write tcp4 127.0.0.1:8080->127.0.0.1:37664: write: broken pipe" logger="UnhandledError"
E0106 11:07:47.017745 1105259 portforward.go:374] "Unhandled Error" err="error creating forwarding stream for port 8080 -> 8080: Timeout occurred" logger="UnhandledError"
E0106 11:07:48.546951 1105259 portforward.go:351] "Unhandled Error" err="error creating error stream for port 8080 -> 8080: Timeout occurred" logger="UnhandledError"

Other than that, it works as expected.
When I press CTLR+C the deployment stays, but the devui openned by the plugin is inaccessible now.

  • Running kn workflow deploy -m <PATH_TO_GENERATED_MANIFESTS_WITH_PREVIEW_PROF> --wait
    Results in:
🔨 Applying YAML file /home/dhanak/git-workspace/incubator-kie-tools/packages/kn-plugin-workflow/dist/new-project/manifests/01-sonataflow_hello.yaml
 - ✅ Manifest 01-sonataflow_hello.yaml successfully deployed in namespace default
Error: ❌ ERROR: applying deploy: ❌ ERROR: failed to wait for deployment and open dev ui: ❌ ERROR: failed to read SonataFlow file: open : no such file or directory

Let me know if this should work or not , the second problem could be out of scope for this use case.

do not run wait mode on PreviewProfile and GitOpsProfile
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.

3 participants