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

[Fix #3642] Fixing task deadline functionality #3643

Closed
wants to merge 5 commits into from

Conversation

fjtirado
Copy link
Contributor

@fjtirado fjtirado commented Aug 27, 2024

Fix #3642

There were three issues that prevents deadlines to work

  1. HumanTaskNodeInstance was not getting registered for job service events
  2. The event published was not checking the right type of event
  3. Job Service was using a different Default Unit of work manager

After fixing that, we can see the expected event getting published on Kafka

{"id":"f47e9d85-89b8-45b0-bc72-e33f68abfba1","source":"http://localhost:8080/approvals","type":"UserTaskInstanceDeadlineDataEvent","time":"2024-08-27T21:42:13.7738089+02:00","data":{"eventDate":"2024-08-27T21:42:13.773+02:00","eventUser":null,"userTaskDefinitionId":"_8B62D3CA-5D03-4B2B-832B-126469288BB4","userTaskInstanceId":"0129ff80-e305-4b1b-85b8-9dcb3bdd83eb","userTaskName":"firstLineApproval","notification":{"toemails":"[email protected]","subject":"please start me","replyTo":"[email protected]","from":"[email protected]","body":"do not be lazy man, Im just going to say this once"},"inputs":null,"eventType":null},"specversion":"1.0","datacontenttype":"application/json","kogitoprocinstanceid":"df58adf4-111e-490d-aa5b-e523b0a383e1","kogitoprocid":"approvals","kogitoaddons":"task-notification,mail,task-management","kogitoprocversion":"1.0","kogitoprocist":"1","kogitoprocrefid":"First Line Approval","kogitoproctype":"BPMN","kogitousertaskiid":"0129ff80-e305-4b1b-85b8-9dcb3bdd83eb","kogitousertaskist":"Ready"}

@fjtirado fjtirado force-pushed the Fix_#3642 branch 2 times, most recently from b02be3f to 3c44ac3 Compare August 27, 2024 19:49
@fjtirado fjtirado changed the title [Fix #3642] There were three issues that prevents deadlines to work [Fix #3642] Fixing task deadline functionality Aug 27, 2024
@apache apache deleted a comment from kie-ci3 Aug 28, 2024
Copy link
Contributor

@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.

It seems like the event check fix is missed for springboot:

@gmunozfe gmunozfe self-requested a review August 28, 2024 15:04
Copy link
Contributor

@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.

Awesome work @fjtirado ! Looks good to me, I will add some tests with another PR.

@apache apache deleted a comment from kie-ci3 Aug 28, 2024
@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 29, 2024

PR job #6 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-runtimes -u #3643 --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-runtimes-pr/job/PR-3643/6/display/redirect

Test results:

  • PASSED: 3227
  • FAILED: 8

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testTimerBoundaryEventInterruptingOnTask [Process instance has not been finished.]
expected: null
but was: WorkflowProcessInstance [Id=c79ceabf-c929-409c-8bca-66cc4e17e328,processId=TimerBoundaryEventInterruptingOnTask,state=1]
org.jbpm.bpmn2.ProcessFactoryTest.testBoundaryTimerTimeCycle testBoundaryTimerTimeCycle() timed out after 10 seconds
org.jbpm.bpmn2.ProcessFactoryTest.testBoundaryTimerTimeDuration testBoundaryTimerTimeDuration() timed out after 10 seconds
org.jbpm.bpmn2.SLAComplianceTest.testSLAonUserTaskViolated [SLA was not violated while it is expected]
Expecting value to be true but was false
org.kie.kogito.codegen.tests.TimerEventIT.testBoundaryDurationTimerEventOnTask
Expecting value to be true but was false
org.kie.kogito.codegen.tests.TimerEventIT.testBoundaryCycleTimerEventOnTask
Expecting value to be true but was false
org.kie.kogito.codegen.tests.TimerEventIT.testBoundaryDateTimerEventOnTask
Expecting value to be true but was false
org.kie.kogito.integrationtests.quarkus.MultipleTimerInstancesIT.boundaryTimerEvent Assertion condition defined as a org.kie.kogito.test.utils.ProcessInstancesRESTTestUtils 1 expectation failed.
Expected status code <404> but was <200>.
within 2 minutes.

@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 29, 2024

PR job #7 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-runtimes -u #3643 --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-runtimes-pr/job/PR-3643/7/display/redirect

Test results:

  • PASSED: 3234
  • FAILED: 1

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testIntermediateCatchEventTimerCycle3
expected: 3
but was: 2

@puneetvtextellent
Copy link

Kindly let me know when the fix is present and can be used.

@fjtirado fjtirado force-pushed the Fix_#3642 branch 2 times, most recently from 969e257 to 8142760 Compare August 30, 2024 11:53
@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 30, 2024

PR job #9 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-runtimes -u #3643 --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-runtimes-pr/job/PR-3643/9/display/redirect

Test results:

  • PASSED: 2273
  • FAILED: 1

Those are the test failures:

org.kie.kogito.quarkus.workflows.EmitEnumRPCGreetIT.testStateIsUnknown java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource

@fjtirado fjtirado force-pushed the Fix_#3642 branch 2 times, most recently from 82fc131 to 2ca19d2 Compare August 30, 2024 16:08
@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 30, 2024

PR job #11 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-runtimes -u #3643 --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-runtimes-pr/job/PR-3643/11/display/redirect

Test results:

  • PASSED: 2772
  • FAILED: 2

Those are the test failures:

org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testValuesReadMode Container startup failed for image redpandadata/redpanda:v24.2.3
org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testFindByIdReadMode Container startup failed for image redpandadata/redpanda:v24.2.3

@kie-ci3
Copy link
Contributor

kie-ci3 commented Aug 30, 2024

PR job #12 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-runtimes -u #3643 --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-runtimes-pr/job/PR-3643/12/display/redirect

Test results:

  • PASSED: 2634
  • FAILED: 4

Those are the test failures:

org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testBasicFlow Container startup failed for image redpandadata/redpanda:v24.2.3
org.kie.kogito.persistence.kafka.KafkaProcessInstancesIT.testValuesReadMode Container startup failed for image redpandadata/redpanda:v24.2.3
org.kie.kogito.quarkus.workflows.AsyncAPIIT.testConsumer java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource
org.kie.kogito.quarkus.workflows.EmitEnumRPCGreetIT.testStateIsUnknown java.util.concurrent.CompletionException: java.lang.RuntimeException: Unable to start Quarkus test resource class org.kie.kogito.testcontainers.quarkus.KafkaQuarkusTestResource

@puneetvtextellent
Copy link

Is issue reported is resolved?

@elguardian
Copy link
Contributor

Deadlines are changing. So far are dissabled.

There were three issues that prevents deadlines to work

1) HumanTaskNodeInstance was not getting registered for job service
events
2) The event published was not checking the right type of event
3) Job Service was using a different Default Unit of work manager
@fjtirado
Copy link
Contributor Author

Deadlines are changing. So far are dissabled.

@elguardian Then Im going to close this one, since does not longer make sense and assing the issue to you, so it can be closed when you finish the user task refactor.

@fjtirado fjtirado closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deadline notification event is not getting triggered
6 participants