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

[1.32.x] Setup async examples #1536

Draft
wants to merge 1 commit into
base: 1.32.x
Choose a base branch
from

Conversation

radtriste
Copy link
Contributor

Many thanks for submitting your Pull Request ❤️!

Please make sure that your PR meets the following requirements:

WARNING! Please make sure you are opening your PR against main branch!

  • You have read the contributors guide
  • Pull Request title is properly formatted: KOGITO-XYZ Subject
  • Pull Request title contains the target branch if not targeting main: [0.9.x] KOGITO-XYZ Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.

build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:
  • for pull request checks
    Please add comment: Jenkins retest this

  • for a specific pull request check
    Please add comment: Jenkins (re)run [kogito-examples] tests

  • for quarkus branch checks
    Run checks against Quarkus current used branch
    Please add comment: Jenkins run quarkus-branch

  • for a quarkus branch specific check
    Run checks against Quarkus current used branch
    Please add comment: Jenkins (re)run [kogito-examples] quarkus-branch

  • for quarkus main checks
    Run checks against Quarkus main branch
    Please add comment: Jenkins run quarkus-main

  • for a specific quarkus main check
    Run checks against Quarkus main branch
    Please add comment: Jenkins (re)run [kogito-examples] quarkus-main

  • for quarkus lts checks
    Run checks against Quarkus lts branch
    Please add comment: Jenkins run quarkus-lts

  • for a specific quarkus lts check
    Run checks against Quarkus lts branch
    Please add comment: Jenkins (re)run [kogito-examples] quarkus-lts

  • for native checks
    Run native checks
    Please add comment: Jenkins run native

  • for a specific native check
    Run native checks
    Please add comment: Jenkins (re)run [kogito-examples] native

  • for mandrel checks
    Run native checks against Mandrel image
    Please add comment: Jenkins run mandrel

  • for a specific mandrel check
    Run native checks against Mandrel image
    Please add comment: Jenkins (re)run [kogito-examples] mandrel

  • for mandrel lts checks
    Run native checks against Mandrel image and quarkus lts branch
    Please add comment: Jenkins run mandrel-lts

  • for a specific mandrel lts check
    Run native checks against Mandrel image and quarkus lts branch
    Please add comment: Jenkins (re)run [kogito-examples] mandrel-lts

@@ -0,0 +1,87 @@
/*
Copy link
Contributor

@fjtirado fjtirado Jan 13, 2023

Choose a reason for hiding this comment

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

@radtriste This class should be renamed to something like EventHandlerServer

@@ -0,0 +1,52 @@
mp.messaging.incoming.wait.connector=smallrye-kafka
Copy link
Contributor

@fjtirado fjtirado Jan 13, 2023

Choose a reason for hiding this comment

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

The point of the extension is the user to not having to use some of these properties (because the extension should be able to add them automatically)

Copy link
Contributor

@fjtirado fjtirado left a comment

Choose a reason for hiding this comment

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

I think we need to change some names and review some not longer needed properties

@Inject
ObjectMapper objectMapper;

public void printKogitoProcessId(JsonNode workflowData, KogitoProcessContext context) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method is not needed

@@ -0,0 +1,52 @@
mp.messaging.incoming.wait.connector=smallrye-kafka
mp.messaging.incoming.wait.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
Copy link
Contributor

Choose a reason for hiding this comment

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

These three ones can be removed

mp.messaging.incoming.in-resume.group.id=kogito-sw-callback
mp.messaging.incoming.in-resume.auto.offset.reset=earliest

mp.messaging.outgoing.resume.connector=smallrye-kafka
Copy link
Contributor

@fjtirado fjtirado Jan 13, 2023

Choose a reason for hiding this comment

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

These four ones can be removed also
in-resume and out-wait are needed for to be renamed PrintService to work

@@ -0,0 +1,35 @@
asyncapi: '2.0.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should rename this one to wait-event
Although I would actually prefer to merge both files into one

],
"functions": [
{
"name": "printInstanceId",
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be replaced by sysout, so the method printInstanceId is not needed

@domhanak
Copy link

domhanak commented Mar 1, 2024

@fjtirado @ricardozanini this should be revisited imho, wdyt?

@domhanak domhanak added the stale This label is for items that are stale with no activity for more than a month label Mar 1, 2024
@fjtirado
Copy link
Contributor

fjtirado commented Mar 4, 2024

@domhanak yes, but how? I mean, should we create a new one with the same purpose?

@domhanak
Copy link

domhanak commented Mar 4, 2024

@fjtirado it is for 1.32.x branch, should go to main.
Let's ask @radtriste how he wants to follow up here. Is it okay if we cherry-pick your commit and build on top of it or do you want to finish it?

@radtriste
Copy link
Contributor Author

@domhanak Go ahead. I won't have time to finish/backport anyway ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This label is for items that are stale with no activity for more than a month
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants