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-kogito-examples-2041] [sonataflow] Implement a getting started example for operator use case #2042

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

Conversation

domhanak
Copy link
Contributor

@domhanak domhanak commented Dec 3, 2024

Adds example to serverless-operator-examples, that explains basic use cases of workflow plugin CLI and showcases how to run, deploy and deploy with custom configuration on local environment or remote cluster env.

@domhanak domhanak changed the title [kie-kogito-examples-2041] [sonatafow] Implement a getting started example for operator use case [kie-kogito-examples-2041] [sonataflow] Implement a getting started example for operator use case Dec 3, 2024
@domhanak domhanak force-pushed the kie-kogito-examples-2041 branch 4 times, most recently from 4f8818d to 6c944d6 Compare December 3, 2024 12:07
…rator use case

Adds example to serverless-operator-examples, that explains basic use cases
of workflow plugin CLI and showcases how to run, deploy and deploy with custom configuration
on local environment or remote cluster env.
@domhanak domhanak force-pushed the kie-kogito-examples-2041 branch from 6c944d6 to 46755ad Compare December 3, 2024 12:17
@domhanak domhanak requested a review from gmunozfe January 13, 2025 13:33
Copy link

@gmunozfe gmunozfe left a comment

Choose a reason for hiding this comment

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

Looks good to me, great content @domhanak !

Copy link
Contributor

@wmedvede wmedvede left a comment

Choose a reason for hiding this comment

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

I have left some nitpicks, very nice example.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Jan 14, 2025

PR job #8 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-examples -u #2042 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-examples-pr/job/PR-2042/8/display/redirect

Test results:

  • PASSED: 400
  • FAILED: 2

Those are the test failures:

org.kie.kogito.examples.quarkus.GrafanaDockerComposeIT.testGrafanaDashboards 1 expectation failed.
JSON path title doesn't match.
Expected: a collection containing "dmn-drools-quarkus-metrics_999-SNAPSHOT - hello - Operational Dashboard"
Actual: <[dmn-drools-quarkus-metrics_999-SNAPSHOT - Custom - Operational Dashboard, dmn-drools-quarkus-metrics_999-SNAPSHOT - LoanEligibility - Domain Dashboard, dmn-drools-quarkus-metrics_999-SNAPSHOT - LoanEligibility - Operational Dashboard]>
org.acme.travel.tests.multimessaging.quarkus.MultiMessagingIT.testProcess java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource

Copy link
Member

@ricardozanini ricardozanini left a comment

Choose a reason for hiding this comment

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

It seems great! But one nitpick I'd add is to convert the JSON files to YAML. We will give preference to YAML in the following DSL. It would be nice to start exercising this preference.

Copy link

@tiagobento tiagobento left a comment

Choose a reason for hiding this comment

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

@wmedvede
Copy link
Contributor

wmedvede commented Jan 16, 2025

@domhanak Please see apache/incubator-kie-tools#2755

@tiagobento I don't believe the team has made a decision with that move.
Any thread where we voted that?

@tiagobento
Copy link

@wmedvede No... I didn't think it was necessary given the way our builds are currently structured. kie-tools is not part of the same "build-chain" as the other repos (including this one), so keeping the SonataFlow Operator examples here will make them certainly be out of sync with whatever code changes are made to the SonataFlow Operator itself.

Moving the SonataFlow Operator examples to kie-tools will help you make atomic changes to both the SonataFlow Operator itself and its examples. I believe that to be in your interest to make it easier to accommodate for changes and have examples always aligned with the rest of the codebase. Let me know if I'm missing something!

@wmedvede
Copy link
Contributor

@tiagobento I think that move is under discussion here: https://lists.apache.org/thread/qc9vhod96mdoppo5ssj4f0pkqhzt4ghd as part of how to release them.

@tiagobento
Copy link

tiagobento commented Jan 16, 2025

@wmedvede Right... I'm seeing this discussion much more as a generic discussion talking about ALL examples, and the scope of disagreement being mostly targeted towards examples that only depend on the engines, runtimes, and everything coming from drools, optaplanner, kogito-runtimes, and kogito-apps. Since the SonataFlow Operator is already permanently inside KIE Tools, I figured this was an obvious move to do to make everyone's life easier. Yours included.

Being realistic, kogito-examples building as the last repository of the "build-chain" would force us to double down on using the unmaintained, black-box library that Enrique Cano created in the past (build-chain), while also increasing complexity in the already impossible-to-maintain "Kogito framework" on Apache's Jenkins. I'll most certainly -1 any proposal that involves us burying our codebase in a deeper dependency with these two systems.

Having kogito-examples at the end of the pipelines would also imply that kie-tools wouldn't be the last repo on the chain, adding 3+ hours for every PR on the Apache KIE community, as we wouldn't be able to take advantage of its powerful partial builds mechanism, thus resulting in a massive waste of computational resources in our development operation.

You've been contributing to kie-tools for the past few months, so I believe you're familiar with the partial and partitioned builds we're able to do on kie-tools PR checks, and I'm sure you appreciate the speed with each of your PRs have been automatically checked, reviewed, and merged.

Let me know what I'm missing and how moving the SonataFlow Operator examples to kie-tools would make things harder for you.

@wmedvede
Copy link
Contributor

@tiagobento there are many people not in favor of the move, so I think no decision is made.
That's all Tiago.

@tiagobento
Copy link

@wmedvede Great conversation! :)

@domhanak
Copy link
Contributor Author

This example does not require anything to be built.

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.

6 participants